I have been working with Pyinstaller for a bit of time to create executables, but recently discovered that you could create not only an executable, but a full app by using the --noconsole flag. I tried it (on a script named Arcade.py), but at first the app crashed. I figured out the fact that it was because of the assets. I added them to the Arcade.app/Contents/Ressources , and it worked. Then, I tried to figure out the best way to update the app. I was told that you had to rebuild it entirely every time you made an update. I didn't like it and found the Arcade.app/Contents/MacOS folder which contained the executable file. I now update my app by building only the exec (pyinstaller Arcade.py )and replacing the exec in the app contents by this new one. I wanted to know how you do this if there is a better way, and if this is dangerous, will cause bugs... Also, do you know a command that includes all your assets as well as the modules and other compile stuff, so that you don't have to do the first step I described every time.
Thanks for your time!
look, while replacing only the executable is a fast workaround for minor / small dev updates, it is not the recommended method due to potential dependency conflicts.
Best Practice: Rebuild the entire application package with every update to ensure all new dependencies and configurations are correctly included.
Automated Asset Inclusion: Use the --add-data flag during the build process to automatically include assets, eliminating the need to manually copy them into the app bundle.
For example:
for macOS/Linux: pyinstaller Arcade.py --noconsole --add-data "assets:assets"
Windows: pyinstaller Arcade.py --noconsole --add-data "assets;assets"
Remember to adjust your Python code to locate assets correctly at runtime using sys._MEIPASS ... The Python Arcade library documentation gives help on this.
Tell me if this works, if it doesn't i will try to help