Skip to content

Commit

Permalink
Fix build script. Worked on MacOS but broke windows
Browse files Browse the repository at this point in the history
  • Loading branch information
scosman committed Aug 11, 2024
1 parent 7948a85 commit 8884c98
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build_desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ jobs:

- run: pip install -r requirements.txt

- run: sh ./desktop/build_desktop_app.sh
# MacOS apps have symlinks, and the artifact upload zip will break them. Tar instead.
- run: cd desktop/build/dist && tar czpvf fune.app.tgz fune.app && rm -r fune.app && echo "Ready to upload"
# Compress MacOS app param ignored on Windows
- run: sh ./desktop/build_desktop_app.sh --compress-mac-app
- uses: actions/upload-artifact@v4
with:
name: fune-desktop-${{ runner.os }}-${{ runner.arch }}
Expand Down
10 changes: 10 additions & 0 deletions desktop/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# MacOS Code Signing

How to sign on of the builds from GitHub Actions for offical release.

Easy way, but just signs with personal ID, not developer ID: `codesign --force --deep -s - fune.app`

Proper way with a developer ID:

1. Get developer ID name: `security find-identity -v -p codesigning`
2. Run `codesign --force --deep -s "Developer ID Application: YOUR NAME (XXXXXXXX)" fune.app`
9 changes: 9 additions & 0 deletions desktop/build_desktop_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,12 @@ pyinstaller --windowed $(printf %s "$PLATFORM_OPTS") --icon="./icon.png" \
--noconfirm --distpath=./desktop/build/dist --workpath=./desktop/build/work \
-n fune --specpath=./desktop/build \
--paths=. ./desktop/desktop.py

# MacOS apps have symlinks, and GitHub artifact upload zip will break them. Tar instead.
if [[ $* == *--compress-mac-app* && "$(uname)" == "Darwin" ]]; then
echo "Compressing MacOS app"
cd ./desktop/build/dist
tar czpvf fune.app.tgz fune.app
rm -r fune.app
cd ../../..
fi

0 comments on commit 8884c98

Please sign in to comment.