@@ -561,3 +561,48 @@ def plugin(name, id, srcs, hdrs, romfsdir, deps):
561561 # Windows needs this, for some reason.
562562 + (config .windows and [package (name = "tre_lib" , package = "tre" )] or []),
563563)
564+
565+ if config .osx :
566+ simplerule (
567+ name = "fluxengine_app_zip" ,
568+ ins = [
569+ ".+gui2" ,
570+ "extras+fluxengine_icns" ,
571+ "extras+fluxengine_template" ,
572+ ],
573+ outs = ["=FluxEngine.app.zip" ],
574+ commands = [
575+ "rm -rf $[dir]/FluxEngine.app" ,
576+ "unzip -q -d $[dir] $[ins[2]]" , # creates FluxEngine.app
577+ "cp $[ins[0]] $[dir]/FluxEngine.app/Contents/MacOS/fluxengine-gui" ,
578+ "mkdir -p $[dir]/FluxEngine.app/Contents/Resources" ,
579+ "cp $[ins[1]] $[dir]/FluxEngine.app/Contents/Resources/FluxEngine.icns" ,
580+ "dylibbundler -of -x $[dir]/FluxEngine.app/Contents/MacOS/fluxengine-gui -b -d $[dir]/FluxEngine.app/Contents/libs -cd > /dev/null" ,
581+ #"cp $$(brew --prefix wxwidgets)/README.md FluxEngine.app/Contents/libs/wxWidgets.md",
582+ #"cp $$(brew --prefix protobuf)/LICENSE FluxEngine.app/Contents/libs/protobuf.txt",
583+ #"cp $$(brew --prefix fmt)/LICENSE* FluxEngine.app/Contents/libs/fmt.rst",
584+ #"cp $$(brew --prefix libpng)/LICENSE FluxEngine.app/Contents/libs/libpng.txt",
585+ #"cp $$(brew --prefix libjpeg)/README FluxEngine.app/Contents/libs/libjpeg.txt",
586+ #"cp $$(brew --prefix abseil)/LICENSE FluxEngine.app/Contents/libs/abseil.txt",
587+ #"cp $$(brew --prefix libtiff)/LICENSE.md FluxEngine.app/Contents/libs/libtiff.txt",
588+ #"cp $$(brew --prefix zstd)/LICENSE FluxEngine.app/Contents/libs/zstd.txt",
589+ "(cd $[dir] && zip -rq FluxEngine.app.zip FluxEngine.app)" ,
590+ "mv $[dir]/FluxEngine.app.zip $[outs[0]]"
591+ ],
592+ label = "MKAPP" ,
593+ )
594+
595+ simplerule (
596+ name = "fluxengine_pkg" ,
597+ ins = [
598+ ".+fluxengine_app_zip" ,
599+ ],
600+ outs = ["=FluxEngine.pkg" ],
601+ commands = [
602+ "rm -rf $[dir]/FluxEngine.app" ,
603+ "unzip -q -d $[dir] $[ins[0]]" ,
604+ "pkgbuild --quiet --install-location /Applications --component $[dir]/FluxEngine.app $[outs[0]]" ,
605+ ],
606+ label = "MKPKG" ,
607+ )
608+
0 commit comments