also check for the SDK in subtrees used by newer XCodes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73807 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2013-04-10 23:06:21 +00:00
parent 2d3636405a
commit 9ad2035a4f

View File

@@ -55,8 +55,9 @@ def numCPUs():
return 1 # Default return 1 # Default
def getXcodePath(): def getXcodePaths():
return getoutput("xcode-select -print-path") base = getoutput("xcode-select -print-path")
return [base, base+"/Platforms/MacOSX.platform/Developer"]
def getVisCVersion(): def getVisCVersion():
@@ -288,11 +289,12 @@ def main(scriptName, args):
# but other cases it is optional and is left up to the developer. # but other cases it is optional and is left up to the developer.
# TODO: there should be a command line option to set the SDK... # TODO: there should be a command line option to set the SDK...
if sys.platform.startswith("darwin"): if sys.platform.startswith("darwin"):
xcodePath = getXcodePath() for xcodePath in getXcodePaths():
sdks = [ sdks = [
xcodePath+"/SDKs/MacOSX10.5.sdk", xcodePath+"/SDKs/MacOSX10.5.sdk",
xcodePath+"/SDKs/MacOSX10.6.sdk", xcodePath+"/SDKs/MacOSX10.6.sdk",
xcodePath+"/SDKs/MacOSX10.7.sdk", xcodePath+"/SDKs/MacOSX10.7.sdk",
xcodePath+"/SDKs/MacOSX10.8.sdk",
] ]
# use the lowest available sdk # use the lowest available sdk
@@ -624,7 +626,7 @@ def main(scriptName, args):
os.makedirs(packagedir) os.makedirs(packagedir)
basename = os.path.basename(prefixDir.split(".")[0]) basename = os.path.basename(prefixDir.split(".")[0])
packageName = basename + "-" + getWxRelease() packageName = basename + "-" + getWxRelease()
packageMakerPath = getXcodePath()+"/usr/bin/packagemaker " packageMakerPath = getXcodePaths()[0]+"/usr/bin/packagemaker "
args = [] args = []
args.append("--root %s" % options.installdir) args.append("--root %s" % options.installdir)
args.append("--id org.wxwidgets.%s" % basename.lower()) args.append("--id org.wxwidgets.%s" % basename.lower())