-
TL;DR, pyinstaller app fails when installed under an OSX .app dir. Pyinstaller generated for me files which I was able to install and use successfully on mac osx using an InstallBuilder builder. When I tried to do the same with VeloPak installer (open source), the app failed with the error below. The difference between the two installations is that InstallBuilder installs under /Applications/my-app-name while velopak installs under /Applications/my-app-name.app (noice the extra .app extension) and this breaks the pyinstaller app. Here is a log that shows that removing the .app extension from the install app 'fixes' the problem. https://pastebin.com/nK67herM Any suggestions on how to make an pyinstaller app to run on OSX also in .app installations?
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
PyInstaller makes .app bundles if you give it the |
Beta Was this translation helpful? Give feedback.
-
@bwoodsend, when I tried to add --windowed to the command line I got the error below. Also, our app is a command line app, not a GUI, is --windowed is an appropriate choice for it? Or, is it possible that osx .app installation doesn't support CLI apps at all? ChatGpt says that .app it's not preferred for CLI apps but doesn't say it's not allowed. (I am trying to find a configuraiton in which pyinstaller and velopak can work together).
|
Beta Was this translation helpful? Give feedback.
-
@rokm, I created a .pkg guided installation and it works. It contains a custom postinstall script that sets the path (or set a symlink if desired). BTW, pyinstall creates two directories in the dist directory, app and app.app. I am create the package with the first one and it installed in /Applications as a 'folder' application rather than a bundle application. It seems to be more user friendly for cli apps.
I think we are good with the osx installer. Thanks @rokm and @bwoodsend for your help! |
Beta Was this translation helpful? Give feedback.
-
We have a working macosx installer. Thanks for the help. |
Beta Was this translation helpful? Give feedback.
Yes, that's because when you use
--windowed
mode, the spec file contains bothCOLLECT
andBUNDLE
targets; the first creates a onedir POSIX build, and the second an .app bundle. If you do not need the .app bundle, you can remove theBUNDLE
target from the .spec.