-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
75446de
commit 8abe02a
Showing
4 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
from build.ab import emit, normalrule | ||
from build.c import cxxprogram | ||
from build.pkg import package | ||
import config | ||
|
||
package(name="Qt5Widgets", package="Qt5Widgets") | ||
|
||
cxxprogram( | ||
name="gui2", | ||
srcs=[ | ||
"./main.cc", | ||
], | ||
cflags=["$(WX_CFLAGS)", "-fPIC"], | ||
ldflags=["$(WX_LDFLAGS)"], | ||
deps=[ | ||
"+fl2_proto_lib", | ||
"+protocol", | ||
"dep/adflib", | ||
"dep/fatfs", | ||
"dep/hfsutils", | ||
"dep/libusbp", | ||
"extras+icons", | ||
"+lib", | ||
"lib+config_proto_lib", | ||
"src/formats", | ||
"src/gui/drivetypes", | ||
"+z_lib", | ||
"+fmt_lib", | ||
"+protobuf_lib", | ||
".+Qt5Widgets", | ||
], | ||
) | ||
|
||
if config.osx: | ||
normalrule( | ||
name="fluxengine_pkg", | ||
ins=[".+fluxengine_app"], | ||
outs=["FluxEngine.pkg"], | ||
commands=[ | ||
"pkgbuild --quiet --install-location /Applications --component {ins[0]} {outs[0]}" | ||
], | ||
label="PKGBUILD", | ||
) | ||
|
||
normalrule( | ||
name="fluxengine_app", | ||
ins=[ | ||
".+gui", | ||
"extras+fluxengine_icns", | ||
"extras/FluxEngine.app.template/", | ||
], | ||
outs=["FluxEngine.app"], | ||
commands=[ | ||
"rm -rf {outs[0]}", | ||
"cp -a {ins[2]} {outs[0]}", | ||
"touch {outs[0]}", | ||
"cp {ins[0]} {outs[0]}/Contents/MacOS/fluxengine-gui", | ||
"mkdir -p {outs[0]}/Contents/Resources", | ||
"cp {ins[1]} {outs[0]}/Contents/Resources/FluxEngine.icns", | ||
"dylibbundler -of -x {outs[0]}/Contents/MacOS/fluxengine-gui -b -d {outs[0]}/Contents/libs -cd > /dev/null", | ||
"cp $$(brew --prefix wxwidgets)/README.md $@/Contents/libs/wxWidgets.md", | ||
"cp $$(brew --prefix protobuf)/LICENSE $@/Contents/libs/protobuf.txt", | ||
"cp $$(brew --prefix fmt)/LICENSE.rst $@/Contents/libs/fmt.rst", | ||
"cp $$(brew --prefix libpng)/LICENSE $@/Contents/libs/libpng.txt", | ||
"cp $$(brew --prefix libjpeg)/README $@/Contents/libs/libjpeg.txt", | ||
"cp $$(brew --prefix abseil)/LICENSE $@/Contents/libs/abseil.txt", | ||
"cp $$(brew --prefix libtiff)/LICENSE.md $@/Contents/libs/libtiff.txt", | ||
"cp $$(brew --prefix zstd)/LICENSE $@/Contents/libs/zstd.txt", | ||
], | ||
label="MKAPP", | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include <QApplication> | ||
#include <QPushButton> | ||
|
||
int main(int argc, char **argv) | ||
{ | ||
QApplication app (argc, argv); | ||
|
||
QPushButton button ("Hello world !"); | ||
button.show(); | ||
|
||
return app.exec(); | ||
} |