Skip to content

Commit 7740665

Browse files
committed
Package all Qt plugins for Mac build, and added some debug/troubleshooting code to find the min sdk version for all packaged files.
1 parent f7a500a commit 7740665

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

freeze.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def find_files(directory, patterns):
346346
external_so_files.append((filename, os.path.relpath(filename, start=os.path.join(qt_webengine_path, "Resources"))))
347347
for filename in find_files(os.path.join(qt_webengine_path, "Resources", "qtwebengine_locales"), ["*"]):
348348
external_so_files.append((filename, os.path.relpath(filename, start=os.path.join(qt_webengine_path, "Resources"))))
349-
for filename in find_files(os.path.join(qt_install_path, "plugins", "platforms"), ["*"]):
349+
for filename in find_files(os.path.join(qt_install_path, "plugins"), ["*"]):
350350
external_so_files.append((filename, os.path.relpath(filename, start=os.path.join(qt_install_path, "plugins"))))
351351

352352
# Append all source files

installer/fix_qt5_rpath.py

+22
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import os
33
import subprocess
44
from subprocess import call
5+
import re
56

67
# Symbolic Link Qt Frameworks into Python3/PyQt5 Framework
78
# IMPORTANT to run after installing PyQt5
@@ -39,6 +40,7 @@
3940
# Create new symlink to Qt frameworks
4041
call(["ln", "-s", file_path, new_path])
4142

43+
4244
# FIX PyQt5 library paths
4345
# This is NOT required anymore (leaving here as an example)
4446
#PATH = "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/PyQt5/"
@@ -65,3 +67,23 @@
6567
# command = 'install_name_tool "%s" -change "%s" "%s"' % (file_path, dependency_path, dependency_path.replace("@rpath", os.path.join(PATH, "lib")))
6668
# print (command)
6769
# 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

Comments
 (0)