Converter bot exe free download9/5/2023 ![]() Now the link will be referenced correctly and chosen files successfully packed into. With setWindowIcon(QIcon(resource_path('logo.png')) To use this code in your project replace the link to the media file you have now For example: setWindowIcon(QIcon('media\icons\logo.png')) To work around this you should use this code provided by developer of Auto PY to EXE here def resource_path(relative_path): """ Get absolute path to resource, works for dev and for PyInstaller """ try: # PyInstaller creates a temp folder and stores path in _MEIPASS base_path = sys._MEIPASS except Exception: base_path = os.path.abspath(".") return os.path.join(base_path, relative_path) In other words, if option “One File” is choosen picked files in the “Additional Files” menu will not be added to. Your project won’t find necessary files because the path changed and it won’t see the new path eather. “Auto PY to EXE” uses pyinstaller which unpacks the data into a temporary folder, and stores this directory path in the _MEIPASS environment variable. ![]() There is a menu in “Auto PY to EXE” called “Additional Files” that lets you add files of your choice. For those who want to pack media files into. exe file feel free to skip the following explanation. If your program has only default Windows gui with no icons, backgrounds, media files or you are OK with placing media folder with. exe file containing all dependencies but NOT MEDIA FILES. When choosing “One File” option “Auto PY to EXE” will create one.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |