From anonymous, 2 Months ago, written in Plain Text.
Embed
  1. diff --git a/scripts/dev/build_release.py b/scripts/dev/build_release.py
  2. index cc6bf9822..6c040c203 100755
  3. --- a/scripts/dev/build_release.py
  4. +++ b/scripts/dev/build_release.py
  5. @@ -218,7 +218,17 @@ def build_windows():
  6.      except FileNotFoundError:
  7.          python_x64 = r'C:\Python{}\python.exe'.format(ver)
  8.  
  9. +    try:
  10. +        reg32_key = winreg.OpenKeyEx(winreg.HKEY_LOCAL_MACHINE,
  11. +                                     r'SOFTWARE\WOW6432Node\Python\PythonCore'
  12. +                                     r'\{}-32\InstallPath'.format(dot_ver))
  13. +        python_x86 = winreg.QueryValueEx(reg32_key, 'ExecutablePath')[0]
  14. +    except FileNotFoundError:
  15. +        python_x86 = r'C:\Python{}-32\python.exe'.format(ver)
  16. +
  17.      out_pyinstaller = os.path.join('dist', 'qutebrowser')
  18. +    out_32 = os.path.join('dist',
  19. +                          'qutebrowser-{}-x86'.format(qutebrowser.__version__))
  20.      out_64 = os.path.join('dist',
  21.                            'qutebrowser-{}-x64'.format(qutebrowser.__version__))
  22.  
  23. @@ -228,28 +238,51 @@ def build_windows():
  24.      utils.print_title("Updating VersionInfo file")
  25.      gen_versioninfo.main()
  26.  
  27. +    utils.print_title("Running pyinstaller 32bit")
  28. +    _maybe_remove(out_32)
  29. +    call_tox('pyinstaller', '-r', python=python_x86)
  30. +    shutil.move(out_pyinstaller, out_32)
  31. +
  32.      utils.print_title("Running pyinstaller 64bit")
  33.      _maybe_remove(out_64)
  34.      call_tox('pyinstaller', '-r', python=python_x64)
  35.      shutil.move(out_pyinstaller, out_64)
  36.  
  37. +    utils.print_title("Running 32bit smoke test")
  38. +    smoke_test(os.path.join(out_32, 'qutebrowser.exe'))
  39.      utils.print_title("Running 64bit smoke test")
  40.      smoke_test(os.path.join(out_64, 'qutebrowser.exe'))
  41.  
  42.      utils.print_title("Building installers")
  43. +    subprocess.run(['makensis.exe',
  44. +                    '/DVERSION={}'.format(qutebrowser.__version__),
  45. +                    'misc/qutebrowser.nsi'], check=True)
  46.      subprocess.run(['makensis.exe',
  47.                      '/DX64',
  48.                      '/DVERSION={}'.format(qutebrowser.__version__),
  49.                      'misc/qutebrowser.nsi'], check=True)
  50.  
  51. +    name_32 = 'qutebrowser-{}-win32.exe'.format(qutebrowser.__version__)
  52.      name_64 = 'qutebrowser-{}-amd64.exe'.format(qutebrowser.__version__)
  53.  
  54.      artifacts += [
  55. +        (os.path.join('dist', name_32),
  56. +         'application/vnd.microsoft.portable-executable',
  57. +         'Windows 32bit installer'),
  58.          (os.path.join('dist', name_64),
  59.           'application/vnd.microsoft.portable-executable',
  60.           'Windows 64bit installer'),
  61.      ]
  62.  
  63. +
  64. +    utils.print_title("Zipping 32bit standalone...")
  65. +    name = 'qutebrowser-{}-windows-standalone-win32'.format(
  66. +        qutebrowser.__version__)
  67. +    shutil.make_archive(name, 'zip', 'dist', os.path.basename(out_32))
  68. +    artifacts.append(('{}.zip'.format(name),
  69. +                      'application/zip',
  70. +                      'Windows 32bit standalone'))
  71. +
  72.      utils.print_title("Zipping 64bit standalone...")
  73.      name = 'qutebrowser-{}-windows-standalone-amd64'.format(
  74.          qutebrowser.__version__)
  75.