forked from openlp/openlp
Added comments for explanation of some code.
Fixed the build directory due to the new way PyInstaller works. bzr-revno: 1680
This commit is contained in:
commit
00b06240dd
@ -133,7 +133,14 @@ site_packages = os.path.join(os.path.split(python_exe)[0], u'Lib',
|
|||||||
pyi_build = os.path.abspath(os.path.join(branch_path, u'..', u'..',
|
pyi_build = os.path.abspath(os.path.join(branch_path, u'..', u'..',
|
||||||
u'pyinstaller', u'pyinstaller.py'))
|
u'pyinstaller', u'pyinstaller.py'))
|
||||||
openlp_main_script = os.path.abspath(os.path.join(branch_path, 'openlp.pyw'))
|
openlp_main_script = os.path.abspath(os.path.join(branch_path, 'openlp.pyw'))
|
||||||
|
if os.path.exists(os.path.join(site_packages, u'PyQt4', u'bin')):
|
||||||
|
# Older versions of the PyQt4 Windows installer put their binaries in the
|
||||||
|
# "bin" directory
|
||||||
lrelease_exe = os.path.join(site_packages, u'PyQt4', u'bin', u'lrelease.exe')
|
lrelease_exe = os.path.join(site_packages, u'PyQt4', u'bin', u'lrelease.exe')
|
||||||
|
else:
|
||||||
|
# Newer versions of the PyQt4 Windows installer put their binaries in the
|
||||||
|
# base directory of the installation
|
||||||
|
lrelease_exe = os.path.join(site_packages, u'PyQt4', u'lrelease.exe')
|
||||||
i18n_utils = os.path.join(script_path, u'translation_utils.py')
|
i18n_utils = os.path.join(script_path, u'translation_utils.py')
|
||||||
win32_icon = os.path.join(branch_path, u'resources', u'images', 'OpenLP.ico')
|
win32_icon = os.path.join(branch_path, u'resources', u'images', 'OpenLP.ico')
|
||||||
|
|
||||||
@ -145,7 +152,7 @@ helpfile_path = os.path.join(manual_build_path, u'htmlhelp')
|
|||||||
i18n_path = os.path.join(branch_path, u'resources', u'i18n')
|
i18n_path = os.path.join(branch_path, u'resources', u'i18n')
|
||||||
winres_path = os.path.join(branch_path, u'resources', u'windows')
|
winres_path = os.path.join(branch_path, u'resources', u'windows')
|
||||||
build_path = os.path.join(branch_path, u'build')
|
build_path = os.path.join(branch_path, u'build')
|
||||||
dist_path = os.path.join(build_path, u'dist', u'OpenLP')
|
dist_path = os.path.join(branch_path, u'dist', u'OpenLP')
|
||||||
pptviewlib_path = os.path.join(source_path, u'plugins', u'presentations',
|
pptviewlib_path = os.path.join(source_path, u'plugins', u'presentations',
|
||||||
u'lib', u'pptviewlib')
|
u'lib', u'pptviewlib')
|
||||||
|
|
||||||
@ -172,7 +179,7 @@ def run_pyinstaller():
|
|||||||
pyinstaller = Popen((python_exe, pyi_build,
|
pyinstaller = Popen((python_exe, pyi_build,
|
||||||
u'--noconfirm',
|
u'--noconfirm',
|
||||||
u'--windowed',
|
u'--windowed',
|
||||||
u'-o', build_path,
|
u'-o', branch_path,
|
||||||
u'-i', win32_icon,
|
u'-i', win32_icon,
|
||||||
u'-p', branch_path,
|
u'-p', branch_path,
|
||||||
u'-n', 'OpenLP',
|
u'-n', 'OpenLP',
|
||||||
@ -319,17 +326,19 @@ def main():
|
|||||||
import sys
|
import sys
|
||||||
for arg in sys.argv:
|
for arg in sys.argv:
|
||||||
if arg == u'-v' or arg == u'--verbose':
|
if arg == u'-v' or arg == u'--verbose':
|
||||||
print "Script path:", script_path
|
print "OpenLP main script: ......", openlp_main_script
|
||||||
print "Branch path:", branch_path
|
print "Script path: .............", script_path
|
||||||
print "Source path:", source_path
|
print "Branch path: .............", branch_path
|
||||||
print "\"dist\" path:", dist_path
|
print "Source path: .............", source_path
|
||||||
print "PyInstaller:", pyi_build
|
print "\"dist\" path: .............", dist_path
|
||||||
|
print "PyInstaller: .............", pyi_build
|
||||||
print "Documentation branch path:", doc_branch_path
|
print "Documentation branch path:", doc_branch_path
|
||||||
print "Help file build path;", helpfile_path
|
print "Help file build path: ....", helpfile_path
|
||||||
print "Inno Setup path:", innosetup_exe
|
print "Inno Setup path: .........", innosetup_exe
|
||||||
print "Windows resources:", winres_path
|
print "Windows resources: .......", winres_path
|
||||||
print "VCBuild path:", vcbuild_exe
|
print "VCBuild path: ............", vcbuild_exe
|
||||||
print "PPTVIEWLIB path:", pptviewlib_path
|
print "PPTVIEWLIB path: .........", pptviewlib_path
|
||||||
|
print ""
|
||||||
elif arg == u'--skip-update':
|
elif arg == u'--skip-update':
|
||||||
skip_update = True
|
skip_update = True
|
||||||
elif arg == u'/?' or arg == u'-h' or arg == u'--help':
|
elif arg == u'/?' or arg == u'-h' or arg == u'--help':
|
||||||
|
Loading…
Reference in New Issue
Block a user