Changed GUI build to pyinstaller.
This commit is contained in:
parent
39c2a6fd27
commit
7c2a837c9d
2 changed files with 21 additions and 9 deletions
|
|
@ -7,16 +7,22 @@ cp -rf files Web2ExeMac-CMD/files/
|
|||
|
||||
rm -rf build dist Web2Executable.app
|
||||
|
||||
sudo python build_mac_setup.py py2app --iconfile icon.icns
|
||||
#sudo python build_mac_setup.py py2app --iconfile icon.icns
|
||||
pyinstaller -w --hidden-import PIL.Jpeg2KImagePlugin --hidden-import PyQt4 --hidden-import configobj --hidden-import pkg_resources --distpath Web2ExeMac --onefile -n Web2Executable main.py
|
||||
|
||||
sudo chown -R joey dist/Web2Executable.app
|
||||
sudo chown -R joey dist/ build/
|
||||
mv dist/Web2Executable.app Web2Executable.app
|
||||
#sudo chown -R joey dist/Web2Executable.app
|
||||
#sudo chown -R joey dist/ build/
|
||||
#mv dist/Web2Executable.app Web2Executable.app
|
||||
|
||||
rm -rf Web2Executable.app/Contents/Frameworks/QtDesigner*
|
||||
rm -rf Web2Executable.app/Contents/Frameworks/QtXml*
|
||||
rm -rf Web2Executable.app/Contents/Frameworks/QtWebKit*
|
||||
rm -rf Web2Executable.app/Contents/Frameworks/QtScript*
|
||||
mv Web2ExeMac/Web2Executable.app .
|
||||
|
||||
#rm -rf Web2Executable.app/Contents/Frameworks/QtDesigner*
|
||||
#rm -rf Web2Executable.app/Contents/Frameworks/QtXml*
|
||||
#rm -rf Web2Executable.app/Contents/Frameworks/QtWebKit*
|
||||
#rm -rf Web2Executable.app/Contents/Frameworks/QtScript*
|
||||
|
||||
cp icon.icns Web2Executable.app/Contents/Resources/icon-windowed.icns
|
||||
cp -rf files Web2Executable.app/Contents/MacOS/
|
||||
|
||||
rm -rf build dist
|
||||
|
||||
|
|
|
|||
|
|
@ -42,11 +42,17 @@ from configobj import ConfigObj
|
|||
|
||||
inside_packed_exe = getattr(sys, 'frozen', '')
|
||||
|
||||
CWD = os.getcwd()
|
||||
if inside_packed_exe:
|
||||
# we are running in a |PyInstaller| bundle
|
||||
CWD = os.path.dirname(sys.executable)
|
||||
else:
|
||||
# we are running in a normal Python environment
|
||||
CWD = os.getcwd()
|
||||
|
||||
def get_file(path):
|
||||
parts = path.split('/')
|
||||
independent_path = os.path.join(CWD, *parts)
|
||||
print independent_path
|
||||
return independent_path
|
||||
|
||||
TEMP_DIR = get_temp_dir()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue