Skip to content

Commit 206e85a

Browse files
committed
Expose the .app on OSX (in a zipfile).
Closes: #800
1 parent d1524f7 commit 206e85a

File tree

4 files changed

+31
-5
lines changed

4 files changed

+31
-5
lines changed

.github/workflows/ccpp.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ jobs:
7070
uses: actions/upload-artifact@v4
7171
with:
7272
name: ${{ github.event.repository.name }}.${{ github.sha }}.fluxengine.${{ runner.arch }}.pkg
73-
path: fluxengine/FluxEngine.pkg
73+
path: |
74+
fluxengine/FluxEngine.pkg
75+
fluxengine/FluxEngine.app.zip
7476
7577
build-windows:
7678
runs-on: windows-latest

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ jobs:
9999
run: |
100100
gmake
101101
mv FluxEngine.pkg FluxEngine-${{ runner.arch }}.pkg
102+
mv FluxEngine.app.zip FluxEngine-${{ runner.arch }}.app.zip
102103
103104
- name: tag
104105
uses: EndBug/latest-tag@latest
@@ -115,6 +116,7 @@ jobs:
115116
tag: dev
116117
assets: |
117118
FluxEngine-${{ runner.arch }}.pkg
119+
FluxEngine-${{ runner.arch }}.app.zip
118120
fail-if-no-assets: false
119121

120122
- name: release
@@ -123,6 +125,7 @@ jobs:
123125
name: Development build ${{ env.RELEASE_DATE }}
124126
files: |
125127
FluxEngine-${{ runner.arch }}.pkg
128+
FluxEngine-${{ runner.arch }}.app.zip
126129
tag_name: dev
127130
env:
128131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# Hack for building on Fedora/WSL; executables get the .exe extension,
1111
# build the build system detects it as Linux.
1212
import build.toolchain
13+
1314
toolchain.Toolchain.EXE = "$(EXT)"
1415

1516
package(name="protobuf_lib", package="protobuf")
@@ -108,6 +109,13 @@
108109
"brother240tool$(EXT)": "tools+brother240tool",
109110
"upgrade-flux-file$(EXT)": "tools+upgrade-flux-file",
110111
}
111-
| ({"FluxEngine.pkg": "src/gui+fluxengine_pkg"} if config.osx else {}),
112+
| (
113+
{
114+
"FluxEngine.pkg": "src/gui+fluxengine_pkg",
115+
"FluxEngine.app.zip": "src/gui+fluxengine_app_zip",
116+
}
117+
if config.osx
118+
else {}
119+
),
112120
deps=["tests", "src/formats+docs", "scripts+mkdocindex"] + corpustests,
113121
)

src/gui/build.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@
5757

5858
if config.osx:
5959
simplerule(
60-
name="fluxengine_pkg",
60+
name="fluxengine_app_zip",
6161
ins=[
6262
".+gui",
6363
"extras+fluxengine_icns",
6464
"extras+fluxengine_template",
6565
],
66-
outs=["=FluxEngine.pkg"],
66+
outs=["=FluxEngine.app.zip"],
6767
commands=[
6868
"rm -rf $[outs[0]]",
6969
"unzip -q $[ins[2]]", # creates FluxEngine.app
@@ -79,7 +79,20 @@
7979
"cp $$(brew --prefix abseil)/LICENSE FluxEngine.app/Contents/libs/abseil.txt",
8080
"cp $$(brew --prefix libtiff)/LICENSE.md FluxEngine.app/Contents/libs/libtiff.txt",
8181
"cp $$(brew --prefix zstd)/LICENSE FluxEngine.app/Contents/libs/zstd.txt",
82-
"pkgbuild --quiet --install-location /Applications --component FluxEngine.app $[outs[0]]",
82+
"zip -rq $[outs[0]] FluxEngine.app",
8383
],
8484
label="MKAPP",
8585
)
86+
87+
simplerule(
88+
name="fluxengine_pkg",
89+
ins=[
90+
".+fluxengine_app_zip",
91+
],
92+
outs=["=FluxEngine.pkg"],
93+
commands=[
94+
"unzip -q $[ins[0]]",
95+
"pkgbuild --quiet --install-location /Applications --component FluxEngine.app $[outs[0]]",
96+
],
97+
label="MKPKG",
98+
)

0 commit comments

Comments
 (0)