Skip to content

Commit

Permalink
Add universal MacOS build support
Browse files Browse the repository at this point in the history
  • Loading branch information
scosman committed Aug 10, 2024
1 parent cff4e5b commit 080e5dd
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions desktop/build_desktop_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,15 @@ if [ "$(uname)" == "Darwin" ]; then
cp desktop/mac_icon.png desktop/build/icon.png
# onedir launches faster, and still looks like 1 file with MacOS .app bundles
PLATFORM_OPTS="--onedir --osx-bundle-identifier=net.scosman.fune"
## TODO Add this here, but need to check this python install supports universal2
## --target-arch=universal2

# TODO: test this on Github/universal python builds
PY_PLAT=$(python -c 'import sysconfig; print(sysconfig.get_platform().split("-")[-1])')
if [ "$PY_PLAT" == "universal2" ]; then
echo "Building Universal MacOS App"
PLATFORM_OPTS="$PLATFORM_OPTS --target-arch=universal2"
else
echo "Warning: MacOS app for single platform ($PY_PLAT)"
fi
else
echo "Building Windows App"
cp desktop/win_taskbar.png desktop/build/taskbar.png
Expand Down

0 comments on commit 080e5dd

Please sign in to comment.