Added new build scripts for mac.
This commit is contained in:
parent
9e9857c6f5
commit
90d36b0653
4 changed files with 33 additions and 46 deletions
|
|
@ -1,44 +1,13 @@
|
|||
rm -rf freeze
|
||||
|
||||
cxfreeze main.py --target-dir=freeze --include-modules=PySide.QtGui,PySide,PySide.QtNetwork,PySide.QtCore,PIL
|
||||
chmod 755 freeze/*
|
||||
cp -rf freeze/* Web2Executable.app/Contents/MacOS/
|
||||
|
||||
install_name_tool -change /usr/local/Cellar/pyside/1.2.1/lib/libpyside-python2.7.1.2.dylib @executable_path/libpyside-python2.7.1.2.dylib Web2Executable.app/Contents/MacOS/PySide.QtCore.so
|
||||
install_name_tool -change /usr/local/lib/libshiboken-python2.7.1.2.1.dylib @executable_path/libshiboken-python2.7.1.2.1.dylib Web2Executable.app/Contents/MacOS/PySide.QtCore.so
|
||||
install_name_tool -change /usr/local/lib/QtCore.framework/Versions/4/QtCore @executable_path/QtCore Web2Executable.app/Contents/MacOS/PySide.QtCore.so
|
||||
|
||||
install_name_tool -change /usr/local/Cellar/pyside/1.2.1/lib/libpyside-python2.7.1.2.dylib @executable_path/libpyside-python2.7.1.2.dylib Web2Executable.app/Contents/MacOS/PySide.QtGui.so
|
||||
install_name_tool -change /usr/local/lib/libshiboken-python2.7.1.2.1.dylib @executable_path/libshiboken-python2.7.1.2.1.dylib Web2Executable.app/Contents/MacOS/PySide.QtGui.so
|
||||
install_name_tool -change /usr/local/lib/QtCore.framework/Versions/4/QtCore @executable_path/QtCore Web2Executable.app/Contents/MacOS/PySide.QtGui.so
|
||||
install_name_tool -change /usr/local/lib/QtGui.framework/Versions/4/QtGui @executable_path/QtGui Web2Executable.app/Contents/MacOS/PySide.QtGui.so
|
||||
|
||||
install_name_tool -change /usr/local/Cellar/pyside/1.2.1/lib/libpyside-python2.7.1.2.dylib @executable_path/libpyside-python2.7.1.2.dylib Web2Executable.app/Contents/MacOS/PySide.QtNetwork.so
|
||||
install_name_tool -change /usr/local/lib/libshiboken-python2.7.1.2.1.dylib @executable_path/libshiboken-python2.7.1.2.1.dylib Web2Executable.app/Contents/MacOS/PySide.QtNetwork.so
|
||||
install_name_tool -change /usr/local/lib/QtCore.framework/Versions/4/QtCore @executable_path/QtCore Web2Executable.app/Contents/MacOS/PySide.QtNetwork.so
|
||||
install_name_tool -change /usr/local/lib/QtNetwork.framework/Versions/4/QtNetwork @executable_path/QtNetwork Web2Executable.app/Contents/MacOS/PySide.QtNetwork.so
|
||||
|
||||
install_name_tool -change /usr/local/lib/libpyside-python2.7.1.2.1.dylib @executable_path/libpyside-python2.7.1.2.1.dylib Web2Executable.app/Contents/MacOS/libpyside-python2.7.1.2.dylib
|
||||
install_name_tool -change /usr/local/lib/libshiboken-python2.7.1.2.1.dylib @executable_path/libshiboken-python2.7.1.2.1.dylib Web2Executable.app/Contents/MacOS/libpyside-python2.7.1.2.dylib
|
||||
install_name_tool -change /usr/local/lib/QtCore.framework/Versions/4/QtCore @executable_path/QtCore Web2Executable.app/Contents/MacOS/libpyside-python2.7.1.2.dylib
|
||||
|
||||
install_name_tool -change /usr/local/lib/libpyside-python2.7.1.2.1.dylib @executable_path/libpyside-python2.7.1.2.1.dylib Web2Executable.app/Contents/MacOS/libpyside-python2.7.1.2.1.dylib
|
||||
install_name_tool -change /usr/local/lib/libshiboken-python2.7.1.2.1.dylib @executable_path/libshiboken-python2.7.1.2.1.dylib Web2Executable.app/Contents/MacOS/libpyside-python2.7.1.2.1.dylib
|
||||
install_name_tool -change /usr/local/lib/QtCore.framework/Versions/4/QtCore @executable_path/QtCore Web2Executable.app/Contents/MacOS/libpyside-python2.7.1.2.1.dylib
|
||||
|
||||
|
||||
install_name_tool -change /usr/local/lib/QtGui.framework/Versions/4/QtGui @executable_path/QtGui Web2Executable.app/Contents/MacOS/QtGui
|
||||
install_name_tool -change /usr/local/Cellar/qt/4.8.5/lib/QtCore.framework/Versions/4/QtCore @executable_path/QtCore Web2Executable.app/Contents/MacOS/QtGui
|
||||
|
||||
|
||||
install_name_tool -change /usr/local/lib/QtCore.framework/Versions/4/QtCore @executable_path/QtCore Web2Executable.app/Contents/MacOS/QtCore
|
||||
|
||||
|
||||
install_name_tool -change /usr/local/lib/QtNetwork.framework/Versions/4/QtNetwork @executable_path/QtNetwork Web2Executable.app/Contents/MacOS/QtNetwork
|
||||
install_name_tool -change /usr/local/Cellar/qt/4.8.5/lib/QtCore.framework/Versions/4/QtCore @executable_path/QtCore Web2Executable.app/Contents/MacOS/QtNetwork
|
||||
|
||||
install_name_tool -change /usr/local/lib/libjpeg.8.dylib @executable_path/libjpeg.8.dylib Web2Executable.app/Contents/MacOS/PIL._imaging.so
|
||||
|
||||
rm -rf command_line_builds/files
|
||||
pyinstaller --hidden-import configobj --distpath command_line_builds --onefile -n web2exe-mac command_line.py
|
||||
cp -rf files command_line_builds/files/
|
||||
|
||||
rm -rf build dist Web2Executable.app
|
||||
|
||||
sudo python build_mac_setup.py py2app --iconfile icon.icns
|
||||
|
||||
sudo chown -R joey dist/main.app
|
||||
sudo chown -R joey dist/ build/
|
||||
mv dist/main.app Web2Executable.app
|
||||
|
||||
rm -rf build dist
|
||||
|
|
|
|||
22
build_mac_setup.py
Normal file
22
build_mac_setup.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
"""
|
||||
This is a setup.py script generated by py2applet
|
||||
|
||||
Usage:
|
||||
python setup.py py2app
|
||||
"""
|
||||
|
||||
from setuptools import setup
|
||||
|
||||
APP = ['main.py']
|
||||
DATA_FILES = ['files']
|
||||
OPTIONS = {
|
||||
'iconfile': 'icon.icns',
|
||||
'includes': ['PySide.QtCore', 'PySide.QtGui', 'PySide.QtNetwork', 'configobj'],
|
||||
}
|
||||
|
||||
setup(
|
||||
app=APP,
|
||||
data_files=DATA_FILES,
|
||||
options={'py2app': OPTIONS},
|
||||
setup_requires=['py2app'],
|
||||
)
|
||||
|
|
@ -32,11 +32,7 @@ from configobj import ConfigObj
|
|||
|
||||
inside_packed_exe = getattr(sys, 'frozen', '')
|
||||
|
||||
if inside_packed_exe:
|
||||
CWD = os.path.dirname(sys.executable)
|
||||
os.chdir(CWD)
|
||||
else:
|
||||
CWD = os.getcwd()
|
||||
CWD = os.getcwd()
|
||||
|
||||
TEMP_DIR = get_temp_dir()
|
||||
DEFAULT_DOWNLOAD_PATH = os.path.join(CWD,
|
||||
|
|
|
|||
BIN
icon.icns
Normal file
BIN
icon.icns
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue