From db6f6958cafe42dd0cb1c8141cff42afa9ca8af1 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Sat, 25 May 2024 03:25:11 +1200 Subject: [PATCH] build .dmg for macos .app --- build_macos.sh | 11 ++++------- setup.py | 4 ++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/build_macos.sh b/build_macos.sh index 8abe1d6..54fd491 100644 --- a/build_macos.sh +++ b/build_macos.sh @@ -1,12 +1,9 @@ #!/bin/sh -# build .app for mac -python setup.py bdist_mac +# ensure macos/ReticulumWebChat.sh is executable before the cxfreeze copies it inside the .app +chmod +x macos/ReticulumWebChat.sh -# copy shell script to .app -for DIR in ./build/ReticulumWebChat-*.app/Contents/MacOS; do - cp ./macos/ReticulumWebChat.sh "$DIR/ReticulumWebChat.sh" - chmod +x "$DIR/ReticulumWebChat.sh" -done +# build macos .app and put in .dmg +python setup.py bdist_dmg # todo codesign? diff --git a/setup.py b/setup.py index 728ec79..29d6b83 100644 --- a/setup.py +++ b/setup.py @@ -43,6 +43,10 @@ setup( }, 'bdist_mac': { 'iconfile': "macos/icon.icns", + 'include_resources': [ + # we use this script to launch as a terminal app + ('macos/ReticulumWebChat.sh', '../MacOS/ReticulumWebChat.sh'), + ], 'plist_items': [ # we want ReticulumWebChat.app to execute ReticulumWebChat.sh instead of the python binary, as we need to launch it via terminal ('CFBundleExecutable', 'ReticulumWebChat.sh'),