summaryrefslogtreecommitdiffstats
path: root/build/util.py
diff options
context:
space:
mode:
authorRJ Skerry-Ryan <rryan@mixxx.org>2018-09-07 09:39:34 -0700
committerRJ Skerry-Ryan <rryan@mixxx.org>2018-09-07 09:39:34 -0700
commitbc7f1fd67529490a56e5f3f073f026d9305d9c1c (patch)
treea42dbbb148aad4d2c1e919afaf342ef3da86d001 /build/util.py
parent4b0ac51df785d39b9f4a1cfffc770078ac341c3a (diff)
Use SCons to get the path to product_definition.plist in get_osx_min_version.
Lookups were silently failing when performed from within osx64_build. The minimum version in the resulting app plist was "File Doesn't Exist, Will Create: build/osx/product_definition.plist".
Diffstat (limited to 'build/util.py')
-rw-r--r--build/util.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/build/util.py b/build/util.py
index 12119b2081..5414fe7858 100644
--- a/build/util.py
+++ b/build/util.py
@@ -196,4 +196,11 @@ def get_osx_min_version():
# Mixxx 2.0 supported OS X 10.6 and up.
# Mixxx >2.0 requires C++11 which is only available with libc++ and OS X
# 10.7 onwards. std::promise/std::future requires OS X 10.8.
- return os.popen("/usr/libexec/PlistBuddy -c 'Print os:0' build/osx/product_definition.plist").readline().strip()
+ # Mixxx >2.2 switched to Qt 5, which requires macOS 10.11.
+ # Use SCons to get the path relative to the repository root.
+ product_definition = str(Script.File('#build/osx/product_definition.plist'))
+ p = os.popen("/usr/libexec/PlistBuddy -c 'Print os:0' %s" % product_definition)
+ min_version = p.readline().strip()
+ result_code = p.close()
+ assert result_code is None, "Can't read macOS min version: %s" % min_version
+ return min_version