openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #07738
[Merge] lp:~raoul-snyman/openlp/windows-updates into lp:openlp
Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/windows-updates into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/windows-updates/+merge/56052
Get the Windows builder to create an HTML Help file too.
--
https://code.launchpad.net/~raoul-snyman/openlp/windows-updates/+merge/56052
Your team OpenLP Core is requested to review the proposed merge of lp:~raoul-snyman/openlp/windows-updates into lp:openlp.
=== modified file 'resources/windows/OpenLP-2.0.iss'
--- resources/windows/OpenLP-2.0.iss 2011-03-18 16:26:17 +0000
+++ resources/windows/OpenLP-2.0.iss 2011-04-02 20:22:25 +0000
@@ -69,6 +69,7 @@
[Icons]
Name: {group}\{#AppName}; Filename: {app}\{#AppExeName}
Name: {group}\{#AppName} (Debug); Filename: {app}\{#AppExeName}; Parameters: -l debug
+Name: {group}\{#AppName} Help; Filename: {app}\{#AppName}.chm
Name: {group}\{cm:ProgramOnTheWeb,{#AppName}}; Filename: {#AppURL}
Name: {group}\{cm:UninstallProgram,{#AppName}}; Filename: {uninstallexe}
Name: {commondesktop}\{#AppName}; Filename: {app}\{#AppExeName}; Tasks: desktopicon
=== modified file 'scripts/windows-builder.py'
--- scripts/windows-builder.py 2011-03-24 19:04:02 +0000
+++ scripts/windows-builder.py 2011-04-02 20:22:25 +0000
@@ -94,6 +94,10 @@
python_exe = sys.executable
innosetup_exe = os.path.join(os.getenv(u'PROGRAMFILES'), 'Inno Setup 5',
u'ISCC.exe')
+sphinx_exe = os.path.join(os.path.split(python_exe)[0], u'Scripts',
+ u'sphinx-build.exe')
+hhc_exe = os.path.join(os.getenv(u'PROGRAMFILES'), 'HTML Help Workshop',
+ u'hhc.exe')
# Base paths
script_path = os.path.split(os.path.abspath(__file__))[0]
@@ -109,6 +113,7 @@
# Paths
source_path = os.path.join(branch_path, u'openlp')
+manual_path = os.path.join(branch_path, u'documentation', u'manual')
i18n_path = os.path.join(branch_path, u'resources', u'i18n')
winres_path = os.path.join(branch_path, u'resources', u'windows')
build_path = os.path.join(branch_path, u'build', u'pyi.win32', u'OpenLP')
@@ -132,21 +137,6 @@
print output
raise Exception(u'Error updating the code')
-def clean_build_directories():
- dist_dir = os.path.join(build_path, u'dist')
- build_dir = os.path.join(build_path, u'build')
- if os.path.exists(dist_dir):
- for root, dirs, files in os.walk(dist_dir, topdown=False):
- print root
- for file in files:
- os.remove(os.path.join(root, file))
- os.removedirs(dist_dir)
- if os.path.exists(build_dir):
- for root, dirs, files in os.walk(build_dir, topdown=False):
- for file in files:
- os.remove(os.path.join(root, file))
- os.removedirs(build_dir)
-
def run_pyinstaller():
print u'Running PyInstaller...'
os.chdir(branch_path)
@@ -240,6 +230,31 @@
if code != 0:
raise Exception('Error running lconvert on %s' % source_path)
+def run_sphinx():
+ print u'Running Sphinx...'
+ os.chdir(manual_path)
+ sphinx = Popen((sphinx_exe, u'-b', u'htmlhelp', u'-d', u'build/doctrees',
+ u'source', u'build/htmlhelp'), stdout=PIPE)
+ output, error = sphinx.communicate()
+ code = sphinx.wait()
+ if code != 0:
+ print output
+ raise Exception(u'Error running Sphinx')
+
+def run_htmlhelp():
+ print u'Running HTML Help Workshop...'
+ os.chdir(os.path.join(manual_path, u'build', u'htmlhelp'))
+ hhc = Popen((hhc_exe, u'OpenLP.chm'), stdout=PIPE)
+ output, error = hhc.communicate()
+ code = hhc.wait()
+ if code != 1:
+ print u'Exit code:', code
+ print output
+ raise Exception(u'Error running HTML Help Workshop')
+ else:
+ copy(os.path.join(manual_path, u'build', 'htmlhelp', u'OpenLP.chm'),
+ os.path.join(dist_path, u'OpenLP.chm'))
+
def run_innosetup():
print u'Running Inno Setup...'
os.chdir(winres_path)
@@ -260,7 +275,6 @@
print "Inno Setup path:", innosetup_path
print "Windows resources:", winres_path
update_code()
- #clean_build_directories()
run_pyinstaller()
write_version_file()
copy_enchant()
@@ -268,6 +282,8 @@
copy_windows_files()
update_translations()
compile_translations()
+ run_sphinx()
+ run_htmlhelp()
run_innosetup()
print "Done."
Follow ups