diff --git a/builders/windows-builder.py b/builders/windows-builder.py index 7cb1b84..0d1d78f 100644 --- a/builders/windows-builder.py +++ b/builders/windows-builder.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- -# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 +# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4 ############################################################################### # OpenLP - Open Source Lyrics Projection # # --------------------------------------------------------------------------- # -# Copyright (c) 2004-2016 OpenLP Developers # +# Copyright (c) OpenLP Developers # # --------------------------------------------------------------------------- # # This program is free software; you can redistribute it and/or modify it # # under the terms of the GNU General Public License as published by the Free # @@ -36,6 +36,10 @@ PyEnchant This script expects the precompiled, installable version of PyEnchant to be installed. You can find this on the PyEnchant site. +WiX Toolset + The toolset should be installed into "C:\\%PROGRAMFILES%\\WiX Toolset v3.11" + or similar. + Sphinx This is used to build the documentation. The documentation trunk must be at the same directory level as OpenLP trunk and named "documentation". @@ -148,9 +152,9 @@ class WindowsBuilder(Builder): parent_dir['__dir__'].append(element) for fname in files: source = os.path.join(path, fname) if path else fname - source = source.replace('-', '_').replace(os.sep, '_') - file_id = 'file_{source}'.format(source=source) - component_id = 'cmp_{source}'.format(source=source) + source_id = source.replace('-', '_').replace(os.sep, '_') + file_id = 'file_{source_id}'.format(source_id=source_id) + component_id = 'cmp_{source_id}'.format(source_id=source_id) file_ = E.File(Id=file_id, KeyPath="yes", Source=source) component = E.Component(file_, Id=component_id, Guid='*') element.append(component) @@ -171,8 +175,9 @@ class WindowsBuilder(Builder): with open(os.path.join(config_dir, 'OpenLP-base.wxs'), 'rt') as base_file: xml = base_file.read() xml = xml % dict(dialog=os.path.join(config_dir, 'WizardMain.bmp'), - banner=os.path.join(config_dir, 'WizardBanner.bmp')) - tree = fromstring(xml) + banner=os.path.join(config_dir, 'WizardBanner.bmp'), + platform=self.arch) + tree = fromstring(xml.encode('utf8')) self._print_verbose('Creating XML fragments from files and directories') fragments = self._get_fragments_from_files(self.dist_path) self._print_verbose('Inserting XML fragments into base WiX file') diff --git a/windows/OpenLP-base.wxs b/windows/OpenLP-base.wxs index ffda505..b612e82 100644 --- a/windows/OpenLP-base.wxs +++ b/windows/OpenLP-base.wxs @@ -5,7 +5,7 @@ UpgradeCode="{8C5881AC-8F1E-4937-BB99-B823FABF18F0}" Language="1033" Codepage="1252" Version="2.5.0"> + InstallerVersion="251" Languages="1033" Compressed="yes" SummaryCodepage="1252" Platform="%(platform)s"/> Privileged @@ -24,8 +24,12 @@ - - + + + + + +