This is my first time using pyinstaller. My goal is to build an .app in Mac. 
The app is basically a GUI written in PySide, and I have about 7 different 
Python scripts + 1 .png file. The main file calls 4 of the files, and the 4 
files will call the rest of the 2 files repeatedly. The .png file is nothing 
but the window logo. Could someone help me with some diagnosis? I do not know 
what went wrong. I searched a lot of documentations online, i.e., change spec, 
add import, ... etc. but my app still doesn't run.

FYI, Pyinstaller could generate an app for me, but there are two issues:
1. Icon is not changed for the app.
2. App crashes when opened.

My Python version is 2.7.5 and I am using PyInstaller-2.0. Here is my code for 
packaging:
python pyinstaller.py --onefile --windowed --name=MyApplication -i 
~/Documents/AASource/icon.ico ~/Documents/AASource/Scripts/main_file.py
Here is the spec file:
# -*- mode: python -*-
a = Analysis(['/Users/boxuancui/Documents/AASource/Scripts/main_file.py'],
             pathex=['/Users/boxuancui/Documents/pyinstaller-2.0'],
             hiddenimports=[],
             hookspath=None)
pyz = PYZ(a.pure)
exe = EXE(pyz,
          a.scripts,
          a.binaries,
          a.zipfiles,
          a.datas,
          name=os.path.join('dist', 'MyApplication'),
          debug=False,
          strip=None,
          upx=True,
          console=False , icon='/Users/boxuancui/Documents/AASource/icon.ico')
app = BUNDLE(exe,
             name=os.path.join('dist', 'MyApplication.app'))
Here is part of the crash message:
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000000054d8
Thanks in advance! Any help will be appreciated!


Best,
Boxuan
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to