]> git.saurik.com Git - wxWidgets.git/blobdiff - build/tools/build-wxwidgets.py
using button impl
[wxWidgets.git] / build / tools / build-wxwidgets.py
index eec91098566a383d7649dbe9f394012930c9a04b..3c5bf07e5c2d4617428c1071cce55ee322b12ab9 100755 (executable)
@@ -58,6 +58,15 @@ def getXcodePath():
     return getoutput("xcode-select -print-path")
 
 
     return getoutput("xcode-select -print-path")
 
 
+def getVisCVersion():
+    text = getoutput("cl.exe")
+    if 'Version 15' in text:
+        return '90'
+    # TODO: Add more tests to get the other versions...
+    else:
+        return 'FIXME'
+    
+
 def exitIfError(code, msg):
     if code != 0:
         print(msg)
 def exitIfError(code, msg):
     if code != 0:
         print(msg)
@@ -266,12 +275,11 @@ def main(scriptName, args):
             wxpy_configure_opts.append("--with-sdl")
             wxpy_configure_opts.append("--with-gnomeprint")
                                         
             wxpy_configure_opts.append("--with-sdl")
             wxpy_configure_opts.append("--with-gnomeprint")
                                         
-        # Ensure that the Carbon build stays compatible back to 10.4 and
-        # for the Cocoa build allow running on 10.5 and newer.  We only add
-        # them to the wxpy options because this is a hard-requirement for
-        # wxPython, 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...
+        # Try to use use lowest available SDK back to 10.5. Both Carbon and
+        # Cocoa builds require at least the 10.5 SDK now. We only add it to
+        # the wxpy options because this is a hard-requirement for wxPython,
+        # 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 = [
         if sys.platform.startswith("darwin"):
             xcodePath = getXcodePath()
             sdks = [
@@ -329,7 +337,13 @@ def main(scriptName, args):
                     shutil.rmtree(frameworkRootDir)
 
         if options.mac_universal_binary: 
                     shutil.rmtree(frameworkRootDir)
 
         if options.mac_universal_binary: 
-            configure_opts.append("--enable-universal_binary=%s" % options.mac_universal_binary)
+            if options.mac_universal_binary == 'default':
+                if options.osx_cocoa:
+                    configure_opts.append("--enable-universal_binary=i386,x86_64")                
+                else:
+                    configure_opts.append("--enable-universal_binary")                
+            else:
+                configure_opts.append("--enable-universal_binary=%s" % options.mac_universal_binary)
 
             
         print("Configure options: " + repr(configure_opts))
 
             
         print("Configure options: " + repr(configure_opts))
@@ -403,6 +417,7 @@ def main(scriptName, args):
     
             if options.wxpython:
                 args.append("OFFICIAL_BUILD=1")
     
             if options.wxpython:
                 args.append("OFFICIAL_BUILD=1")
+                args.append("COMPILER_VERSION=%s" % getVisCVersion())
                 args.append("SHARED=1")
                 args.append("MONOLITHIC=0")
                 args.append("USE_OPENGL=1")
                 args.append("SHARED=1")
                 args.append("MONOLITHIC=0")
                 args.append("USE_OPENGL=1")