diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-07-17 16:41:40 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-07-17 17:03:54 +0530 |
commit | d08e1e68758d5041afa79abd6a2d7dd1c45879d8 (patch) | |
tree | aa2adab650a1f8771470ecc1311f7ef4c3485632 /pyinst.py | |
parent | 956f1cf80540b5e7047b4064a8f7bd459082a8cf (diff) | |
download | hypervideo-pre-d08e1e68758d5041afa79abd6a2d7dd1c45879d8.tar.lz hypervideo-pre-d08e1e68758d5041afa79abd6a2d7dd1c45879d8.tar.xz hypervideo-pre-d08e1e68758d5041afa79abd6a2d7dd1c45879d8.zip |
Fix bug in 5200976949b93bc937a95d4453985e5e1a1160e2
Diffstat (limited to 'pyinst.py')
-rw-r--r-- | pyinst.py | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -6,11 +6,10 @@ import sys from PyInstaller.__main__ import run as run_pyinstaller -OS_NAME, MACHINE = sys.platform, platform.machine() -if MACHINE in ('x86_64', 'amd64'): - MACHINE = '' -elif 'i' in MACHINE and '86' in MACHINE: - MACHINE = 'x86' +OS_NAME, MACHINE, ARCH = sys.platform, platform.machine(), platform.architecture()[0][:2] +if MACHINE in ('x86_64', 'AMD64') or ('i' in MACHINE and '86' in MACHINE): + # NB: Windows x86 has MACHINE = AMD64 irrespective of bitness + MACHINE = 'x86' if ARCH == '32' else '' def main(): @@ -51,7 +50,6 @@ def parse_options(): # Compatibility with older arguments opts = sys.argv[1:] if opts[0:1] in (['32'], ['64']): - ARCH = platform.architecture()[0][:2] if ARCH != opts[0]: raise Exception(f'{opts[0]}bit executable cannot be built on a {ARCH}bit system') opts = opts[1:] |