diff --git a/builders/builder.py b/builders/builder.py index 6aec400..d740e16 100644 --- a/builders/builder.py +++ b/builders/builder.py @@ -262,6 +262,12 @@ class Builder(object): self._bzr('export', self.branch_path, ['-r', 'tag:' + self.version, self.work_path], 'Error exporting the code') + def get_binaries(self): + """ + Return a list of the binaries to include + """ + return [] + def run_pyinstaller(self): """ Run PyInstaller on the branch to build an executable. @@ -269,6 +275,7 @@ class Builder(object): self._print('Running PyInstaller...') copy(os.path.join(self.work_path, 'openlp.py'), self.openlp_script) os.chdir(self.work_path) + # Create the binary list cmd = [self.python, self.pyinstaller_exe, '--clean', @@ -279,6 +286,7 @@ class Builder(object): '--runtime-hook', os.path.join(self.hooks_path, 'rthook_ssl.py'), '-i', self.icon_path, '-n', 'OpenLP', + *get_binaries(), # Adds any binaries we wish to include self.openlp_script] if self.args.verbose: cmd.append('--log-level=DEBUG') diff --git a/builders/windows-builder.py b/builders/windows-builder.py index a0086f3..5b873a9 100644 --- a/builders/windows-builder.py +++ b/builders/windows-builder.py @@ -26,12 +26,11 @@ 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.4 +Python 3.6 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. + version the script expects is the packaged one available from pypi. PyEnchant This script expects the precompiled, installable version of PyEnchant to be @@ -48,8 +47,7 @@ HTML Help Workshop This is used to create the help file. PyInstaller - PyInstaller should be a git clone of - https://github.com/matysek/pyinstaller branch develop + PyInstaller can be installed from pypi. Bazaar You need the command line "bzr" client installed. @@ -340,6 +338,16 @@ class WindowsBuilder(Builder): if self.args.portable: self._run_portableapp_builder() + def get_binaries(self): + """ + Return a list of the binaries to include + """ + binaries = [] + for binary in glob.glob('C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86\*.dll'): + binaries.append('--add-binary') + binaries.append(binary + ";.") + return binaries + if __name__ == '__main__': WindowsBuilder().main()