def __init__(self): generic_tools.PiGenericEnvironment.__init__(self, 'win32', 'EigenLabs', 'Belcanto', None, TARGET_ARCH='x86') self.Replace(IS_WINDOWS=True) self.Replace(PI_MODPREFIX='') self.Replace(PI_MODSUFFIX='.pyd') self.Replace(PI_MODLINKFLAGS='$SHLINKFLAGS') self.Replace(RELEASESTAGEROOTDIR=join('$STAGEDIR')) self.Replace( RELEASESTAGEDIR=join('$STAGEDIR', '$PI_COLLECTION-$PI_RELEASE')) self.Replace(PYDSTAGEDIR=join('$RELEASESTAGEDIR', 'bin')) self.Replace(PYDINSTALLDIR=join('$INSTALLDIR', 'bin')) self.Replace(PYDRUNDIR=join('#tmp', 'bin')) self.Append( CCFLAGS='/EHsc /w34355 /MD /O2 /fp:fast /arch:SSE2 /DWIN32') self.Replace(PI_PLATFORMTYPE='windows') self.Append(LINKFLAGS=Split('/MANIFEST /INCREMENTAL:NO')) if os.environ.get('PI_DEBUGBUILD'): self.Append(CCFLAGS=Split('/Zi')) self.Append(LINKFLAGS=Split('/DEBUG')) self.shared.merge_modules = [] self.shared.package_init = [] self.shared.shortcuts = {}
def __init__(self): generic_tools.PiGenericEnvironment.__init__(self, 'win32', 'EigenLabs', 'Belcanto', None, TARGET_ARCH='x86') self.Replace(IS_WINDOWS=True) self.Replace(PI_MODPREFIX='') self.Replace(PI_MODSUFFIX='.pyd') self.Replace(PI_MODLINKFLAGS='$SHLINKFLAGS') self.Replace(RELEASESTAGEROOTDIR=join('$STAGEDIR')) self.Replace( RELEASESTAGEDIR=join('$STAGEDIR', '$PI_COLLECTION-$PI_RELEASE')) self.Append( CCFLAGS='/EHsc /w34355 /MD /O2 /fp:fast /arch:SSE2 /DWIN32') self.Replace(PI_PLATFORMTYPE='windows') self.Append( LINKFLAGS=Split('/MANIFEST /INCREMENTAL:NO /LARGEADDRESSAWARE')) self.Append(SHLINK=' $LIBMAPPER') self.Append(LINK=' $LIBMAPPER') self.Append(LIBS=Split('shell32')) self.Replace(LINKFLAGS_LOCKED=Split( "/SECTION:.text,!P /SECTION:.data,!P /SECTION:.rdata,!P /SECTION:.bss,!P" )) if os.environ.get('PI_DEBUGBUILD'): self.Append(CCFLAGS=Split('/Zi')) self.Append(LINKFLAGS=Split('/DEBUG')) self.shared.merge_modules = [] self.shared.package_init = [] self.shared.shortcuts = {}
def __init__(self,platform): unix_tools.PiUnixEnvironment.__init__(self,platform,'usr/pi','Library/Eigenlabs',python='/usr/pi/bin/python') os_major=uname()[2].split('.')[0] self.Append(LIBS=Split('dl m pthread')) self.Replace(MACOSXSDK='/Developer/SDKs/MacOSX10.4u.sdk') self.Append(CCFLAGS=Split('-isysroot ${MACOSXSDK} -mmacosx-version-min=10.4 -arch i386 -DDEBUG_DATA_ATOMICITY_DISABLED')) self.Append(LINKFLAGS=Split('-isysroot ${MACOSXSDK} -mmacosx-version-min=10.4 -arch i386 -framework Accelerate')) self.Append(CCFLAGS=Split('-ggdb -Werror -Wall -Wno-long-double -O3 -fmessage-length=0 -falign-loops=16 -msse3')) self.Replace(IS_MACOSX=os_major) self.Replace(PI_MODLINKFLAGS='$LINKFLAGS -bundle') self.Replace(PI_DLLENVNAME='DYLD_LIBRARY_PATH') self.Append(SHLINKFLAGS='-Wl,-install_name,@executable_path/${SHLIBPREFIX}${SHLIBNAME}${SHLIBSUFFIX}') self.Replace(PI_PLATFORMTYPE='macosx') self.Replace(APPRUNDIR=join('#tmp','app')) self.Replace(APPSTAGEDIR=join('$STAGEDIR','Applications','Eigenlabs','$PI_RELEASE')) self.Replace(APPINSTALLDIR=join('/','Applications','Eigenlabs','$PI_RELEASE')) self.Replace(APPSTAGEDIR_PRIV=join('$RELEASESTAGEDIR','Applications')) self.Replace(APPINSTALLDIR_PRIV=join('/','$INSTALLDIR','Applications')) self.Replace(CXX='g++-4.0') self.Replace(CC='gcc-4.0') self.Alias('target-default','#tmp/app')
def __init__(self,platform): unix_tools.PiUnixEnvironment.__init__(self,platform,'usr/local/pi','.belcanto','/usr/bin/python') self.Append(LIBS=Split('dl m pthread rt')) self.Append(CXXFLAGS=Split('-std=c++11')) self.Append(CCFLAGS=Split('-D_XOPEN_SOURCE=600 -D_GNU_SOURCE -D_REENTRANT -g -O0 -Wall -Werror -Wno-unused-function -Wno-unused-but-set-variable -Wno-narrowing -Wno-deprecated-declarations -fmessage-length=0 -fno-strict-aliasing ')) self.Append(LINKFLAGS=Split('-g -z origin -Wl,--rpath-link=tmp/bin -Wl,--rpath=\\$$ORIGIN/../bin')) self.Append(SHLINKFLAGS=Split('-g -z origin -Wl,--rpath-link=tmp/bin -Wl,--rpath=\\$$ORIGIN/../bin -Wl,-soname=lib${SHLIBNAME}.so')) self.Replace(PI_PLATFORMTYPE='linux') self.Replace(IS_LINUX=True)
def __init__(self, platform): unix_tools.PiUnixEnvironment.__init__(self, platform, 'usr/pi', '.belcanto', '/usr/bin/python') self.Append(LIBS=Split('dl m pthread rt')) self.Append(CCFLAGS=Split( '-D_XOPEN_SOURCE=600 -D_GNU_SOURCE -D_REENTRANT -g -O0 -Wall -Werror -fmessage-length=0 -fno-strict-aliasing' )) self.Append( LINKFLAGS=Split('-g -z origin -Wl,--rpath=\\$$ORIGIN/../bin')) self.Append(SHLINKFLAGS=Split( '-g -z origin -Wl,--rpath=\\$$ORIGIN/../bin -Wl,-soname=lib${SHLIBNAME}.so' )) self.Replace(PI_PLATFORMTYPE='linux') self.Replace(IS_LINUX=True)
def __init__(self, platform, install_prefix, userdir_suffix, python=None): generic_tools.PiGenericEnvironment.__init__(self, platform, install_prefix, userdir_suffix, python) self.Append(LINKFLAGS=Split('-ggdb')) self.Append(SHLINKCOM=' $LIBMAPPER') self.Append(LINKCOM=' $LIBMAPPER')
def __init__(self, platform): unix_tools.PiUnixEnvironment.__init__( self, platform, 'usr/local/pi', 'Library/Eigenlabs', python='/usr/local/pi/bin/python') os_major = uname()[2].split('.')[0] self.Append(LIBS=Split('dl m pthread')) if platform == 'macosx-x86-64': self.Append(CXXFLAGS=Split( '-std=c++11 -Wno-c++11-narrowing -Wno-inconsistent-missing-override' )) self.Append(CCFLAGS=Split( '-arch x86_64 -DDEBUG_DATA_ATOMICITY_DISABLED -DPI_PREFIX=\\"$PI_PREFIX\\" -mmacosx-version-min=10.6' )) self.Append(LINKFLAGS=Split( '-arch x86_64 -framework Accelerate -Wl,-rpath,@executable_path/ -mmacosx-version-min=10.6' )) else: self.Append(CXXFLAGS=Split( '-std=c++11 -Wno-c++11-narrowing -Wno-inconsistent-missing-override' )) self.Append(CCFLAGS=Split( '-arch i386 -DDEBUG_DATA_ATOMICITY_DISABLED -DPI_PREFIX=\\"$PI_PREFIX\\" -mmacosx-version-min=10.6' )) self.Append(LINKFLAGS=Split( '-arch i386 -framework Accelerate -Wl,-rpath,@executable_path/ -mmacosx-version-min=10.6' )) self.Append(CCFLAGS=Split( '-ggdb -Werror -Wall -Wno-empty-body -Wno-deprecated-declarations -Wno-format -Wno-unused-function -Wno-unused-private-field -Wno-c++11-extensions -Os -fmessage-length=0 -msse3' )) self.Replace(PI_DLLENVNAME='DYLD_LIBRARY_PATH') self.Replace(IS_MACOSX=os_major) self.Replace(PI_MODLINKFLAGS=[ '$LINKFLAGS', '-bundle', '-Wl,-rpath,@loader_path/' ]) self.Append(SHLINKFLAGS=[ '-Wl,-install_name,@rpath/${SHLIBPREFIX}${SHLIBNAME}${SHLIBSUFFIX}', '-Wl,-rpath,@loader_path/' ]) self.Replace(PI_PLATFORMTYPE='macosx') self.Replace(APPRUNDIR=join('#tmp', 'app')) self.Replace(APPSTAGEDIR=join('$STAGEDIR', 'Applications', 'Eigenlabs', '$PI_RELEASE')) self.Replace(APPINSTALLDIR=join('/', 'Applications', 'Eigenlabs', '$PI_RELEASE')) self.Replace(APPSTAGEDIR_PRIV=join('$RELEASESTAGEDIR', 'Applications')) self.Replace( APPINSTALLDIR_PRIV=join('/', '$INSTALLDIR', 'Applications')) self.Alias('target-default', '#tmp/app')
def __init__(self, platform): unix_tools.PiUnixEnvironment.__init__(self, platform, 'usr/pi', 'Library/Eigenlabs', python='/usr/pi/bin/python') os_major = uname()[2].split('.')[0] self.Append(LIBS=Split('dl m pthread')) self.Append(CCFLAGS=Split( '-arch i386 -DDEBUG_DATA_ATOMICITY_DISABLED -DPI_PREFIX=\\"$PI_PREFIX\\" -mmacosx-version-min=10.6' )) self.Append(LINKFLAGS=Split( '-arch i386 -framework Accelerate -Wl,-rpath,@executable_path/ -no_compact_linkedit -mmacosx-version-min=10.6' )) self.Replace(CXX='g++-4.2') self.Replace(CC='gcc-4.2') self.Append(CCFLAGS=Split( '-ggdb -Werror -Wall -Wno-deprecated-declarations -Wno-format -O4 -fmessage-length=0 -falign-loops=16 -msse3' )) self.Replace(PI_DLLENVNAME='DYLD_LIBRARY_PATH') self.Replace(IS_MACOSX=os_major) self.Replace(PI_MODLINKFLAGS=[ '$LINKFLAGS', '-bundle', '-Wl,-rpath,@loader_path/' ]) self.Append(SHLINKFLAGS=[ '-Wl,-install_name,@rpath/${SHLIBPREFIX}${SHLIBNAME}${SHLIBSUFFIX}', '-Wl,-rpath,@loader_path/' ]) self.Replace(PI_PLATFORMTYPE='macosx') self.Replace(APPRUNDIR=join('#tmp', 'app')) self.Replace(APPSTAGEDIR=join('$STAGEDIR', 'Applications', 'Eigenlabs', '$PI_RELEASE')) self.Replace(APPINSTALLDIR=join('/', 'Applications', 'Eigenlabs', '$PI_RELEASE')) self.Replace(APPSTAGEDIR_PRIV=join('$RELEASESTAGEDIR', 'Applications')) self.Replace( APPINSTALLDIR_PRIV=join('/', '$INSTALLDIR', 'Applications')) self.Alias('target-default', '#tmp/app')
def update(self, env): """ Update the environment with specific flags """ # Set the compiler compiler_name = env['compiler'] self.config.add_tool(compiler_name) if isinstance(platform, Cygwin): env.AppendUnique(CPPDEFINES = 'SYSTEM_IS__CYGWIN') elif isinstance(platform, Win32): env.AppendUnique(CPPDEFINES = 'WIN32') libs_suffix = env['compiler_libs_suffix'] if compiler_name == 'mingw' and '-vc' in libs_suffix: env['compiler_libs_suffix'] = '-mgw' env.Append(RPATH=Split('$rpath')) env.Append(CCFLAGS=Split(env['EXTRA_CCFLAGS'])) env.Append(CXXFLAGS=Split(env['EXTRA_CXXFLAGS'])) env.Append(CPPDEFINES=Split(env['EXTRA_CPPDEFINES'])) env.Append(LINKFLAGS=Split(env['EXTRA_LINKFLAGS'])) env.Append(CPPPATH=Split(env['EXTRA_CPPPATH'])) env.Append(LIBPATH=Split(env['EXTRA_LIBPATH'])) env.Append(LIBS=Split(env['EXTRA_LIBS']))
def __init__(self, platform, install_prefix, userdir_suffix, python=None, **kwds): SCons.Environment.Environment.__init__(self, ENV=os.environ, **kwds) self.py_template = generic_py_template self.shared = self.__Shared() self.shared.buildtools = {} self.shared.package_descriptions = {} self.shared.packages = [] self.shared.shlibmap = {} self.shared.release = None self.shared.collections = {} self.shared.lib_pkgs = {} self.shared.py_pkgs = {} self.shared.runtime = [] self.shared.runtime_user = [] self.Replace(PI_PLATFORM=platform) self.Replace( PI_PYTHON=os.environ.get('PI_PYTHON', python) or sys.executable) self.__getpython() print "platform: %s python: %s" % (platform, self['PI_PYTHON']) #self.set_tool('pip',self.WhereIs('pip')) self.Replace(ROOTINSTALLDIR=os.path.join('/', install_prefix)) self.Append(LINKFLAGS=Split('$LIBMAPPER')) self.Replace(LIBMAPPER=self.libmapper) self.Replace(PKGDIR=join('#tmp', 'pkg')) self.Replace(TMPDIR=join('#tmp', 'obj')) self.Replace(STAGEDIR=join('#tmp', 'stage', '$PI_PACKAGENAME')) self.Replace(RELEASESTAGEROOTDIR=join('$STAGEDIR', install_prefix)) self.Replace(RELEASESTAGEDIR=join('$RELEASESTAGEROOTDIR', '$PI_COLLECTION-$PI_RELEASE')) self.Replace(BINSTAGEDIR=join('$RELEASESTAGEDIR', 'bin')) self.Replace(HDRSTAGEDIR=join('$RELEASESTAGEDIR', 'include')) self.Replace(MODSTAGEDIR=join('$RELEASESTAGEDIR', 'modules')) self.Replace(PYDSTAGEDIR=join('$RELEASESTAGEDIR', 'modules')) self.Replace(RESSTAGEDIR=join('$RELEASESTAGEDIR', 'resources')) self.Replace(PLGSTAGEDIR=join('$RELEASESTAGEDIR', 'plugins')) self.Replace( ETCSTAGEDIR=join('$RELEASESTAGEDIR', 'etc', '$PI_PACKAGENAME')) if os.environ.get('PI_VERBOSE') is None: self.Replace(PRINT_CMD_LINE_FUNC=self.print_cmd) self.Replace(INSTALLROOTDIR=join(os.path.sep, install_prefix)) self.Replace( INSTALLDIR=join('$INSTALLROOTDIR', '$PI_COLLECTION-$PI_RELEASE')) self.Replace(HDRINSTALLDIR=join('$INSTALLDIR', 'include')) self.Replace(MODINSTALLDIR=join('$INSTALLDIR', 'modules')) self.Replace(PYDINSTALLDIR=join('$INSTALLDIR', 'modules')) self.Replace(BININSTALLDIR=join('$INSTALLDIR', 'bin')) self.Replace(RESINSTALLDIR=join('$INSTALLDIR', 'resources')) self.Replace(PLGINSTALLDIR=join('$INSTALLDIR', 'plugins')) self.Replace( ETCINSTALLDIR=join('$INSTALLDIR', 'etc', '$PI_PACKAGENAME')) self.Replace(ETCROOTINSTALLDIR=join('$INSTALLDIR', 'etc')) self.Replace(PI_MODPREFIX='') self.Replace(PI_MODSUFFIX='.so') self.Replace(PI_MODLINKFLAGS='$SHLINKFLAGS') self.Replace(BINRUNDIR=join('#tmp', 'bin')) self.Replace(MODRUNDIR=join('#tmp', 'modules')) self.Replace(PYDRUNDIR=join('#tmp', 'modules')) self.Replace(RESRUNDIR=join('#tmp', 'resources')) self.Replace(PLGRUNDIR=join('#tmp', 'plugins')) self.Replace(PILIBS=[]) self.Replace(IS_LINUX_PPC32=False) self.Replace(IS_LINUX_PPC64=False) self.Replace(IS_LINUX_86=False) self.Replace(IS_LINUX_8664=False) self.Replace(IS_LINUX=False) self.Replace(IS_MACOSX=False) self.Replace(IS_MACOSX_PPC32=False) self.Replace(IS_MACOSX_PPC64=False) self.Replace(IS_MACOSX_86=False) self.Replace(IS_WINDOWS=False) self.Replace(IS_BIGENDIAN=False) self.Replace(PIPCMD=lambda target, source, env, for_signature: self. find_tool('pip')) self.Replace(PI_RELEASE=lambda target, source, env, for_signature: self .shared.release) self.Replace(PI_COLLECTION=lambda target, source, env, for_signature: self.shared.collection) self.Alias('target-default', join('#tmp', 'bin')) self.Alias('target-default', join('#tmp', 'modules')) self.Alias('target-default', join('#tmp', 'plugins')) self.Alias('target-default', join('#tmp', 'resources')) self.Alias('target-stage', join('#tmp', 'stage')) self.Replace( PI_COMPILER=os.path.join(os.path.dirname(__file__), 'compile.py'))
def getEnvironment(Environment, debug=False): env = common.getDefaultEnvironment(Environment, debug) try: GTKMM_BASEPATH = os.environ['GTKMM_BASEPATH'] GTK_BASEPATH = os.environ['GTK_BASEPATH'] OSG_ROOT = os.environ['OSG_ROOT'] except Exception: print "You have to install the following software first:" print "\tGTKmm (and ensure that GTKMM_BASEPATH is set)" print "\tGTK (and ensure that GTK_BASEPATH is set)" print "\tOpenSceneGraph (and ensure that OSG_ROOT is set)" print "\tOptionally if you compiled OpenThreads yourself, you may use OT_ROOT to point to it" sys.exit(1) if 'OT_ROOT' in os.environ: OT_ROOT = os.environ['OT_ROOT'] else: OT_ROOT = OSG_ROOT try: PLATFORMSDK_ROOT = os.environ['PLATFORMSDK_ROOT'] except Exception: print "Install MS Platform SDK and point PLATFORMSDK_ROOT to its path" sys.exit(1) env.Append(LIBS=["sigc-2.0"]) # Include the manifest file into the targets (;1 for exe, ;2 for DLL) # We also remove manifest files to avoid problems with plugin directories env.Append(LINKCOM=[ env['LINKCOM'], 'mt.exe -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;1' ]) env.Append(SHLINKCOM=[ env['SHLINKCOM'], 'mt.exe -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;2' ]) env.Append(LIBPATH=[ GTKMM_BASEPATH + '\\lib', GTK_BASEPATH + '\\lib', OSG_ROOT + '\\lib', OT_ROOT + '\\lib', ]) env.Append(CPPPATH=[ GTKMM_BASEPATH + '\\include\\libglademm-2.4', GTKMM_BASEPATH + '\\lib\\libglademm-2.4\\include', GTKMM_BASEPATH + '\\lib\\gtkmm-2.4\\include', GTKMM_BASEPATH + '\\include\\gtkmm-2.4', GTKMM_BASEPATH + '\\lib\\gdkmm-2.4\\include', GTKMM_BASEPATH + '\\include\\gdkmm-2.4', GTKMM_BASEPATH + '\\include\\pangomm-1.4', GTKMM_BASEPATH + '\\include\\atkmm-1.6', GTKMM_BASEPATH + '\\lib\\libxml++-2.6\\include', GTKMM_BASEPATH + '\\include\\libxml++-2.6', GTKMM_BASEPATH + '\\lib\\glibmm-2.4\\include', GTKMM_BASEPATH + '\\include\\glibmm-2.4', GTKMM_BASEPATH + '\\include\\cairomm-1.0', GTKMM_BASEPATH + '\\lib\\sigc++-2.0\\include', GTKMM_BASEPATH + '\\include\\sigc++-2.0', GTK_BASEPATH + '\\lib\\gtkglext-1.0\\include', GTK_BASEPATH + '\\include\\gtkglext-1.0', GTK_BASEPATH + '\\include\\libglade-2.0', GTK_BASEPATH + '\\lib\\gtk-2.0\\include', GTK_BASEPATH + '\\include\\gtk-2.0', GTK_BASEPATH + '\\include\\pango-1.0', GTK_BASEPATH + '\\include\\atk-1.0', GTK_BASEPATH + '\\lib\\glib-2.0\\include', GTK_BASEPATH + '\\include\\glib-2.0', GTK_BASEPATH + '\\include\\libxml2', GTK_BASEPATH + '\\include\\cairo', GTK_BASEPATH + '\\include', PLATFORMSDK_ROOT + '\\Include', OSG_ROOT + '\\include', OT_ROOT + '\\include' ]) env.Append(LIBS=Split(""" glademm-2.4 xml++-2.6 gtkmm-2.4 glade-2.0 gdkmm-2.4 atkmm-1.6 pangomm-1.4 glibmm-2.4 cairomm-1.0 sigc-2.0 gtk-win32-2.0 xml2 gdk-win32-2.0 atk-1.0 gdk_pixbuf-2.0 pangowin32-1.0 pangocairo-1.0 pango-1.0 cairo gobject-2.0 gmodule-2.0 glib-2.0 intl iconv gtkglext-win32-1.0 gdkglext-win32-1.0 """)) if debug: env.Append(CCFLAGS=[ "/vd2", "/EHsc", "/DWIN32", "/GR", "/RTC1", "/MDd", "/Od", "/TP" ]) else: env.Append( CCFLAGS=["/vd2", "/EHsc", "/DWIN32", "/GR", "/RTC1", "/MD", "/TP"]) return env
raise Exception( 'ERROR: You have to install OSG development package before compiling osgedit' ) return conf.Finish() def getEnvironment(Environment, debug=False): env = common.getDefaultEnvironment(Environment, debug) try: if not env.GetOption('clean'): env = checkDependencies(env) except Exception, e: print e sys.exit(1) if debug: env.Append(CCFLAGS=Split("-g -O0 -DDEBUG -Wall -pedantic")) env.Append(LINKFLAGS=Split("-g")) else: env.Append(CCFLAGS=['-O3']) env.Append(LINKFLAGS=['-Wl,-s']) return env def getAlias(debug=False): if debug: return [ 'debug/osgedit', 'debug:core_wrappers', 'debug:core_actions', 'debug:core_controls', 'debug:core_controls3d',