build .dmg for macos .app

This commit is contained in:
liamcottle
2024-05-25 03:25:11 +12:00
parent 622c38f3ef
commit db6f6958ca
2 changed files with 8 additions and 7 deletions

View File

@@ -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?

View File

@@ -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'),