-
- isLipo = False
- if options.mac_lipo:
- if options.mac_universal_binary:
- print "WARNING: Cannot specify both mac_lipo and mac_universal_binary, as they conflict."
- print " Using mac_universal_binary..."
- else:
- isLipo = True
- # TODO: Add 64-bit when we're building OS X Cocoa
-
- # 2.8, use gcc 3.3 on PPC for 10.3 support, but only when building ...
- macVersion = platform.mac_ver()[0]
- isLeopard = macVersion.find("10.5") != -1
-
- if not isLeopard and os.path.exists(os.path.join(wxRootDir, contribDir)):
- # Building wx 2.8 so make the ppc build compatible with Panther
- doMacLipoBuild("ppc", buildDir, installDir, cxxcompiler="g++-3.3", cccompiler="gcc-3.3",
- target="10.3", flags="-DMAC_OS_X_VERSION_MAX_ALLOWED=1040")
- else:
- doMacLipoBuild("ppc", buildDir, installDir)
-
- doMacLipoBuild("i386", buildDir, installDir)
-
- # Use lipo to merge together all binaries in the install dirs, and it
- # also copies all other files and links it finds to the new destination.
- result = os.system("python %s/distrib/scripts/mac/lipo-dir.py %s %s %s" %
- (wxRootDir, installDir+"/ppc", installDir+"/i386", installDir))
-
- # tweak the wx-config script
- fname = os.path.abspath(installDir + '/bin/wx-config')
- data = open(fname).read()
- data = data.replace('ppc/', '')
- data = data.replace('i386/', '')
- open(fname, 'w').write(data)
-
- shutil.rmtree(installDir + "/ppc")
- shutil.rmtree(installDir + "/i386")
-
-
-
- if not isLipo:
- if options.extra_make:
- args.append(options.extra_make)
- exitIfError(wxBuilder.build(dir=buildDir, options=args), "Error building")