From 81eee2b9895bf5d353e38899a826f82f93dd391d Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 23 Feb 2019 17:16:41 +0100 Subject: [PATCH] windows: Bring back 32-bit support Qt 5.12 brought back 32-bit Windows releases for QtWebEngine. Reverts 0af8eec73a8a4290b0a0348f3ad8d8295e17deaa Reverts 7a9183d0b718c158dd0bbe456a72623f1e69d5b8 Fixes #4598 --- scripts/dev/build_release.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/scripts/dev/build_release.py b/scripts/dev/build_release.py index cc6bf9822..6c040c203 100755 --- a/scripts/dev/build_release.py +++ b/scripts/dev/build_release.py @@ -218,7 +218,17 @@ def build_windows(): except FileNotFoundError: python_x64 = r'C:\Python{}\python.exe'.format(ver) + try: + reg32_key = winreg.OpenKeyEx(winreg.HKEY_LOCAL_MACHINE, + r'SOFTWARE\WOW6432Node\Python\PythonCore' + r'\{}-32\InstallPath'.format(dot_ver)) + python_x86 = winreg.QueryValueEx(reg32_key, 'ExecutablePath')[0] + except FileNotFoundError: + python_x86 = r'C:\Python{}-32\python.exe'.format(ver) + out_pyinstaller = os.path.join('dist', 'qutebrowser') + out_32 = os.path.join('dist', + 'qutebrowser-{}-x86'.format(qutebrowser.__version__)) out_64 = os.path.join('dist', 'qutebrowser-{}-x64'.format(qutebrowser.__version__)) @@ -228,28 +238,51 @@ def build_windows(): utils.print_title("Updating VersionInfo file") gen_versioninfo.main() + utils.print_title("Running pyinstaller 32bit") + _maybe_remove(out_32) + call_tox('pyinstaller', '-r', python=python_x86) + shutil.move(out_pyinstaller, out_32) + utils.print_title("Running pyinstaller 64bit") _maybe_remove(out_64) call_tox('pyinstaller', '-r', python=python_x64) shutil.move(out_pyinstaller, out_64) + utils.print_title("Running 32bit smoke test") + smoke_test(os.path.join(out_32, 'qutebrowser.exe')) utils.print_title("Running 64bit smoke test") smoke_test(os.path.join(out_64, 'qutebrowser.exe')) utils.print_title("Building installers") + subprocess.run(['makensis.exe', + '/DVERSION={}'.format(qutebrowser.__version__), + 'misc/qutebrowser.nsi'], check=True) subprocess.run(['makensis.exe', '/DX64', '/DVERSION={}'.format(qutebrowser.__version__), 'misc/qutebrowser.nsi'], check=True) + name_32 = 'qutebrowser-{}-win32.exe'.format(qutebrowser.__version__) name_64 = 'qutebrowser-{}-amd64.exe'.format(qutebrowser.__version__) artifacts += [ + (os.path.join('dist', name_32), + 'application/vnd.microsoft.portable-executable', + 'Windows 32bit installer'), (os.path.join('dist', name_64), 'application/vnd.microsoft.portable-executable', 'Windows 64bit installer'), ] + + utils.print_title("Zipping 32bit standalone...") + name = 'qutebrowser-{}-windows-standalone-win32'.format( + qutebrowser.__version__) + shutil.make_archive(name, 'zip', 'dist', os.path.basename(out_32)) + artifacts.append(('{}.zip'.format(name), + 'application/zip', + 'Windows 32bit standalone')) + utils.print_title("Zipping 64bit standalone...") name = 'qutebrowser-{}-windows-standalone-amd64'.format( qutebrowser.__version__)