From 846bd214ffdcfcdc7db8e979f0d5432828a12732 Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Sun, 3 Jan 2016 22:10:14 +0100 Subject: [PATCH] Update windows building for qt5 --- windows/config.ini.default | 4 ++-- windows/windows-builder.py | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) mode change 100644 => 100755 windows/windows-builder.py diff --git a/windows/config.ini.default b/windows/config.ini.default index 6bc1b97..7530908 100644 --- a/windows/config.ini.default +++ b/windows/config.ini.default @@ -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 diff --git a/windows/windows-builder.py b/windows/windows-builder.py old mode 100644 new mode 100755 index 7f366b3..6ac1f66 --- a/windows/windows-builder.py +++ b/windows/windows-builder.py @@ -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: