Merge lp:~tomasgroth/openlp/packaging-qt-translations into lp:openlp/packaging

Proposed by Tomas Groth
Status: Merged
Merged at revision: 42
Proposed branch: lp:~tomasgroth/openlp/packaging-qt-translations
Merge into: lp:openlp/packaging
Diff against target: 90 lines (+16/-7)
3 files modified
builders/windows-builder.py (+12/-4)
windows/OpenLP.iss.default (+2/-1)
windows/appinfo.ini.default (+2/-2)
To merge this branch: bzr merge lp:~tomasgroth/openlp/packaging-qt-translations
Reviewer Review Type Date Requested Status
Raoul Snyman Approve
Tim Bentley Approve
Review via email: mp+364185@code.launchpad.net

Commit message

Fix copying Qt translations on windows and add x86 or x64 to the windows installer files.

To post a comment you must log in.
Revision history for this message
Tim Bentley (trb143) :
review: Approve
Revision history for this message
Raoul Snyman (raoul-snyman) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'builders/windows-builder.py'
2--- builders/windows-builder.py 2019-03-05 19:55:59 +0000
3+++ builders/windows-builder.py 2019-03-08 21:23:17 +0000
4@@ -134,6 +134,7 @@
5 content = input_file.read()
6 content = content.replace('%(branch)s', self.branch_path)
7 content = content.replace('%(display_version)s', self.version.replace('-bzr', '.'))
8+ content = content.replace('%(arch)s', self.arch)
9 output_file.write(content)
10
11 def _run_innosetup(self):
12@@ -176,6 +177,7 @@
13 content = input_file.read()
14 content = content.replace('%(display_version)s', self.portable_version)
15 content = content.replace('%(package_version)s', self.portable_version)
16+ content = content.replace('%(arch)s', self.arch)
17 output_file.write(content)
18
19 def _run_portableapp_builder(self):
20@@ -252,7 +254,7 @@
21 """
22 Return the path to Qt translation files on macOS
23 """
24- return os.path.join(self.site_packages, 'PyQt5', 'translations')
25+ return os.path.join(self.site_packages, 'PyQt5', 'Qt', 'translations')
26
27 def add_extra_args(self, parser):
28 """
29@@ -285,6 +287,13 @@
30 self.helpfile_path = os.path.join(self.manual_build_path, 'htmlhelp')
31 self.winres_path = os.path.join(self.branch_path, 'resources', 'windows')
32
33+ def setup_extra(self):
34+ """
35+ Extra setup to run
36+ """
37+ # Detect python instance bit size
38+ self.arch = 'x86' if sys.maxsize == 0x7fffffff else 'x64'
39+
40 def copy_extra_files(self):
41 """
42 Copy all the Windows-specific files.
43@@ -334,9 +343,8 @@
44 Return a list of any extra parameters we wish to use
45 """
46 parameters = []
47- # Detect python instance bit size
48- arch = 'x86' if sys.maxsize == 0x7fffffff else 'x64'
49- dll_path = '{pf}\\Windows Kits\\10\\Redist\\ucrt\\DLLs\\{arch}\\*.dll'.format(pf=self.program_files, arch=arch)
50+ dll_path = '{pf}\\Windows Kits\\10\\Redist\\ucrt\\DLLs\\{arch}\\*.dll'.format(pf=self.program_files,
51+ arch=self.arch)
52 # Finds the UCRT DDLs available from the Windows 10 SDK
53 for binary in glob.glob(dll_path):
54 parameters.append('--add-binary')
55
56=== modified file 'windows/OpenLP.iss.default'
57--- windows/OpenLP.iss.default 2015-10-13 12:13:29 +0000
58+++ windows/OpenLP.iss.default 2019-03-08 21:23:17 +0000
59@@ -7,6 +7,7 @@
60 #define AppPublisher "OpenLP Developers"
61 #define AppURL "http://openlp.org/"
62 #define AppExeName "OpenLP.exe"
63+#define Arch "%(arch)"
64
65 #define FileHandle FileOpen("%(branch)s\dist\OpenLP\.version")
66 #define FileLine FileRead(FileHandle)
67@@ -30,7 +31,7 @@
68 AllowNoIcons=true
69 LicenseFile=LICENSE.txt
70 OutputDir=%(branch)s\dist\
71-OutputBaseFilename=OpenLP-{#RealVersion}-setup
72+OutputBaseFilename=OpenLP-{#RealVersion}-{#Arch}-setup
73 Compression=lzma/Max
74 SolidCompression=true
75 SetupIconFile=OpenLP.ico
76
77=== modified file 'windows/appinfo.ini.default'
78--- windows/appinfo.ini.default 2012-06-25 16:38:21 +0000
79+++ windows/appinfo.ini.default 2019-03-08 21:23:17 +0000
80@@ -18,8 +18,8 @@
81 CommercialUse=true
82
83 [Version]
84-DisplayVersion=%(display_version)s
85-PackageVersion=%(package_version)s
86+DisplayVersion=%(display_version)s-%(arch)s
87+PackageVersion=%(package_version)s-%(arch)s
88
89 [Control]
90 Icons=1

Subscribers

People subscribed via source and target branches