mirror of
https://gitlab.com/openlp/packaging.git
synced 2024-12-22 04:52:50 +00:00
Fix copying Qt translations and add x86 or x64 to the bundled files.
This commit is contained in:
parent
b32cc6d693
commit
39a14d029d
@ -134,6 +134,7 @@ class WindowsBuilder(Builder):
|
||||
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 @@ class WindowsBuilder(Builder):
|
||||
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 @@ class WindowsBuilder(Builder):
|
||||
"""
|
||||
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 @@ class WindowsBuilder(Builder):
|
||||
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 @@ class WindowsBuilder(Builder):
|
||||
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')
|
||||
|
@ -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 @@ DefaultGroupName={#AppName}
|
||||
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
|
||||
|
@ -18,8 +18,8 @@ Freeware=true
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user