--onefile issues (Mac.app + Win.exe)

14 views
Skip to first unread message

Manfred Drews

unread,
Feb 23, 2023, 6:43:45 AM2/23/23
to PyInstaller
Hey Gang,

I've tried for a few hours to get my "readme.txt" to populate when I hit a ktinter button. All works fine in PyCharm and even standard Dist are no problem. The issue arises when I try --onefile.

Here's my example code: 

pyinstaller --add-data "src/*.jar;src/" --add-data "src/readme.txt;src/" --onefile --windowed main.py

I checked main.py and wrote this: 

if getattr(sys, 'frozen', False):
# running in a PyInstaller bundle
src_path = os.path.join(sys._MEIPASS, 'src')
readme_path = os.path.join(sys._MEIPASS, 'src', 'readme.txt')

I tried both OS X and Windows 10 and same result. Any advice? Thanks much.


Reply all
Reply to author
Forward
0 new messages