-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bundlin app on OSX: resources files not bundled #2460
Comments
@JPFrancoia, did you manage to get this resolved? I am also having the same problem |
Nope, but I found a workaround: https://github.com/chembrows/ChemBrows/blob/unstable/deploy/deploy.py Basically, after pyinstaller has done its job, I use: copy_tree('dist/ChemBrows/', 'dist/ChemBrows.app/Contents/MacOS/') This line will copy all the files (libs and resource files) that are in the non-bundled directory, into the bundled directory (the .app folder). Note that you could also do it by hand. In fact, it's not really a workaround. I just don't copy the files manually... I'm really surprised PyInstaller doesn't do it alone. |
Are you using the --onefile option when you call pyinstaller? For example, |
Nope, I'm not using the onefile option. In this case, I'm almost sure it would create a big exe and put it in the right place. The bundled app would work out of the box. But I don't want to use the onefile option. It bundles everything into a big exe, and perfs are not as good as with the onedir mode. |
Problem is in the autogenerated spec file. The bundle has
with
And then the relevant files are copied in the application. Difference between |
Hi,
TL; DR
In my
setup.spec
, I have this block at the end:When run on OSX, I except PyInstaller to create the app
ChemBrows.app
. It does, but the directoryChemBrows.app/Contents/MacOs
only contains the executable and 2 other files (the std lib, I think). All the libraries are missing, and should be in this directory. Copying them from the non-app-bundled directory allows the app to work properly. Is there an option to allow PyInstaller to copy all the libs here ?Here is the long version of my setup.spec:
The text was updated successfully, but these errors were encountered: