Various build tweaks and updates for wxPython 2.9.1.1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -94,10 +94,11 @@ def doMacLipoBuild(arch, buildDir, installDir,
|
|||||||
del os.environ[key]
|
del os.environ[key]
|
||||||
|
|
||||||
|
|
||||||
def macFixupInstallNames(destdir, prefix):
|
def macFixupInstallNames(destdir, prefix, buildDir=None):
|
||||||
# When an installdir is used then the install_names embedded in
|
# When an installdir is used then the install_names embedded in
|
||||||
# the dylibs are not correct. Reset the IDs and the dependencies
|
# the dylibs are not correct. Reset the IDs and the dependencies
|
||||||
# to use just the prefix.
|
# to use just the prefix.
|
||||||
|
print "**** macFixupInstallNames(%s, %s, %s)" % (destdir, prefix, buildDir)
|
||||||
pwd = os.getcwd()
|
pwd = os.getcwd()
|
||||||
os.chdir(destdir+prefix+'/lib')
|
os.chdir(destdir+prefix+'/lib')
|
||||||
dylibs = glob.glob('*.dylib') # ('*[0-9].[0-9].[0-9].[0-9]*.dylib')
|
dylibs = glob.glob('*.dylib') # ('*[0-9].[0-9].[0-9].[0-9]*.dylib')
|
||||||
@@ -107,6 +108,10 @@ def macFixupInstallNames(destdir, prefix):
|
|||||||
print cmd
|
print cmd
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
for dep in dylibs:
|
for dep in dylibs:
|
||||||
|
if buildDir is not None:
|
||||||
|
cmd = 'install_name_tool -change %s/lib/%s %s/lib/%s %s/lib/%s' % \
|
||||||
|
(buildDir,dep, prefix,dep, destdir+prefix,lib)
|
||||||
|
else:
|
||||||
cmd = 'install_name_tool -change %s/lib/%s %s/lib/%s %s/lib/%s' % \
|
cmd = 'install_name_tool -change %s/lib/%s %s/lib/%s %s/lib/%s' % \
|
||||||
(destdir+prefix,dep, prefix,dep, destdir+prefix,lib)
|
(destdir+prefix,dep, prefix,dep, destdir+prefix,lib)
|
||||||
print cmd
|
print cmd
|
||||||
@@ -147,9 +152,11 @@ def main(scriptName, args):
|
|||||||
"install" : (False, "Install the toolkit to the installdir directory, or the default dir."),
|
"install" : (False, "Install the toolkit to the installdir directory, or the default dir."),
|
||||||
"installdir" : ("", "Directory where built wxWidgets will be installed"),
|
"installdir" : ("", "Directory where built wxWidgets will be installed"),
|
||||||
"mac_universal_binary" : (False, "Build Mac version as a universal binary"),
|
"mac_universal_binary" : (False, "Build Mac version as a universal binary"),
|
||||||
|
"mac_arch" : ("", "Build just the specified architecture on Mac"),
|
||||||
"mac_lipo" : (False, "EXPERIMENTAL: Create a universal binary by merging a PPC and Intel build together."),
|
"mac_lipo" : (False, "EXPERIMENTAL: Create a universal binary by merging a PPC and Intel build together."),
|
||||||
"mac_framework" : (False, "Install the Mac build as a framework"),
|
"mac_framework" : (False, "Install the Mac build as a framework"),
|
||||||
"no_config" : (False, "Turn off configure step on autoconf builds"),
|
"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"),
|
"rebake" : (False, "Regenerate Bakefile and autoconf files"),
|
||||||
"unicode" : (False, "Build the library with unicode support"),
|
"unicode" : (False, "Build the library with unicode support"),
|
||||||
"wxpython" : (False, "Build the wxWidgets library with all options needed by wxPython"),
|
"wxpython" : (False, "Build the wxWidgets library with all options needed by wxPython"),
|
||||||
@@ -180,6 +187,8 @@ def main(scriptName, args):
|
|||||||
prefixDir = options.prefix
|
prefixDir = options.prefix
|
||||||
|
|
||||||
if toolkit == "autoconf":
|
if toolkit == "autoconf":
|
||||||
|
if not buildDir:
|
||||||
|
buildDir = os.getcwd()
|
||||||
configure_opts = []
|
configure_opts = []
|
||||||
if options.features != "":
|
if options.features != "":
|
||||||
configure_opts.extend(options.features.split(" "))
|
configure_opts.extend(options.features.split(" "))
|
||||||
@@ -192,13 +201,17 @@ def main(scriptName, args):
|
|||||||
|
|
||||||
if options.mac_universal_binary:
|
if options.mac_universal_binary:
|
||||||
configure_opts.append("--enable-universal_binary")
|
configure_opts.append("--enable-universal_binary")
|
||||||
|
configure_opts.append("--without-macosx-sdk") # don't let configure default it
|
||||||
|
|
||||||
if options.cocoa:
|
if options.cocoa:
|
||||||
configure_opts.append("--with-cocoa")
|
configure_opts.append("--with-old_cocoa")
|
||||||
|
|
||||||
if options.osx_cocoa:
|
if options.osx_cocoa:
|
||||||
configure_opts.append("--with-osx_cocoa")
|
configure_opts.append("--with-osx_cocoa")
|
||||||
|
|
||||||
|
if options.mac_arch:
|
||||||
|
configure_opts.append("--enable-macosx_arch=%s" % options.mac_arch)
|
||||||
|
|
||||||
wxpy_configure_opts = [
|
wxpy_configure_opts = [
|
||||||
"--with-opengl",
|
"--with-opengl",
|
||||||
"--enable-sound",
|
"--enable-sound",
|
||||||
@@ -257,10 +270,15 @@ def main(scriptName, args):
|
|||||||
"Error running configure")
|
"Error running configure")
|
||||||
os.chdir(olddir)
|
os.chdir(olddir)
|
||||||
|
|
||||||
|
if options.config_only:
|
||||||
|
print "Exiting after configure"
|
||||||
|
return
|
||||||
|
|
||||||
elif toolkit in ["msvc", "msvcProject"]:
|
elif toolkit in ["msvc", "msvcProject"]:
|
||||||
flags = {}
|
flags = {}
|
||||||
buildDir = os.path.abspath(os.path.join(scriptDir, "..", "msw"))
|
buildDir = os.path.abspath(os.path.join(scriptDir, "..", "msw"))
|
||||||
|
|
||||||
|
print "creating wx/msw/setup.h from setup0.h"
|
||||||
if options.unicode:
|
if options.unicode:
|
||||||
flags["wxUSE_UNICODE"] = "1"
|
flags["wxUSE_UNICODE"] = "1"
|
||||||
if VERSION < (2,9):
|
if VERSION < (2,9):
|
||||||
@@ -271,26 +289,21 @@ def main(scriptName, args):
|
|||||||
|
|
||||||
if options.wxpython:
|
if options.wxpython:
|
||||||
flags["wxDIALOG_UNIT_COMPATIBILITY "] = "0"
|
flags["wxDIALOG_UNIT_COMPATIBILITY "] = "0"
|
||||||
flags["wxUSE_DEBUG_CONTEXT"] = "1"
|
flags["wxUSE_DEBUGREPORT"] = "0"
|
||||||
flags["wxUSE_MEMORY_TRACING"] = "1"
|
|
||||||
flags["wxUSE_DIALUP_MANAGER"] = "0"
|
flags["wxUSE_DIALUP_MANAGER"] = "0"
|
||||||
|
flags["wxUSE_GRAPHICS_CONTEXT"] = "1"
|
||||||
|
flags["wxUSE_DISPLAY"] = "1"
|
||||||
flags["wxUSE_GLCANVAS"] = "1"
|
flags["wxUSE_GLCANVAS"] = "1"
|
||||||
flags["wxUSE_POSTSCRIPT"] = "1"
|
flags["wxUSE_POSTSCRIPT"] = "1"
|
||||||
flags["wxUSE_AFM_FOR_POSTSCRIPT"] = "0"
|
flags["wxUSE_AFM_FOR_POSTSCRIPT"] = "0"
|
||||||
flags["wxUSE_DISPLAY"] = "1"
|
|
||||||
flags["wxUSE_DEBUGREPORT"] = "0"
|
|
||||||
flags["wxUSE_GRAPHICS_CONTEXT"] = "1"
|
|
||||||
flags["wxUSE_DATEPICKCTRL_GENERIC"] = "1"
|
flags["wxUSE_DATEPICKCTRL_GENERIC"] = "1"
|
||||||
|
|
||||||
if VERSION < (2,9):
|
if VERSION < (2,9):
|
||||||
flags["wxUSE_DIB_FOR_BITMAP"] = "1"
|
flags["wxUSE_DIB_FOR_BITMAP"] = "1"
|
||||||
|
|
||||||
if VERSION >= (2,9):
|
if VERSION >= (2,9):
|
||||||
flags["wxUSE_UIACTIONSIMULATOR"] = "1"
|
flags["wxUSE_UIACTIONSIMULATOR"] = "1"
|
||||||
|
|
||||||
# setup the wxPython 'hybrid' build
|
|
||||||
if not options.debug:
|
|
||||||
flags["wxUSE_MEMORY_TRACING"] = "0"
|
|
||||||
flags["wxUSE_DEBUG_CONTEXT"] = "0"
|
|
||||||
|
|
||||||
mswIncludeDir = os.path.join(wxRootDir, "include", "wx", "msw")
|
mswIncludeDir = os.path.join(wxRootDir, "include", "wx", "msw")
|
||||||
setup0File = os.path.join(mswIncludeDir, "setup0.h")
|
setup0File = os.path.join(mswIncludeDir, "setup0.h")
|
||||||
@@ -320,12 +333,8 @@ def main(scriptName, args):
|
|||||||
args.append("MONOLITHIC=0")
|
args.append("MONOLITHIC=0")
|
||||||
args.append("USE_OPENGL=1")
|
args.append("USE_OPENGL=1")
|
||||||
args.append("USE_GDIPLUS=1")
|
args.append("USE_GDIPLUS=1")
|
||||||
args.append("CXXFLAGS=/D__NO_VC_CRTDBG__")
|
|
||||||
|
|
||||||
if not options.debug:
|
if not options.debug:
|
||||||
# "Hybrid" build, not really release or debug
|
|
||||||
args.append("DEBUG_FLAG=1")
|
|
||||||
args.append("WXDEBUGFLAG=h")
|
|
||||||
args.append("BUILD=release")
|
args.append("BUILD=release")
|
||||||
else:
|
else:
|
||||||
args.append("BUILD=debug")
|
args.append("BUILD=debug")
|
||||||
@@ -499,7 +508,7 @@ def main(scriptName, args):
|
|||||||
prefix = options.prefix
|
prefix = options.prefix
|
||||||
if not prefix:
|
if not prefix:
|
||||||
prefix = '/usr/local'
|
prefix = '/usr/local'
|
||||||
macFixupInstallNames(options.installdir, prefix)
|
macFixupInstallNames(options.installdir, prefix)#, buildDir)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user