@@ -59,7 +59,9 @@ def fix_rpath(PATH):
59
59
def print_min_versions (PATH ):
60
60
"""Print ALL MINIMUM and SDK VERSIONS for files in OpenShot build folder.
61
61
This does not list all dependent libraries though, and sometimes one of those can cause issues."""
62
+ # Use 2 different matches, due to different output from different libraries (depending on compiler)
62
63
REGEX_SDK_MATCH = re .compile (r'.*(LC_VERSION_MIN_MACOSX).*version (\d+\.\d+).*sdk (\d+\.\d+).*(cmd)' , re .DOTALL )
64
+ REGEX_SDK_MATCH2 = re .compile (r'.*sdk\s(.*)\s*minos\s(.*)' )
63
65
VERSIONS = {}
64
66
65
67
# Find files matching patterns
@@ -74,9 +76,17 @@ def print_min_versions(PATH):
74
76
75
77
raw_output = subprocess .Popen (["oTool" , "-l" , file_path ], stdout = subprocess .PIPE ).communicate ()[0 ].decode ('utf-8' )
76
78
matches = REGEX_SDK_MATCH .findall (raw_output )
79
+ matches2 = REGEX_SDK_MATCH2 .findall (raw_output )
80
+ min_version = None
81
+ sdk_version = None
77
82
if matches and len (matches [0 ]) == 4 :
78
83
min_version = matches [0 ][1 ]
79
84
sdk_version = matches [0 ][2 ]
85
+ elif matches2 and len (matches2 [0 ]) == 2 :
86
+ sdk_version = matches2 [0 ][0 ]
87
+ min_version = matches2 [0 ][1 ]
88
+
89
+ if min_version and sdk_version :
80
90
print ("... scanning %s for min version (min: %s, sdk: %s)" % (file_path .replace (PATH , "" ),
81
91
min_version , sdk_version ))
82
92
@@ -86,7 +96,7 @@ def print_min_versions(PATH):
86
96
VERSIONS [min_version ].append (file_path )
87
97
else :
88
98
VERSIONS [min_version ] = [file_path ]
89
- if min_version in ['10.14' , '10.15 ' ]:
99
+ if min_version in ['11.0 ' ]:
90
100
print ("ERROR!!!! Minimum OS X version not met for %s" % file_path )
91
101
92
102
print ("\n Summary of Minimum Mac SDKs for Dependencies:" )
@@ -95,6 +105,9 @@ def print_min_versions(PATH):
95
105
for file_path in VERSIONS [key ]:
96
106
print (" %s" % file_path )
97
107
108
+ print ("\n Count of Minimum Mac SDKs for Dependencies:" )
109
+ for key in sorted (VERSIONS .keys ()):
110
+ print ("%s (%d)" % (key , len (VERSIONS [key ])))
98
111
99
112
if __name__ == "__main__" :
100
113
"""Run these methods manually for testing"""
0 commit comments