windows: Bring back 32-bit support

Qt 5.12 brought back 32-bit Windows releases for QtWebEngine.

Reverts 0af8eec73a
Reverts 7a9183d0b7
Fixes #4598
This commit is contained in:
Florian Bruhin 2019-02-23 17:16:41 +01:00
parent 7406666f32
commit 81eee2b989

View File

@ -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__)