When I try to build this app on OS X with pyinstaller the app bundle doesn't work.
Double clicking on the bundle from the finder doesn't do anything.
OS version: OS X High Sierra 10.13.6
python: 3.6.3
pyinstaller: 3.3.1 (also tried 3.4.dev0+380ab20f8)
I built the app as follows: pyinstaller --windowed mindfulness-at-the-computer-macos.spec
When searching for answers I found (among other things) the following posts, but they didn't help much
- PyInstaller OS X app runs from command line, but not Finder window
- mac os x app bundle built from pyinstaller doesn't work correctly
To make sure the problem isn't in our code I tried building a simple example as outlined in this document (scroll all the way down for the code):
https://pythonhosted.org/PyInstaller/runtime-information.html#run-time-information
This has the same problem.
I built it like this: pyinstaller -w directories.py
When I run it with python I get this:
python directories.py
we are not frozen
bundle dir is /Users/marieke/myprojects/test
sys.argv[0] is directories.py
sys.executable is /Users/marieke/myprojects/test/venv/bin/python
os.getcwd is /Users/marieke/myprojects/test
When I run it in the terminal from /Users/marieke/myprojects/test/dist/directories.app/Contents/MacOS
./directories
we are ever so frozen
bundle dir is /Users/marieke/myprojects/test/dist/directories.app/Contents/MacOS
sys.argv[0] is ./directories
sys.executable is /Users/marieke/myprojects/test/dist/directories.app/Contents/MacOS/directories
os.getcwd is /Users/marieke/myprojects/test/dist/directories.app/Contents/MacOS
When I run it in the finder from /Users/marieke/myprojects/test/dist/directories.app/Contents/MacOS
/Users/marieke/myprojects/test/dist/directories.app/Contents/MacOS/directories ; exit;
we are ever so frozen
bundle dir is /Users/marieke/myprojects/test/dist/directories.app/Contents/MacOS
sys.argv[0] is /Users/marieke/myprojects/test/dist/directories.app/Contents/MacOS/directories
sys.executable is /Users/marieke/myprojects/test/dist/directories.app/Contents/MacOS/directories
os.getcwd is /Users/marieke
When I double click the bundle it doesn't run.
When I run open -a directories.app
from the terminal it doesn't run either.
In the console app I only see a launchservicesd message CHECKIN:0x0-0x97097 5878 directories
. Nothing else.
Access rights of the binary are -rwxr-xr-x@
The Info.plist
file is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict><key>CFBundleDisplayName</key>
<string>directories</string>
<key>CFBundleName</key>
<string>directories</string>
<key>CFBundleIdentifier</key>
<string>directories</string>
<key>CFBundleExecutable</key>
<string>MacOS/directories</string>
<key>CFBundleIconFile</key>
<string>icon-windowed.icns</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.0.0</string>
<key>LSBackgroundOnly</key>
<string>0</string>
</dict>
</plist>
The funny thing is, until 3 months ago we were able to build a working bundle. So in the meantime apparently something strange happened which I can't find yet.
I would be very thankful for some help!