|
2 | 2 | import os
|
3 | 3 | import subprocess
|
4 | 4 | from subprocess import call
|
| 5 | +import re |
5 | 6 |
|
6 | 7 | # Symbolic Link Qt Frameworks into Python3/PyQt5 Framework
|
7 | 8 | # IMPORTANT to run after installing PyQt5
|
|
39 | 40 | # Create new symlink to Qt frameworks
|
40 | 41 | call(["ln", "-s", file_path, new_path])
|
41 | 42 |
|
| 43 | + |
42 | 44 | # FIX PyQt5 library paths
|
43 | 45 | # This is NOT required anymore (leaving here as an example)
|
44 | 46 | #PATH = "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/PyQt5/"
|
|
65 | 67 | # command = 'install_name_tool "%s" -change "%s" "%s"' % (file_path, dependency_path, dependency_path.replace("@rpath", os.path.join(PATH, "lib")))
|
66 | 68 | # print (command)
|
67 | 69 | # call(["install_name_tool", file_path, "-change", dependency_path, dependency_path.replace("@rpath", os.path.join(PATH, "lib"))])
|
| 70 | + |
| 71 | + |
| 72 | +# Print ALL MINIMUM and SDK VERSIONS for files in OpenShot build folder |
| 73 | +# This does not list all dependent libraries though, and sometimes one of those can cause issues. |
| 74 | +# PATH = "/Users/jonathan/builds/7d5103a1/0/OpenShot/openshot-qt/build/exe.macosx-10.6-intel-3.6" |
| 75 | +# REGEX_SDK_MATCH = re.compile(r'.*(LC_VERSION_MIN_MACOSX).*version (\d+\.\d+).*sdk (\d+\.\d+).*(cmd)', re.DOTALL) |
| 76 | +# |
| 77 | +# # Find files matching patterns |
| 78 | +# for root, dirs, files in os.walk(PATH): |
| 79 | +# for basename in files: |
| 80 | +# file_path = os.path.join(root, basename) |
| 81 | +# file_parts = file_path.split("/") |
| 82 | +# |
| 83 | +# raw_output = subprocess.Popen(["oTool", "-l", file_path], stdout=subprocess.PIPE).communicate()[0].decode('utf-8') |
| 84 | +# matches = REGEX_SDK_MATCH.findall(raw_output) |
| 85 | +# if matches and len(matches[0]) == 4: |
| 86 | +# min_version = matches[0][1] |
| 87 | +# sdk_version = matches[0][2] |
| 88 | +# if min_version in ['10.14', '10.15']: |
| 89 | +# print("%s: min: %s, sdk: %s" % (file_path, min_version, sdk_version)) |
0 commit comments