From b5b2b358a6c0b52ab3976c53571e3b82d0c0da8c Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Tue, 29 Nov 2016 14:38:50 +0100 Subject: [PATCH] Added mediainfo support in packaging --- windows/config-appveyor.ini | 3 ++- windows/config.ini.default | 3 ++- windows/windows-builder.py | 38 ++++++++++++++++++++----------------- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/windows/config-appveyor.ini b/windows/config-appveyor.ini index 9fadf3d..73f548b 100644 --- a/windows/config-appveyor.ini +++ b/windows/config-appveyor.ini @@ -8,7 +8,8 @@ psvince = %(here)s\psvince.dll lrelease = %(sitepackages)s\PyQt5\bin\lrelease.exe portablelauncher = %(here)s\..\..\PortableApps.comLauncher\PortableApps.comLauncherGenerator.exe portableinstaller = %(here)s\..\..\PortableApps.comInstaller\PortableApps.comInstaller.exe -mudrawbin = %(here)s\..\mupdf-1.9a-windows\mutools.exe +mutoolbin = %(here)s\..\..\mupdf-1.9a-windows\mutool.exe +mediainfobin = %(here)s\..\..\MediaInfo\MediaInfo.exe [paths] branch = %(projects)s\trunk diff --git a/windows/config.ini.default b/windows/config.ini.default index 7530908..04c786b 100644 --- a/windows/config.ini.default +++ b/windows/config.ini.default @@ -8,7 +8,8 @@ psvince = %(here)s\psvince.dll 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.8-windows\mudraw.exe +mutoolbin = %(here)s\..\mupdf-1.9a-windows\mutool.exe +mediainfobin = %(here)s\..\MediaInfo\MediaInfo.exe [paths] branch = %(projects)s\trunk diff --git a/windows/windows-builder.py b/windows/windows-builder.py index 6ac1f66..ba6b994 100755 --- a/windows/windows-builder.py +++ b/windows/windows-builder.py @@ -49,9 +49,8 @@ HTML Help Workshop This is used to create the help file. PyInstaller - PyInstaller should be a git clone of either - https://github.com/matysek/pyinstaller branch python3 or - https://github.com/pyinstaller/pyinstaller branch python3 + PyInstaller should be a git clone of + https://github.com/matysek/pyinstaller branch develop Bazaar You need the command line "bzr" client installed. @@ -86,16 +85,15 @@ Mako http://www.makotemplates.org/download.html -SQLAlchemy Migrate - Required for the databases used in OpenLP. The package can be - obtained here: - - http://code.google.com/p/sqlalchemy-migrate/ - MuPDF Required for PDF support in OpenLP. Download the windows build from - mupdf.com, extract it, and set the mudrawbin option in the config file to - point to mudraw.exe + mupdf.com, extract it, and set the mutoolbin option in the config file to + point to mutool.exe. + +MediaInfo + Required for the media plugin. Download the 32-bit CLI windows build from + https://mediaarea.net/nn/MediaInfo/Download/Windows and set the + mediainfobin option in the config file to point to MediaInfo.exe. Portable App Builds The following are required if you are planning to make a portable build of @@ -212,7 +210,8 @@ class WindowsBuilder(object): self.psvince = os.path.abspath(self.config.get('executables', 'psvince')) 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')) + self.mutool_bin = os.path.abspath(self.config.get('executables', 'mutoolbin')) + self.mediainfo_bin = os.path.abspath(self.config.get('executables', 'mediainfobin')) 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 @@ -405,11 +404,16 @@ class WindowsBuilder(object): copy(os.path.join(self.helpfile_path, 'OpenLP.chm'), os.path.join(self.dist_path, 'OpenLP.chm')) else: self._print('... WARNING: Windows help file not found') - self._print_verbose('... mudraw.exe') - if self.mudraw_bin and os.path.isfile(self.mudraw_bin): - copy(os.path.join(self.mudraw_bin), os.path.join(self.dist_path, 'mudraw.exe')) + self._print_verbose('... mutool.exe') + if self.mutool_bin and os.path.isfile(self.mutool_bin): + copy(os.path.join(self.mutool_bin), os.path.join(self.dist_path, 'mutool.exe')) else: - self._print('... WARNING: mudraw.exe not found') + self._print('... WARNING: mutool.exe not found') + self._print_verbose('... MediaInfo.exe') + if self.mediainfo_bin and os.path.isfile(self.mediainfo_bin): + copy(os.path.join(self.mediainfo_bin), os.path.join(self.dist_path, 'MediaInfo.exe')) + else: + self._print('... WARNING: MediaInfo.exe not found') def update_translations(self): """ @@ -616,7 +620,7 @@ class WindowsBuilder(object): self._print_verbose('Windows resources: .......%s', self.winres_path) self._print_verbose('VCBuild path: ............%s', self.vcbuild) self._print_verbose('PPTVIEWLIB path: .........%s', self.pptviewlib_path) - self._print_verbose('Mudraw binary ............%s', self.mudraw_bin) + self._print_verbose('Mutool binary ............%s', self.mutool_bin) self._print_verbose('') if not self.args.skip_update: self.update_code()