Update windows building for qt5.

bzr-revno: 29
This commit is contained in:
second@tgc.dk 2016-01-05 21:14:09 +01:00 committed by Tomas Groth
commit 6f227290d5
2 changed files with 10 additions and 10 deletions

View File

@ -5,10 +5,10 @@ pyinstaller = %(here)s\..\pyinstaller\pyinstaller.py
vcbuild = %(progfiles)s\Microsoft Visual Studio 9.0\VC\vcpackages\vcbuild.exe
htmlhelp = %(progfiles)s\HTML Help Workshop\hhc.exe
psvince = %(here)s\psvince.dll
lrelease = %(sitepackages)s\PyQt4\bin\lrelease.exe
lrelease = %(sitepackages)s\PyQt5\bin\lrelease.exe
portablelauncher = %(progfiles)s\PortableApps.comLauncher\PortableApps.comLauncherGenerator.exe
portableinstaller = %(progfiles)s\PortableApps.comInstaller\PortableApps.comInstaller.exe
mudrawbin = %(here)s\..\mupdf-1.5-windows\mudraw.exe
mudrawbin = %(here)s\..\mupdf-1.8-windows\mudraw.exe
[paths]
branch = %(projects)s\trunk

16
windows/windows-builder.py Normal file → Executable file
View File

@ -27,9 +27,9 @@ Windows Build Script
This script is used to build the Windows binary and the accompanying installer.
For this script to work out of the box, it depends on a number of things:
Python 3.3/3.4
Python 3.4
PyQt4
PyQt5
You should already have this installed, OpenLP doesn't work without it. The
version the script expects is the packaged one available from River Bank
Computing.
@ -213,14 +213,14 @@ class WindowsBuilder(object):
self.portableinstaller = os.path.abspath(self.config.get('executables', 'portableinstaller'))
self.portablelauncher = os.path.abspath(self.config.get('executables', 'portablelauncher'))
self.mudraw_bin = os.path.abspath(self.config.get('executables', 'mudrawbin'))
if os.path.exists(os.path.join(self.site_packages, 'PyQt4', 'bin')):
# Older versions of the PyQt4 Windows installer put their binaries
if os.path.exists(os.path.join(self.site_packages, 'PyQt5', 'bin')):
# Older versions of the PyQt5 Windows installer put their binaries
# in the "bin" directory
self.lrelease = os.path.join(self.site_packages, 'PyQt4', 'bin', 'lrelease.exe')
self.lrelease = os.path.join(self.site_packages, 'PyQt5', 'bin', 'lrelease.exe')
else:
# Newer versions of the PyQt4 Windows installer put their binaries
# Newer versions of the PyQt5 Windows installer put their binaries
# in the base directory of the installation
self.lrelease = os.path.join(self.site_packages, 'PyQt4', 'lrelease.exe')
self.lrelease = os.path.join(self.site_packages, 'PyQt5', 'lrelease.exe')
def setup_paths(self):
"""
@ -448,7 +448,7 @@ class WindowsBuilder(object):
if code != 0:
raise Exception('Error running lconvert on %s' % source_path)
self._print('Copying qm files...')
source = os.path.join(self.site_packages, 'PyQt4', 'translations')
source = os.path.join(self.site_packages, 'PyQt5', 'translations')
files = os.listdir(source)
for filename in files:
if filename.startswith('qt_') and filename.endswith('.qm') and len(filename) == 8: