X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2e59a53a5973d8da4155eb8481ac29e82d7e152f..c1362094462123fddf522afb31d9bd605f8eac47:/build/tools/build-wxwidgets.py diff --git a/build/tools/build-wxwidgets.py b/build/tools/build-wxwidgets.py index c2974ea31b..6212c76efe 100755 --- a/build/tools/build-wxwidgets.py +++ b/build/tools/build-wxwidgets.py @@ -26,6 +26,7 @@ contribDir = None options = None configure_opts = None exitWithException = True +nmakeCommand = 'nmake.exe' verbose = False @@ -54,8 +55,9 @@ def numCPUs(): return 1 # Default -def getXcodePath(): - return getoutput("xcode-select -print-path") +def getXcodePaths(): + base = getoutput("xcode-select -print-path") + return [base, base+"/Platforms/MacOSX.platform/Developer"] def getVisCVersion(): @@ -170,6 +172,7 @@ def main(scriptName, args): global options global configure_opts global wxBuilder + global nmakeCommand scriptDir = os.path.dirname(os.path.abspath(scriptName)) wxRootDir = os.path.abspath(os.path.join(scriptDir, "..", "..")) @@ -204,18 +207,19 @@ def main(scriptName, args): "mac_framework" : (False, "Install the Mac build as a framework"), "mac_framework_prefix" : (defFwPrefix, "Prefix where the framework should be installed. Default: %s" % defFwPrefix), - "cairo" : (False, "Enable dynamicly loading the Cairo lib for wxGraphicsContext on MSW"), + "cairo" : (False, "Enable dynamically loading the Cairo lib for wxGraphicsContext on MSW"), "no_config" : (False, "Turn off configure step on autoconf builds"), "config_only" : (False, "Only run the configure step and then exit"), "rebake" : (False, "Regenerate Bakefile and autoconf files"), "unicode" : (False, "Build the library with unicode support"), "wxpython" : (False, "Build the wxWidgets library with all options needed by wxPython"), - "cocoa" : (False, "Build the old Mac Cooca port."), + "cocoa" : (False, "Build the old Mac Cocoa port."), "osx_cocoa" : (False, "Build the new Cocoa port"), "shared" : (False, "Build wx as a dynamic library"), "extra_make" : ("", "Extra args to pass on [n]make's command line."), "features" : ("", "A comma-separated list of wxUSE_XYZ defines on Win, or a list of configure flags on unix."), "verbose" : (False, "Print commands as they are run, (to aid with debugging this script)"), + "jom" : (False, "Use jom.exe instead of nmake for MSW builds."), } parser = optparse.OptionParser(usage="usage: %prog [options]", version="%prog 1.0") @@ -285,19 +289,20 @@ def main(scriptName, args): # 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... if sys.platform.startswith("darwin"): - xcodePath = getXcodePath() - sdks = [ - xcodePath+"/SDKs/MacOSX10.5.sdk", - xcodePath+"/SDKs/MacOSX10.6.sdk", - xcodePath+"/SDKs/MacOSX10.7.sdk", - ] + for xcodePath in getXcodePaths(): + sdks = [ + xcodePath+"/SDKs/MacOSX10.5.sdk", + xcodePath+"/SDKs/MacOSX10.6.sdk", + xcodePath+"/SDKs/MacOSX10.7.sdk", + xcodePath+"/SDKs/MacOSX10.8.sdk", + ] - # use the lowest available sdk - for sdk in sdks: - if os.path.exists(sdk): - wxpy_configure_opts.append( - "--with-macosx-sdk=%s" % sdk) - break + # use the lowest available sdk + for sdk in sdks: + if os.path.exists(sdk): + wxpy_configure_opts.append( + "--with-macosx-sdk=%s" % sdk) + break if not options.mac_framework: if installDir and not prefixDir: @@ -439,8 +444,11 @@ def main(scriptName, args): args.append( "CPPFLAGS=/I%s" % os.path.join(os.environ.get("CAIRO_ROOT", ""), 'include\\cairo')) + + if options.jom: + nmakeCommand = 'jom.exe' - wxBuilder = builder.MSVCBuilder() + wxBuilder = builder.MSVCBuilder(commandName=nmakeCommand) if toolkit == "msvcProject": args = [] @@ -618,7 +626,7 @@ def main(scriptName, args): os.makedirs(packagedir) basename = os.path.basename(prefixDir.split(".")[0]) packageName = basename + "-" + getWxRelease() - packageMakerPath = getXcodePath()+"/usr/bin/packagemaker " + packageMakerPath = getXcodePaths()[0]+"/usr/bin/packagemaker " args = [] args.append("--root %s" % options.installdir) args.append("--id org.wxwidgets.%s" % basename.lower())