openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #33526
[Merge] lp:~tomasgroth/openlp/packaging-qt-translations into lp:openlp/packaging
Tomas Groth has proposed merging lp:~tomasgroth/openlp/packaging-qt-translations into lp:openlp/packaging.
Commit message:
Fix copying Qt translations on windows and add x86 or x64 to the windows installer files.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~tomasgroth/openlp/packaging-qt-translations/+merge/364185
--
Your team OpenLP Core is requested to review the proposed merge of lp:~tomasgroth/openlp/packaging-qt-translations into lp:openlp/packaging.
=== modified file 'builders/windows-builder.py'
--- builders/windows-builder.py 2019-03-05 19:55:59 +0000
+++ builders/windows-builder.py 2019-03-08 21:23:17 +0000
@@ -134,6 +134,7 @@
content = input_file.read()
content = content.replace('%(branch)s', self.branch_path)
content = content.replace('%(display_version)s', self.version.replace('-bzr', '.'))
+ content = content.replace('%(arch)s', self.arch)
output_file.write(content)
def _run_innosetup(self):
@@ -176,6 +177,7 @@
content = input_file.read()
content = content.replace('%(display_version)s', self.portable_version)
content = content.replace('%(package_version)s', self.portable_version)
+ content = content.replace('%(arch)s', self.arch)
output_file.write(content)
def _run_portableapp_builder(self):
@@ -252,7 +254,7 @@
"""
Return the path to Qt translation files on macOS
"""
- return os.path.join(self.site_packages, 'PyQt5', 'translations')
+ return os.path.join(self.site_packages, 'PyQt5', 'Qt', 'translations')
def add_extra_args(self, parser):
"""
@@ -285,6 +287,13 @@
self.helpfile_path = os.path.join(self.manual_build_path, 'htmlhelp')
self.winres_path = os.path.join(self.branch_path, 'resources', 'windows')
+ def setup_extra(self):
+ """
+ Extra setup to run
+ """
+ # Detect python instance bit size
+ self.arch = 'x86' if sys.maxsize == 0x7fffffff else 'x64'
+
def copy_extra_files(self):
"""
Copy all the Windows-specific files.
@@ -334,9 +343,8 @@
Return a list of any extra parameters we wish to use
"""
parameters = []
- # Detect python instance bit size
- arch = 'x86' if sys.maxsize == 0x7fffffff else 'x64'
- dll_path = '{pf}\\Windows Kits\\10\\Redist\\ucrt\\DLLs\\{arch}\\*.dll'.format(pf=self.program_files, arch=arch)
+ dll_path = '{pf}\\Windows Kits\\10\\Redist\\ucrt\\DLLs\\{arch}\\*.dll'.format(pf=self.program_files,
+ arch=self.arch)
# Finds the UCRT DDLs available from the Windows 10 SDK
for binary in glob.glob(dll_path):
parameters.append('--add-binary')
=== modified file 'windows/OpenLP.iss.default'
--- windows/OpenLP.iss.default 2015-10-13 12:13:29 +0000
+++ windows/OpenLP.iss.default 2019-03-08 21:23:17 +0000
@@ -7,6 +7,7 @@
#define AppPublisher "OpenLP Developers"
#define AppURL "http://openlp.org/"
#define AppExeName "OpenLP.exe"
+#define Arch "%(arch)"
#define FileHandle FileOpen("%(branch)s\dist\OpenLP\.version")
#define FileLine FileRead(FileHandle)
@@ -30,7 +31,7 @@
AllowNoIcons=true
LicenseFile=LICENSE.txt
OutputDir=%(branch)s\dist\
-OutputBaseFilename=OpenLP-{#RealVersion}-setup
+OutputBaseFilename=OpenLP-{#RealVersion}-{#Arch}-setup
Compression=lzma/Max
SolidCompression=true
SetupIconFile=OpenLP.ico
=== modified file 'windows/appinfo.ini.default'
--- windows/appinfo.ini.default 2012-06-25 16:38:21 +0000
+++ windows/appinfo.ini.default 2019-03-08 21:23:17 +0000
@@ -18,8 +18,8 @@
CommercialUse=true
[Version]
-DisplayVersion=%(display_version)s
-PackageVersion=%(package_version)s
+DisplayVersion=%(display_version)s-%(arch)s
+PackageVersion=%(package_version)s-%(arch)s
[Control]
Icons=1
Follow ups