|
34 | 34 | import re
|
35 | 35 | import stat
|
36 | 36 | import subprocess
|
| 37 | +import sysconfig |
37 | 38 | import traceback
|
38 | 39 | from github3 import login
|
39 | 40 | from requests.auth import HTTPBasicAuth
|
40 | 41 | from requests import post
|
41 | 42 | from version_parser import parse_version_info, parse_build_name
|
42 | 43 |
|
43 | 44 | PATH = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) # Primary openshot folder
|
| 45 | +PY_ABI = sysconfig.get_config_var('py_version_short') |
44 | 46 |
|
45 | 47 | # Access info class (for version info)
|
46 | 48 | sys.path.append(os.path.join(PATH, 'src', 'classes'))
|
@@ -410,8 +412,8 @@ def main():
|
410 | 412 |
|
411 | 413 | if platform.system() == "Windows":
|
412 | 414 | # Move python folder structure, since Cx_Freeze doesn't put it in the correct place
|
413 |
| - exe_dir = os.path.join(PATH, 'build', 'exe.mingw-3.7') |
414 |
| - python_dir = os.path.join(exe_dir, 'lib', 'python3.7') |
| 415 | + exe_dir = os.path.join(PATH, 'build', 'exe.mingw-{}'.format(PY_ABI)) |
| 416 | + python_dir = os.path.join(exe_dir, 'lib', 'python{}'.format(PY_ABI)) |
415 | 417 |
|
416 | 418 | # Remove a redundant openshot_qt module folder (duplicates lots of files)
|
417 | 419 | duplicate_openshot_qt_path = os.path.join(python_dir, 'openshot_qt')
|
@@ -521,6 +523,7 @@ def main():
|
521 | 523 | '/Q',
|
522 | 524 | '/DVERSION=%s' % version,
|
523 | 525 | '/DONLY_64_BIT=%s' % only_64_bit,
|
| 526 | + '/DPY_EXE_DIR=%s' % "exe.mingw-{}".format(PY_ABI), |
524 | 527 | '"%s"' % os.path.join(PATH, 'installer', 'windows-installer.iss'),
|
525 | 528 | ])
|
526 | 529 | inno_output = ""
|
|
0 commit comments