Since my project was open-source anyway and uses the MIT license, this was fine by me.Against: Does not support Qt5, a little bit less well-documented because its less well funded than PyQt.
In favour: Easy to set up, since its pre-installed with Python. Against: Does not look native, less popular than PyQtPySide. The GUI looks pretty good on all of them, so the cross-platform claim checks out. Stack Overflow, the GitHub page, and even just the documentation are life-savers. Keep in mind also that PyInstaller is not a cross-compiler, i.e. Pyqt5 Tools Anaconda .Exe Files WhenWindows.exe files when using macOS, etc. Understanding this is essential to understanding PyInstaller. There are several customizations that Ive done to my spec files that have come in handy. Note that if you run pyinstaller again, it will generate another spec file that overwrites any customizations that you made To avoid this, give pyinstaller a spec file as an argument, e.g. As an example, this is what the directory structure could look like. This function checks for that folder, and if it exists, thus knows that its running the executable. Pyqt5 Tools Anaconda Code Is InWhen the code is in an executable bundle, this function will convert your relative path to the path in the MEIPASS folder, and otherwise leaves it alone. For example, when Im generating a bundle for Quaver, I do pyinstaller quaver-onefile.spec. Heres what I add to my spec file after the pyz code block to generate a bundle for macOS. For example, the NSHighResolutionCapable example looks like this in the Info.plist file in Quaver.appContents. I have a post about this here, but you need a CFBundleDocumentTypes key with an array of values, which is too complicated for PyInstallers spec file to handle. The only solution is to create and save a separate Info.plist file, then replace the one PyInstaller generates in yourapp.appContents. See here for more details. Otherwise, youll need to create a separate installer executable to set things up correctly. Another benefit of an msi file is that it can properly integrate with the start menu and create desktop shortcuts easily. Some gotchas: make sure you create a Simple project instead of a Professional or anything else, because Simple is the only one thats free, and you cannot convert one type of project to another later on. Advanced Installer lets you create Professional projects when you download by automatically activating a trial, which is sneaky.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |