I’m working on an application (that’s only supposed to run on my machine) that uses PyQt6 to show a hello world text. I do not want to use py2app, pyinstaller or co. I manually created the app bundle and when running the bundle executable it fully works. Only when I double click the .app file (or open
it via the terminal) it doesn’t work. The osascript testing thing DOES work.
#!/bin/zsh
osascript -e 'display notification "Lorem ipsum dolor sit amet" with title "Title"'
cd /Volumes/Media/ExtPycharmProjects/baky-compiler
source /Volumes/Media/ExtPycharmProjects/baky-compiler/.venv/bin/activate
/Volumes/Media/ExtPycharmProjects/baky-compiler/.venv/bin/python3 ./example-app/executor.py
My Info.plist
:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>Example Application</string>
<key>CFBundleName</key>
<string>Example Application</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleExecutable</key>
<string>Example Application</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
Bundle structure:
Example Application.app/
Contents/
MacOS/
Example Application
Resources/
Info.plist
I want the application to start correctly and show the window.