forked from openlp/openlp
Some more tweaks and fixes to the Windows builder script.
bzr-revno: 828
This commit is contained in:
commit
a379de3ec5
@ -1 +0,0 @@
|
||||
hiddenimports = ['lxml.etree']
|
@ -28,11 +28,48 @@ Windows Build Script
|
||||
--------------------
|
||||
|
||||
This script is used to build the Windows binary and the accompanying installer.
|
||||
For this script to work out of the box, it depends on a number of things:
|
||||
|
||||
Inno Setup 5
|
||||
Inno Setup should be installed into "C:\%PROGRAMFILES%\Inno Setup 5"
|
||||
|
||||
UPX
|
||||
This is used to compress DLLs and EXEs so that they take up less space, but
|
||||
still function exactly the same. To install UPS, download it from
|
||||
http://upx.sourceforge.net/, extract it into C:\%PROGRAMFILES%\UPX, and then
|
||||
add that directory to your PATH environment variable.
|
||||
|
||||
PyInstaller
|
||||
PyInstaller should be a checkout of trunk, and in a directory called,
|
||||
"pyinstaller" on the same level as OpenLP's Bazaar shared repository
|
||||
directory.
|
||||
|
||||
To install PyInstaller, first checkout trunk from Subversion. The easiest
|
||||
way is to install TortoiseSVN and then checkout the following URL to a
|
||||
directory called "pyinstaller"::
|
||||
|
||||
http://svn.pyinstaller.org/trunk
|
||||
|
||||
Then you need to copy the two hook-*.py files from the "pyinstaller"
|
||||
subdirectory in OpenLP's "resources" directory into PyInstaller's "hooks"
|
||||
directory.
|
||||
|
||||
Once you've done that, open a command prompt (DOS shell), navigate to the
|
||||
PyInstaller directory and run::
|
||||
|
||||
C:\Projects\pyinstaller>python Configure.py
|
||||
|
||||
Bazaar
|
||||
You need the command line "bzr" client installed.
|
||||
|
||||
OpenLP
|
||||
A checkout of the latest code, in a branch directory, which is in a Bazaar
|
||||
shared repository directory. This means your code should be in a directory
|
||||
structure like this: "openlp\branch-name".
|
||||
|
||||
windows-builder.py
|
||||
This script, of course. It should be in the "scripts" directory of OpenLP.
|
||||
|
||||
For this script to work out of the box, it depends on being inside the
|
||||
"resources/pyinstaller" directory in the OpenLP source tree, it depends on
|
||||
OpenLP having it's own project directory which all the branches live in, and it
|
||||
depends on PyInstaller being
|
||||
"""
|
||||
|
||||
import os
|
||||
@ -40,12 +77,12 @@ from shutil import copy
|
||||
from subprocess import Popen, PIPE
|
||||
|
||||
script_path = os.path.split(os.path.abspath(__file__))[0]
|
||||
pyinstaller_path = os.path.abspath(os.path.join(script_path, u'..', u'..', u'..', u'..', u'pyinstaller'))
|
||||
innosetup_path = os.path.join(os.getenv(u'PROGRAMFILES'), 'Inno Setup 5')
|
||||
iss_path = os.path.abspath(os.path.join(script_path, u'..', u'innosetup'))
|
||||
branch_path = os.path.abspath(os.path.join(script_path, u'..', u'..'))
|
||||
branch_path = os.path.abspath(os.path.join(script_path, u'..'))
|
||||
source_path = os.path.join(branch_path, u'openlp')
|
||||
dist_path = os.path.join(branch_path, u'dist', u'OpenLP')
|
||||
pyinstaller_path = os.path.abspath(os.path.join(branch_path, u'..', u'..', u'pyinstaller'))
|
||||
innosetup_path = os.path.join(os.getenv(u'PROGRAMFILES'), 'Inno Setup 5')
|
||||
iss_path = os.path.join(branch_path, u'resources', u'innosetup')
|
||||
|
||||
|
||||
def run_pyinstaller():
|
||||
@ -113,12 +150,12 @@ def run_innosetup():
|
||||
|
||||
def main():
|
||||
print "Script path:", script_path
|
||||
print "PyInstaller path:", pyinstaller_path
|
||||
print "Inno Setup path:", innosetup_path
|
||||
print "ISS file path:", iss_path
|
||||
print "Branch path:", branch_path
|
||||
print "Source path:", source_path
|
||||
print "\"dist\" path:", dist_path
|
||||
print "PyInstaller path:", pyinstaller_path
|
||||
print "Inno Setup path:", innosetup_path
|
||||
print "ISS file path:", iss_path
|
||||
run_pyinstaller()
|
||||
write_version_file()
|
||||
copy_plugins()
|
Loading…
Reference in New Issue
Block a user