forked from openlp/openlp
remove some unneeded stuff from mac build script (like macdeployqt or qt_menu.nib)
This commit is contained in:
parent
2247a67442
commit
3da2fada66
@ -31,8 +31,8 @@ Mac OS X Build Script
|
|||||||
This script is used to build the OS X binary and the accompanying installer.
|
This script is used to build the OS X binary and the accompanying installer.
|
||||||
For this script to work out of the box, it depends on a number of things:
|
For this script to work out of the box, it depends on a number of things:
|
||||||
|
|
||||||
Python 2.6
|
Python 2.6/2.7
|
||||||
This build script only works with Python 2.6.
|
This build script only works with Python 2.6/2.7
|
||||||
|
|
||||||
PyQt4
|
PyQt4
|
||||||
You should already have this installed, OpenLP doesn't work without it.
|
You should already have this installed, OpenLP doesn't work without it.
|
||||||
@ -76,7 +76,6 @@ build process you can specify different make targets
|
|||||||
make bundle -- compresses the dmg file and sets the dmg file icon
|
make bundle -- compresses the dmg file and sets the dmg file icon
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import time
|
|
||||||
import os
|
import os
|
||||||
import ConfigParser
|
import ConfigParser
|
||||||
import logging
|
import logging
|
||||||
@ -93,27 +92,14 @@ script_name = "build"
|
|||||||
def build_application(settings, app_name_lower, app_dir):
|
def build_application(settings, app_name_lower, app_dir):
|
||||||
logging.info('[%s] now building the app with pyinstaller at "%s"...',
|
logging.info('[%s] now building the app with pyinstaller at "%s"...',
|
||||||
script_name, settings['pyinstaller_basedir'])
|
script_name, settings['pyinstaller_basedir'])
|
||||||
full_python_dir = os.path.join('/opt/local/Library/Frameworks',
|
result = os.system('%s %s/pyinstaller.py openlp.spec' \
|
||||||
'Python.framework/Versions/2.6/Resources/',
|
% ( sys.executable,
|
||||||
'Python.app/Contents/MacOS/Python')
|
|
||||||
result = os.system('arch -i386 %s %s/pyinstaller.py openlp.spec' \
|
|
||||||
% ( full_python_dir,
|
|
||||||
settings['pyinstaller_basedir']) )
|
settings['pyinstaller_basedir']) )
|
||||||
if (result != 0):
|
if (result != 0):
|
||||||
logging.error('[%s] The pyinstaller build reported an error, cannot \
|
logging.error('[%s] The pyinstaller build reported an error, cannot \
|
||||||
continue!', script_name)
|
continue!', script_name)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
logging.info('[%s] copying the qt_menu files...', script_name)
|
|
||||||
# see http://www.pyinstaller.org/ticket/157
|
|
||||||
result = os.system('cp -R %(qt_menu_directory)s \
|
|
||||||
%(application_directory)s/Contents/Resources' \
|
|
||||||
% { 'qt_menu_directory' : settings['qt_menu_basedir'],
|
|
||||||
'application_directory' : app_dir })
|
|
||||||
if (result != 0):
|
|
||||||
logging.error('[%s] could not copy the qt_menu files, cannot \
|
|
||||||
continue!', script_name)
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
dist_folder = os.getcwd() + '/dist/' + app_name_lower
|
dist_folder = os.getcwd() + '/dist/' + app_name_lower
|
||||||
|
|
||||||
@ -178,15 +164,6 @@ def build_application(settings, app_name_lower, app_dir):
|
|||||||
creation failed!', script_name)
|
creation failed!', script_name)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
def deploy_qt(settings):
|
|
||||||
logging.info('[%s] running mac deploy qt on %s.app...', script_name,
|
|
||||||
settings['openlp_appname']);
|
|
||||||
|
|
||||||
result = os.system('macdeployqt %s.app' % settings['openlp_appname']);
|
|
||||||
if (result != 0):
|
|
||||||
logging.error('[%s] could not create dmg file!', script_name)
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
def create_dmg(settings):
|
def create_dmg(settings):
|
||||||
logging.info('[%s] creating the dmg...', script_name)
|
logging.info('[%s] creating the dmg...', script_name)
|
||||||
dmg_file = os.getcwd() + '/' + settings['openlp_dmgname'] + '.dmg'
|
dmg_file = os.getcwd() + '/' + settings['openlp_dmgname'] + '.dmg'
|
||||||
@ -308,7 +285,6 @@ if __name__ == '__main__':
|
|||||||
do_package_view = True
|
do_package_view = True
|
||||||
do_create_dmg = True
|
do_create_dmg = True
|
||||||
do_compress_dmg = True
|
do_compress_dmg = True
|
||||||
do_deploy_qt = True
|
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
parser = optparse.OptionParser()
|
||||||
parser.add_option('-c', '--config', dest='config', help='config file',
|
parser.add_option('-c', '--config', dest='config', help='config file',
|
||||||
@ -335,7 +311,6 @@ if __name__ == '__main__':
|
|||||||
if (options.package_view is True or options.compress_view is True
|
if (options.package_view is True or options.compress_view is True
|
||||||
or options.package is True or options.compress is True):
|
or options.package is True or options.compress is True):
|
||||||
do_build = False
|
do_build = False
|
||||||
do_deploy_qt = False
|
|
||||||
do_package_view = options.package_view
|
do_package_view = options.package_view
|
||||||
do_compress_view = options.compress_view
|
do_compress_view = options.compress_view
|
||||||
do_create_dmg = options.package
|
do_create_dmg = options.package
|
||||||
@ -366,7 +341,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
version = platform.mac_ver()[0]
|
version = platform.mac_ver()[0]
|
||||||
# we only need the differenciation between leopard and snow leopard
|
# we only need the differenciation between leopard and snow leopard
|
||||||
if version.startswith("10.6"):
|
if version.startswith("10.6") or version.startswith("10.7"):
|
||||||
SNOWLEOPARD = True
|
SNOWLEOPARD = True
|
||||||
logging.info('[%s] using snow leopard scripts (version = %s)',
|
logging.info('[%s] using snow leopard scripts (version = %s)',
|
||||||
script_name, version)
|
script_name, version)
|
||||||
@ -408,9 +383,6 @@ if __name__ == '__main__':
|
|||||||
if (do_build is True):
|
if (do_build is True):
|
||||||
build_application(settings, app_name_lower, app_dir)
|
build_application(settings, app_name_lower, app_dir)
|
||||||
|
|
||||||
if (do_deploy_qt is True):
|
|
||||||
deploy_qt(settings)
|
|
||||||
|
|
||||||
if (do_create_dmg is True):
|
if (do_create_dmg is True):
|
||||||
(volume_basedir, dmg_file) = create_dmg(settings)
|
(volume_basedir, dmg_file) = create_dmg(settings)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user