From: <lak...@us...> - 2008-05-18 15:57:19
|
Revision: 588 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=588&view=rev Author: lakin_wecker Date: 2008-05-18 08:57:21 -0700 (Sun, 18 May 2008) Log Message: ----------- Some simple whitespace fixes. Also, changed the way the Config modules are imported such that the errors in them are printed when the import fails. Modified Paths: -------------- branches/linux-fixes-summer-2008/python-ogre/environment.py Modified: branches/linux-fixes-summer-2008/python-ogre/environment.py =================================================================== --- branches/linux-fixes-summer-2008/python-ogre/environment.py 2008-05-18 15:01:23 UTC (rev 587) +++ branches/linux-fixes-summer-2008/python-ogre/environment.py 2008-05-18 15:57:21 UTC (rev 588) @@ -28,21 +28,21 @@ print __file__, "LOG::", instring def isWindows(): - if os.name == 'nt': + if os.name == 'nt': return True return False - + def isLinux(): if os.name == 'posix' and os.sys.platform != 'darwin': return True - return False - + return False + def isMac(): if os.sys.platform == 'darwin': return True return False - - + + PythonOgreMajorVersion = "1" PythonOgreMinorVersion = "2" PythonOgrePatchVersion = "rc1" @@ -55,7 +55,7 @@ ## I want a version string 2.4 or 2.5 etc PythonVersionString = str(sys.version_info[0]) + '.' + str(sys.version_info[1]) -if isWindows(): +if isWindows(): python_include_dirs = os.path.join ( PATH_Python, 'include') python_lib_dirs = os.path.join ( PATH_Python, 'libs' ) ## @@ -77,13 +77,12 @@ sys.path.append( os.path.join( root_dir, 'common_utils' ) ) shared_ptr_dir = os.path.join( root_dir, 'shared_ptr' ) include_dir = os.path.join( root_dir, 'include' ) -generated_dir_name = 'generated' -package_dir_name = 'packages'+ "_" + PythonVersionString +generated_dir_name = 'generated' +package_dir_name = 'packages'+ "_" + PythonVersionString generated_dir = os.path.join( root_dir, generated_dir_name ) declarations_cache_dir = os.path.join( root_dir, 'code_generators', 'cache' ) _UserName = getpass.getuser() -_ConfigSet = False _SystemType = os.name ## nt or posix or mac _PlatformType = sys.platform ## win32, ?? @@ -93,32 +92,27 @@ # log ( "Config.PATH_Python: %s, UserName: %s, SystemType: %s, Root_dir: %s" % (Config.PATH_Python, _UserName, _SystemType, root_dir) ) try: - s = 'PythonOgreConfig_' + _UserName ## + '.py' - Config = __import__( s ) - _ConfigSet = True - log ( "Loaded Config (based on username) from %s" % (s )) -except: try: - s= 'PythonOgreConfig_' + _SystemType ## + '.py' - - Config = __import__( s ) - _ConfigSet = True - log ( "Loaded Config (based on systemtype) from %s" % (s)) - except: - pass + ModuleName = 'PythonOgreConfig_' + _UserName ## + '.py' + Config = __import__( ModuleName ) + log ( "Loaded Config (based on username) from %s" % (ModuleName )) + except ImportError: + try: + ModuleName= 'PythonOgreConfig_' + _SystemType ## + '.py' -if not _ConfigSet: - log ( " Going to use internal config setting") - ## These need to be adjusted based upon your system - ## - ## PLEASE use an external PythonOgreConfig_<username>.py to hold these value !!!! - ## - print "\n\n You DO need to create a PythonOgreConfig_%s.py file with config details" % ( _SystemType) - sys.exit(-1) - - + Config = __import__( ModuleName ) + log ( "Loaded Config (based on systemtype) from %s" % (ModuleName)) + except ImportError: + print "\n\n You DO need to create either a PythonOgreConfig_%s.py or a PythonOgreConfig_%s.py file with config details" % ( _UserName, _SystemType) + sys.exit(-1) +except: + print "\n\n There was an error importing your customized settings: %s \n\n" % (ModuleName,) + # Re raise the exception + raise + + ###################### -downloadPath = os.path.abspath("downloads") +downloadPath = os.path.abspath("downloads") wget = "wget -c -nc " tar = "tar " gzip = "gzip " @@ -143,12 +137,12 @@ sed_ = "sed -i '' " else: sed_ = "sed --in-place " - -if isMac(): + +if isMac(): Config.PATH_Boost = os.path.join(Config.LOCAL_INCLUDE, 'boost-1_34_1') Config.LIB_Boost = 'libboost_python-1_34_1' Config.RPATH="" - + ## BIG assumption about where you want things put ROOT = os.path.join(os.getcwd(),'root' ) PREFIX = os.path.join(os.getcwd(),'root', 'usr' ) @@ -167,9 +161,9 @@ ] return ret - + #################################################### ## ## These are the base tools and libraries @@ -188,27 +182,27 @@ [0,"cmake ../gccxml -DCMAKE_INSTALL_PREFIX:PATH="+ PREFIX,os.path.join(os.getcwd(),'gccxml-build')], [0,"make", os.path.join(os.getcwd(),'gccxml-build')], [0,"make install",os.path.join(os.getcwd(),'gccxml-build')] - ] + ] else: - - buildCmds = [ + + buildCmds = [ [0,'echo Please use CMAKE to create a msvc build projects for gccxml',''], [0,'echo ie. Run Cmake (from the windows menu)',''], [0,'echo specific the gccxml for both directories and run configure',''], [0,'echo ignore any errors - you will need to run configure twice and then OK',''], [0,'echo Now run MSVC and load the gccxml project (in the gccxml directory) and build it',''] ] - + class install: pythonModule = False active = True source = [ ] - + buildCmds = [ [0,"python setup.py install --prefix=%s" % PREFIX, os.path.join(os.getcwd(),'python-ogre')] - ] - + ] + class newton: pythonModule = False active = True @@ -220,7 +214,7 @@ source = [ [wget, "http://www.newtondynamics.com/downloads/newtonLinux-1.53.tar.gz", downloadPath] ] - + buildCmds = [ [0, "tar zxf " + os.path.join(downloadPath, "newtonLinux-1.53.tar.gz"), ''], [0,"patch -s -i ./python-ogre/patch/Newton.patch -p0 ", ''], @@ -233,7 +227,7 @@ source = [ [wget, "http://www.newtondynamics.com/downloads/NewtonMac-1.53.zip", downloadPath] ] - + buildCmds = [ [0, "unzip -q -o " + os.path.join(downloadPath, "NewtonMac-1.53.zip"), ''], [0,"patch -s -i ./python-ogre/patch/Newton.patch -p0 ", ''], @@ -241,7 +235,7 @@ [0, "cp newtonSDK/sdk/*.a %s/lib" % PREFIX, ''], [0, "cp newtonSDK/sdk/*.a ogreaddons/ogrenewt" , ''] ] - + class pygccxml: pythonModule = False active = True @@ -253,11 +247,11 @@ source = [ [svn, " co http://pygccxml.svn.sourceforge.net/svnroot/pygccxml "+base, os.getcwd()] ] - + buildCmds = [ [0,"python setup.py install --prefix="+ PREFIX , os.path.join (os.getcwd(), base, "pygccxml_dev") ], [0,"python setup.py install --prefix=" + PREFIX , os.path.join (os.getcwd(), base, "pyplusplus_dev") ] - ] + ] if isWindows(): source = [ [svn, " co http://pygccxml.svn.sourceforge.net/svnroot/pygccxml "+base, os.getcwd()] @@ -265,8 +259,8 @@ buildCmds = [ [0,"python setup.py install " , os.path.join (os.getcwd(), base, "pygccxml_dev") ], [0,"python setup.py install " , os.path.join (os.getcwd(), base, "pyplusplus_dev") ] - ] - + ] + class cg: pythonModule = False active = True @@ -275,20 +269,20 @@ source = [ [wget, " http://developer.download.nvidia.com/cg/Cg_2.0/2.0.0010/"+base+".tar.gz",downloadPath] ] - + buildCmds = [ [0,tar + " xvzf "+ os.path.join(downloadPath,base) + ".tar.gz --overwrite", ROOT], # unpack it directly into 'our' root - ] + ] if isMac(): source = [ [wget, "http://developer.download.nvidia.com/cg/Cg_2.0/2.0.0010/Cg-2.0_Dec2007.dmg", downloadPath ] - - ] + + ] buildCmds = [ ] ## "http://downloads.sourceforge.net/ogre/OgreDependenciesOSX_20070929.zip" - + class zziplib: ## The 'install' "fails" on the mac however it's actually OK pythonModule = False @@ -298,16 +292,16 @@ source = [ [wget, " http://downloads.sourceforge.net/zziplib/"+base+".tar.bz2",downloadPath], ] - + buildCmds = [ [0,tar + " xjf "+ os.path.join(downloadPath,base) + ".tar.bz2 --overwrite", ''], [0,"aclocal", os.path.join(os.getcwd(), base) ], [0,"./configure --prefix=%s --datadir=%s/share --includedir=%s/include " % (PREFIX,PREFIX,PREFIX), os.path.join(os.getcwd(), base) ], [0,"make" ,os.path.join(os.getcwd(), base) ], [0,"make install",os.path.join(os.getcwd(), base) ] - ] - - + ] + + class freeimage: pythonModule = False active = True @@ -316,7 +310,7 @@ source = [ [wget, " http://prdownloads.sourceforge.net/freeimage/FreeImage3100.zip",downloadPath], ] - + if isLinux(): buildCmds = [ [0, unzip + " -q -o " + os.path.join(downloadPath,base) + "3100.zip", ''], @@ -329,7 +323,7 @@ sed --in-place -s 's|ldconfig||' Makefile.*""", os.path.join(os.getcwd(), base) ], [0, "make", os.path.join(os.getcwd(), base) ], [0, "make DESTINC=%s/include DESTLIB=%s/lib install " % (PREFIX, PREFIX) ,os.path.join(os.getcwd(), base) ] - ] + ] if isMac(): ## mac has a crap sed command implementation and a different shell interaction, plus make file is a little different (or course) buildCmds = [ [0, unzip + " -q -o " + os.path.join(downloadPath,base) + "3100.zip", ''], @@ -341,23 +335,23 @@ sed -i '' 's|ldconfig||' Makefile.*""", os.path.join(os.getcwd(), base) ], [0, "make", os.path.join(os.getcwd(), base) ], [0, "make DEST=%s install " % PREFIX ,os.path.join(os.getcwd(), base) ] - ] - - + ] + + class cmake: pythonModule = False active = True if isLinux() or isMac(): base = 'cmake-2.4.6-Linux-i386' - + if isMac(): base = 'cmake-2.4.7-Darwin-universal' - + source = [ [wget, "http://www.cmake.org/files/v2.4/"+base+".tar.gz",downloadPath], ] - - + + buildCmds = [ [0,tar + " xzf "+ os.path.join(downloadPath,base) + ".tar.gz --overwrite", ''], # unpack it [0,cp + "-R * " + PREFIX, os.path.join (os.getcwd(), base) ] # copy to our bin area @@ -367,8 +361,8 @@ buildCmds = [ [0, os.path.join(downloadPath, "cmake-2.4.8-win32-x86.exe"), '' ] ] - - + + class scons: pythonModule = False active = True @@ -376,20 +370,20 @@ source = [ [wget, "http://downloads.sourceforge.net/scons/"+base+".tar.gz",downloadPath], ] - + # the utils in Windows don't handle paths or tar spawing gzip hence the work arounds if isLinux() or isMac(): buildCmds = [ [0, tar + " zxf " + os.path.join(downloadPath,base)+".tar.gz --overwrite",'' ], [0,"python setup.py install --prefix=%s" % PREFIX , os.path.join (os.getcwd(), base) ] ] - + else: buildCmds = unTarGz( base, downloadPath ) +\ [ [0,"python setup.py install ", os.path.join (os.getcwd(), base) ] ] - + class boost: ## also included bjam active = True version = "3.4" @@ -397,11 +391,11 @@ ModuleName = "" base = 'boost_1_35_0' #this doesn't work yet AJM 17/04/08 base = 'boost_1_34_1' - + myLibraryPaths = [ 'boost/bin.v2/libs/python2.5/build/msvc-8.0/release/threading-multi' ] myLibraries = [ 'boost_python-vc80-mt-1_35'] - - + + if isLinux() or isMac(): bjambase = 'boost-jam-3.1.16' if isMac(): @@ -410,36 +404,36 @@ else: bjambuilddir = 'bin.linuxx86' bjambuildset = 'gcc' - + source = [ [wget,'http://downloads.sourceforge.net/boost/boost-jam-3.1.16.tgz', downloadPath], [wget,'http://downloads.sourceforge.net/boost/boost_1_34_1.tar.gz',downloadPath] - ] + ] buildCmds = [ ## first handle bjam [0, tar + ' zxf ' + os.path.join(downloadPath, bjambase) + '.tgz --overwrite', ''], [0,"./build.sh " + bjambuildset, os.path.join(os.getcwd(), bjambase )], - + [0,cp + " bjam %s/bin" % PREFIX, os.path.join(os.getcwd(), bjambase, bjambuilddir )], ## may need to change on 64 bit systems - + ## and now boost [0, tar + ' zxf ' + os.path.join(downloadPath, base) + '.tar.gz', ''], [0,'chmod -R +rw *', os.path.join(os.getcwd(), base ) ], [0,cp + ' -R '+os.path.join('python-ogre','boost','*') +' ' + base , ''], # need to overwrite the boost with our files - [0, sed_ + " 's/BJAM_CONFIG=\"\"/BJAM_CONFIG=release/' boost_1_35_0/configure", '' ], - [0, sed_ + " s/'BOOST_PYTHON_MAX_ARITY 15'/'BOOST_PYTHON_MAX_ARITY 19'/ boost_1_35_0/boost/python/detail/preprocessor.hpp", ''], + [0, sed_ + " 's/BJAM_CONFIG=\"\"/BJAM_CONFIG=release/' boost_1_34_1/configure", '' ], + [0, sed_ + " s/'BOOST_PYTHON_MAX_ARITY 15'/'BOOST_PYTHON_MAX_ARITY 19'/ boost_1_34_1/boost/python/detail/preprocessor.hpp", ''], [0,"./configure --with-libraries=python --prefix=%s --without-icu" % PREFIX, os.path.join(os.getcwd(), base )], [0,'make', os.path.join(os.getcwd(), base )], [0,'make install', os.path.join(os.getcwd(), base )], ] - + if isWindows(): bjambase = 'boost-jam-3.1.16-1-ntx86' source = [ [wget,'http://downloads.sourceforge.net/boost/'+bjambase+'.zip',downloadPath] , [wget,'http://downloads.sourceforge.net/boost/'+base+'.zip',downloadPath] - ] - + ] + buildCmds = [ [0,unzip + os.path.join(downloadPath, bjambase+".zip"), ''], [0,unzip + os.path.join(downloadPath, base + ".zip"), ''], @@ -448,16 +442,16 @@ [0,'sed -i s/"BOOST_PYTHON_MAX_ARITY 15"/"BOOST_PYTHON_MAX_ARITY 19"/ '+base+'/boost/python/detail/preprocessor.hpp', ''], [0,os.path.join(os.getcwd(), bjambase, "bjam.exe") + ' release --with-python --toolset=msvc-8',os.path.join(os.getcwd(),base)] ] - - - - + + + + #################################################### ## ## Now for the actual Python-Ogre Modules ## #################################################### - + class ogre: active = True pythonModule = True @@ -471,13 +465,13 @@ myLibraryPaths = [] myLibraries = ['OgreMain'] libraries = myLibraries - + # for mod in dependsOn: # libraries += mod.libraries # - - if isWindows(): - + + if isWindows(): + source = [ [ wget, "http://downloads.sourceforge.net/ogre/OgreDependencies_VC8SP1_Eihort_20071227.zip", downloadPath], [ wget, "http://downloads.sourceforge.net/ogre/ogre-win32-v1-4-7.zip", downloadPath], @@ -487,8 +481,8 @@ [0, unzip + os.path.join(downloadPath,"OgreDependencies_VC8SP1_Eihort_20071227.zip"), os.path.join(os.getcwd(), 'ogrenew') ], [0, "patch -s -N -i ./python-ogre/patch/ogre.patch -p0 ", os.getcwd()] - ] - + ] + # requirements to build a precompiled header on the fly if _PreCompiled: pchstop = 'python_ogre_precompiled.h' @@ -502,8 +496,8 @@ , Config.PATH_LIB_Ogre_Dependencies #needed for ceguibase.lib etc , Config.PATH_LIB_CEGUI ] - include_dirs = [ Config.PATH_Boost - , Config.PATH_INCLUDE_Ogre + include_dirs = [ Config.PATH_Boost + , Config.PATH_INCLUDE_Ogre ] CCFLAGS = ' -DBOOST_PYTHON_MAX_ARITY=19 ' LINKFLAGS = '' @@ -526,12 +520,12 @@ [0, "make", os.path.join(os.getcwd(), 'ogrenew')], [0, "make install", os.path.join(os.getcwd(), 'ogrenew')], ] - + libs=[Config.LIB_Boost, 'OgreMain' ] #, 'OgreGUIRenderer', 'CEGUIBase'] lib_dirs = [ Config.LOCAL_LIB ] - include_dirs = [ Config.PATH_Boost - , Config.PATH_INCLUDE_Ogre + include_dirs = [ Config.PATH_Boost + , Config.PATH_INCLUDE_Ogre ] CCFLAGS = '' ## -DBOOST_PYTHON_MAX_ARITY=19' LINKFLAGS = '' @@ -557,21 +551,21 @@ [0, "xcodebuild -project ogrenew/Mac/Samples/Samples.xcodeproj -configuration Release", ''], [0, "cp -R *.framework " + Config.FRAMEWORK_DIR, os.path.join(os.getcwd() ,'ogrenew',"Mac", "build", "Release") ] ] - + libs=[Config.LIB_Boost] lib_dirs = [ Config.PATH_LIB_Boost ] - include_dirs = [ Config.PATH_Boost + include_dirs = [ Config.PATH_Boost , Config.PATH_INCLUDE_Ogre , python_include_dirs ] - + CCFLAGS = '' LINKFLAGS = '' cflags += '' - + CheckIncludes=['boost/python.hpp', 'Ogre.h'] - - + + class ois: active = True pythonModule = True @@ -582,9 +576,9 @@ if isMac(): source=[] if isLinux(): - base = "ois-1.2" + base = "ois" source=[ - [wget, "http://prdownloads.sourceforge.net/wgois/ois-1.2.tar.gz", downloadPath] + [wget, "http://superb-west.dl.sourceforge.net/sourceforge/wgois/ois_1.2.0.tar.gz -O ois.tar.gz", downloadPath] ] buildCmds = [ [0, tar + " zxf " + os.path.join(downloadPath,base)+".tar.gz --overwrite",os.getcwd() ], @@ -596,7 +590,7 @@ [0,'make', os.path.join(os.getcwd(), base )], [0,'make install', os.path.join(os.getcwd(), base )] ] - + buildCmds = [ [0, tar + " zxf " + os.path.join(downloadPath,base)+".tar.gz --overwrite",os.getcwd() ], [0, "./bootstrap" ,os.path.join(os.getcwd(), base )], @@ -612,22 +606,22 @@ # [0, '"c:/Program Files/Microsoft Visual Studio 8/vc/vcpackages/vcbuild.exe" /useenv ois_VC8.sln ', os.path.join(os.getcwd(), base, 'Win32' )], # [0, VCBUILD + " ois_vc8.sln " + "\"Release|Win32\"", os.path.join(os.getcwd(), base, 'Win32' )] ] - + if os.name=='nt': if _PreCompiled: pchstop = 'OIS.h' pchbuild = 'buildpch.cpp' pchincludes = ['boost/python.hpp', 'OIS.h'] - + libs=['OIS_Static',Config.LIB_Boost] else: libs=['OIS',Config.LIB_Boost] if os.name=="nt": libs.append ( "User32" ) # needed for static linking - include_dirs = [ Config.PATH_Boost + include_dirs = [ Config.PATH_Boost , Config.PATH_INCLUDE_OIS ] - lib_dirs = [ Config.PATH_LIB_Boost + lib_dirs = [ Config.PATH_LIB_Boost , Config.PATH_LIB_OIS ] ModuleName = 'OIS' @@ -635,7 +629,7 @@ #externalFiles = ['OIS.dll'] if os.sys.platform == 'darwin': LINKFLAGS = '-framework Python -framework Carbon' - + class ogrerefapp: active = True pythonModule = True @@ -660,7 +654,7 @@ , Config.PATH_LIB_ODE , Config.PATH_LIB_OgreRefApp ] - include_dirs = [ Config.PATH_Boost + include_dirs = [ Config.PATH_Boost ,Config.PATH_INCLUDE_Ogre ,Config.PATH_INCLUDE_OgreRefApp ,Config.PATH_INCLUDE_ODE @@ -668,7 +662,7 @@ CCFLAGS = ' -DBOOST_PYTHON_MAX_ARITY=19' ModuleName = 'OgreRefApp' CheckIncludes = ['boost/python.hpp', 'Ogre.h', 'OgreReferenceAppLayer.h', 'ode/ode.h'] - + class ogrenewt: active = True pythonModule = True @@ -689,12 +683,13 @@ #[0, "cp SConscript OgreNewt_Main", baseDir], #[0, "rm SConscript", baseDir], [0, "rm -r ./OgreNewt_Main/inc/boost", baseDir], + [0, "scons prefix=%s boost=%s/include/boost-1_34_1 build libOgreNewt.so" % (PREFIX, PREFIX), baseDir], ##WARNING -- boost include dir name is different than build name (dash not underscore) [0, "scons prefix=%s boost=%s/include/boost-1_34_1 install" % (PREFIX, PREFIX), baseDir], ##WARNING -- boost include dir name is different than build name (dash not underscore) ] include_dirs = [Config.PATH_Boost , Config.PATH_Newton # only one path for Newton - , Config.PATH_INCLUDE_Ogre + , Config.PATH_INCLUDE_Ogre , Config.PATH_INCLUDE_OgreNewt , Config.PATH_INCLUDE_Ogre_Dependencies #needed for OIS/OIS.h ] @@ -702,16 +697,16 @@ ,Config.PATH_LIB_Newton ,Config.PATH_LIB_OgreNewt , Config.PATH_LIB_Ogre_OgreMain - + ] CCFLAGS = ' -DBOOST_PYTHON_MAX_ARITY=19' ModuleName = 'OgreNewt' CheckIncludes=['boost/python.hpp', 'Ogre.h', 'OgreNewt.h', 'Newton.h'] - + class cegui: active = True pythonModule = True - version = "0.5.0b" + version = "0.5.0b" parent = "ogre/gui" name = 'cegui' if isWindows(): @@ -747,16 +742,16 @@ , Config.PATH_INCLUDE_Ogre , Config.PATH_INCLUDE_Ogre_Dependencies ## needed as OgreCEGUI uses CEGUI/.. in #includes ] - + lib_dirs = [ Config.PATH_LIB_Boost ##, Config.PATH_LIB_Ogre_CEGUIRenderer , Config.PATH_LIB_Ogre_OgreMain , Config.PATH_LIB_CEGUI - , Config.PATH_LIB_Ogre_Dependencies + , Config.PATH_LIB_Ogre_Dependencies ] CCFLAGS = ' -DBOOST_PYTHON_MAX_ARITY=19' ModuleName = 'CEGUI' - CheckIncludes = ['boost/python.hpp', 'Ogre.h', 'CEGUI.h', 'OgreCEGUIRenderer.h'] + CheckIncludes = ['boost/python.hpp', 'Ogre.h', 'CEGUI.h', 'OgreCEGUIRenderer.h'] class ode: @@ -771,13 +766,13 @@ lib_dirs = [ Config.PATH_LIB_Boost , Config.PATH_LIB_ODE ] - include_dirs = [ Config.PATH_Boost + include_dirs = [ Config.PATH_Boost , Config.PATH_INCLUDE_ODE , os.path.join(Config.PATH_ODE, 'OPCODE') ] ModuleName = 'ODE' - CheckIncludes = ['boost/python.hpp', 'ode/ode.h'] + CheckIncludes = ['boost/python.hpp', 'ode/ode.h'] source = [ ["wget", "http://prdownloads.sourceforge.net/opende/ode-src-0.9.zip",downloadPath] ] @@ -800,15 +795,15 @@ libs=[Config.LIB_Boost] lib_dirs = [ Config.PATH_LIB_Boost ] - include_dirs = [ Config.PATH_Boost + include_dirs = [ Config.PATH_Boost , Config.PATH_INCLUDE_OPCODE , os.path.join(Config.PATH_INCLUDE_OPCODE, 'Ice' ) ] CCFLAGS = ' -DBAN_OPCODE_AUTOLINK -DICE_NO_DLL ' ModuleName = 'Opcode' - CheckIncludes = ['boost/python.hpp', 'Opcode.h'] - + CheckIncludes = ['boost/python.hpp', 'Opcode.h'] + class caelum: active = True pythonModule = True @@ -825,8 +820,8 @@ ] CheckIncludes=[] libs=[ Config.LIB_Boost, 'OgreMain' ] - ModuleName="caelum" - + ModuleName="caelum" + class ogreode: active = True pythonModule = True @@ -842,7 +837,7 @@ , Config.PATH_LIB_Ogre_OgreMain , Config.PATH_LIB_ODE ] - include_dirs = [ Config.PATH_Boost + include_dirs = [ Config.PATH_Boost , Config.PATH_INCLUDE_ODE , Config.PATH_INCLUDE_OgreOde , Config.PATH_INCLUDE_OgreOdePrefab @@ -864,11 +859,10 @@ libs=[Config.LIB_Boost, 'OgreMain', 'ode', 'OgreOde_Core', 'OgreOde_Prefab', 'OgreOde_Loader' ] CCFLAGS = ' -DBOOST_PYTHON_MAX_ARITY=19' - CheckIncludes = ['boost/python.hpp', 'Ogre.h', 'ode/ode.h', 'ode/odecpp.h', 'OgreOde_Core.h', 'OgreOde_Loader.h', - 'Ogreode_Prefab.h'] - + CheckIncludes = ['boost/python.hpp', 'Ogre.h', 'ode/ode.h', 'ode/odecpp.h', 'OgreOde_Core.h', 'OgreOde_Loader.h', + 'Ogreode_Prefab.h'] ModuleName='OgreOde' - + class quickgui: active = True pythonModule = True @@ -876,9 +870,9 @@ name ='quickgui' parent="ogre/gui" ## note the defined for _QuickGUIExport forces non dll usage - if os.name=='nt': + if os.name=='nt': ## note the defined for _QuickGUIExport forces non dll usage - CCFLAGS = ' -DWIN32 -DNDEBUG -DWINDOWS -D_QuickGUIExport="" -D_PRECOMP' + CCFLAGS = ' -DWIN32 -DNDEBUG -DWINDOWS -D_QuickGUIExport="" -D_PRECOMP' # if _PreCompiled: # pchstop = 'boost/python.hpp' # pchbuild = 'buildpch.cpp' @@ -897,7 +891,7 @@ ] CheckIncludes=[] libs=[ Config.LIB_Boost, 'OgreMain' ] - ModuleName="QuickGUI" + ModuleName="QuickGUI" class navi: active = True @@ -905,7 +899,7 @@ version="1.5" parent="ogre/gui" name ='navi' - CCFLAGS = '-D"WIN32" -D"NDEBUG", -D"WINDOWS"' + CCFLAGS = '-D"WIN32" -D"NDEBUG", -D"WINDOWS"' cflags="" include_dirs = [ Config.PATH_Boost ,Config.PATH_INCLUDE_Ogre @@ -921,7 +915,7 @@ libs=[ Config.LIB_Boost, 'Navi', 'OgreMain','llmozlib', 'user32', 'kernel32.lib', 'gdi32.lib', 'winspool.lib', 'comdlg32.lib', 'advapi32.lib', 'shell32.lib','ole32.lib','oleaut32.lib','uuid.lib' ] - ModuleName="navi" + ModuleName="navi" class betagui: active = True @@ -941,7 +935,7 @@ ] CheckIncludes=[] libs=[ Config.LIB_Boost, 'OgreMain' ] - ModuleName="betagui" + ModuleName="betagui" class ogreforests: active = True @@ -960,16 +954,16 @@ ] CheckIncludes=[] libs=[ Config.LIB_Boost, 'OgreMain' ] - ModuleName="ogreforests" + ModuleName="ogreforests" - + class particleuniverse: active = True pythonModule = True version="0.7" name='particleuniverse' parent="ogre/addons" - CCFLAGS = ' ' + CCFLAGS = ' ' cflags="" include_dirs = [ Config.PATH_Boost, Config.PATH_INCLUDE_Ogre, @@ -981,8 +975,8 @@ ] CheckIncludes=[] libs=[ Config.LIB_Boost, 'OgreMain', 'ParticleUniverse' ] - ModuleName="particleuniverse" - + ModuleName="particleuniverse" + class nxogre: active = True pythonModule = True @@ -1004,7 +998,7 @@ # pchincludes = ['boost/python.hpp', 'nxogre.h'] else: - CCFLAGS = ' -DNX_LINUX -DLINUX -DNX_DISABLE_FLUIDS ' + CCFLAGS = ' -DNX_LINUX -DLINUX -DNX_DISABLE_FLUIDS ' lib_dirs = [Config.PATH_LIB_Boost, Config.PATH_LIB_Ogre_OgreMain, Config.PATH_LIB_NxOgre, @@ -1016,10 +1010,10 @@ libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'NxExtensions', 'PhysXLoader','OgreMain' , 'NxOgreStatic'] else: libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'PhysXCore','PhysXLoader','OgreMain' ] - ModuleName="NxOgre" - - - + ModuleName="NxOgre" + + + class theora: active = True pythonModule = True @@ -1033,18 +1027,18 @@ ] for d in Config.PATH_INCLUDE_OggVorbisTheora: include_dirs.append( d ) - + if os.name == 'nt': CCFLAGS = ' -D"WIN32" ' - + lib_dirs = [Config.PATH_LIB_Boost, Config.PATH_LIB_Ogre_OgreMain, Config.PATH_LIB_Theora, ] CheckIncludes=[] libs=[ Config.LIB_Boost, 'Plugin_TheoraVideoSystem','OgreMain' ] - ModuleName="theora" - + ModuleName="theora" + class plib: active = True pythonModule = True @@ -1057,14 +1051,14 @@ Config.PATH_THIRDPARTY # needed as net.h includes via plib/xxxx ] lib_dirs = [ Config.PATH_LIB_Boost, - ] + ] ModuleName = "plib" CheckIncludes=[] if os.name == "nt": libs = [ Config.LIB_Boost, 'winmm', 'User32','wsock32', 'opengl32.lib','glu32.lib' ] else: libs = [ Config.LIB_Boost ] # Note sure what linux libraries are needed - + class physx: active = True pythonModule = True @@ -1080,7 +1074,7 @@ if os.name == 'nt': CCFLAGS = ' -D"WIN32" ' else: - CCFLAGS = ' -D"LINUX" ' + CCFLAGS = ' -D"LINUX" ' lib_dirs = [Config.PATH_LIB_Boost, Config.PATH_LIB_Ogre_OgreMain, Config.PATH_LIB_PhysX @@ -1090,7 +1084,7 @@ libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'NxExtensions', 'PhysXLoader' ] else: libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'PhysXCore', 'PhysXLoader' ] - ModuleName="PhysX" + ModuleName="PhysX" class nxogre_09: active = True @@ -1109,7 +1103,7 @@ CCFLAGS = ' -DWIN32 -DNxExport="" ' else: - CCFLAGS = ' -DNX_LINUX -DLINUX -DNX_DISABLE_FLUIDS ' + CCFLAGS = ' -DNX_LINUX -DLINUX -DNX_DISABLE_FLUIDS ' lib_dirs = [Config.PATH_LIB_Boost, Config.PATH_LIB_Ogre_OgreMain, Config.PATH_LIB_PhysX @@ -1119,7 +1113,7 @@ libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'NxExtensions', 'PhysXLoader','OgreMain' ] else: libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'PhysXCore','PhysXLoader','OgreMain' ] - ModuleName="NxOgre_09" + ModuleName="NxOgre" class ogreal: active = True @@ -1127,37 +1121,37 @@ version="0.3" name='ogreal' parent = "ogre/sound" - + include_dirs = [ Config.PATH_Boost , Config.PATH_INCLUDE_Ogre , Config.PATH_INCLUDE_OgreAL , Config.PATH_INCLUDE_OGG , Config.PATH_INCLUDE_VORBIS , Config.PATH_INCLUDE_OPENAL - ] - if os.name=='nt': + ] + if os.name=='nt': lib_dirs = [ Config.PATH_LIB_Boost - ,Config.PATH_LIB_Ogre_OgreMain + ,Config.PATH_LIB_Ogre_OgreMain ,os.path.join(Config.PATH_OGG, 'win32', 'Static_Release') ,os.path.join(Config.PATH_VORBIS, 'win32','Vorbis_Static_Release') ,os.path.join(Config.PATH_VORBIS, 'win32','VorbisEnc_Static_Release') ,os.path.join(Config.PATH_VORBIS, 'win32','VorbisFile_Static_Release') ,os.path.join(Config.PATH_OPENAL, 'libs','Win32') - ] + ] else: lib_dirs = [ Config.PATH_LIB_Boost - ,Config.PATH_LIB_Ogre_OgreMain - ] - + ,Config.PATH_LIB_Ogre_OgreMain + ] + if os.name =='nt': - CCFLAGS = ' -DOgreAL_Export="" -DWIN32 -DNDEBUG -D_LIB -D_WIN32 -D_WINDOWS -DVORBIS_IEEE_FLOAT32 -D_USE_NON_INTEL_COMPILER ' - libs=[Config.LIB_Boost, 'OgreMain', - 'ogg_static', + CCFLAGS = ' -DOgreAL_Export="" -DWIN32 -DNDEBUG -D_LIB -D_WIN32 -D_WINDOWS -DVORBIS_IEEE_FLOAT32 -D_USE_NON_INTEL_COMPILER ' + libs=[Config.LIB_Boost, 'OgreMain', + 'ogg_static', 'vorbis_static','vorbisfile_static','vorbisenc_static', 'OpenAL32', 'EFX-Util'] ## 'OgreAL' -- going to compile OgreAL ourselves - else: - libs=[Config.LIB_Boost, 'OgreMain', - 'ogg', + else: + libs=[Config.LIB_Boost, 'OgreMain', + 'ogg', 'vorbis','vorbisfile','vorbisenc', 'openal'] ## 'OgreAL' -- going to compile OgreAL ourselves ModuleName = 'OgreAL' @@ -1178,7 +1172,7 @@ [0, "./configure --prefix=%s\nmake\nmake install" % PREFIX, os.path.join(os.getcwd(), "openal-0.0.8")] ] - + class ogrevideoffmpeg: active = True pythonModule = True @@ -1201,7 +1195,7 @@ libs=[ Config.LIB_Boost, 'OgreMain', 'avformat-52', 'avcodec-51', 'avutil-49' ] else: libs=[ Config.LIB_Boost, 'OgreMain', 'avformat', 'avcodec', 'avutil', 'z', 'GL', 'GLU', 'Xxf86vm', 'Xext', 'X11' ] - ModuleName="ogrevideoffmpeg" + ModuleName="ogrevideoffmpeg" class ogredshow: active = False @@ -1209,9 +1203,9 @@ version="0.1" name='ogredshow' parent="ogre/addons" - if os.name=='nt': + if os.name=='nt': ## note the defined for _ETManagerExport forces non dll usage - CCFLAGS = ' -DWIN32 -DNDEBUG -DWINDOWS -D_ETManagerExport="" ' + CCFLAGS = ' -DWIN32 -DNDEBUG -DWINDOWS -D_ETManagerExport="" ' else: CCFLAGS = '' cflags = "" @@ -1221,12 +1215,12 @@ ] lib_dirs = [Config.PATH_LIB_Boost, Config.PATH_LIB_Ogre_OgreMain, - + ] CheckIncludes=[] libs=[ Config.LIB_Boost, 'OgreMain','Strmiids' , 'ole32'] - ModuleName="ogredshow" - + ModuleName="ogredshow" + class et: ## editable terrain active = True pythonModule = True @@ -1242,9 +1236,9 @@ Config.PATH_et ] ModuleName = 'et' - CheckIncludes = ['boost/python.hpp'] + CheckIncludes = ['boost/python.hpp'] cflags = "" - + class bullet: active = True pythonModule = True @@ -1259,7 +1253,7 @@ lib_dirs = [ Config.PATH_LIB_Boost , Config.PATH_LIB_Bullet ] - include_dirs = [ Config.PATH_Boost + include_dirs = [ Config.PATH_Boost , Config.PATH_INCLUDE_Bullet ] source=[ @@ -1273,9 +1267,9 @@ ] ModuleName = 'bullet' - CheckIncludes = ['boost/python.hpp'] + CheckIncludes = ['boost/python.hpp'] cflags = "" - + class ogrebulletc: # active = True pythonModule = True @@ -1283,16 +1277,16 @@ version = "1.0" cflags = "" parent = "ogre/physics" - libs = [Config.LIB_Boost, 'OgreMain', + libs = [Config.LIB_Boost, 'OgreMain', 'LibBulletCollision', 'LibBulletDynamics' ] if os.name == 'nt': - libs.append('LibBulletMath') + libs.append('LibBulletMath') include_dirs = [Config.PATH_Boost , Config.PATH_INCLUDE_Bullet , os.path.join(Config.PATH_OgreBullet, 'Collisions' ) - , Config.PATH_INCLUDE_Ogre - , Config.PATH_INCLUDE_Ogre_Dependencies + , Config.PATH_INCLUDE_Ogre + , Config.PATH_INCLUDE_Ogre_Dependencies ] lib_dirs = [ Config.PATH_LIB_Boost ,Config.PATH_LIB_Bullet @@ -1303,7 +1297,7 @@ else: CCFLAGS = ' -D_PRECOMP ' ModuleName = 'OgreBulletC' - CheckIncludes=['boost/python.hpp', 'Ogre.h'] + CheckIncludes=['boost/python.hpp', 'Ogre.h'] class ogrebulletd: # active = True @@ -1312,17 +1306,17 @@ name='ogrebulletd' cflags = "" parent = "ogre/physics" - libs = [Config.LIB_Boost, 'OgreMain', + libs = [Config.LIB_Boost, 'OgreMain', 'LibBulletCollision', 'LibBulletDynamics' ] if os.name == 'nt': - libs.append('LibBulletMath') + libs.append('LibBulletMath') include_dirs = [Config.PATH_Boost , Config.PATH_INCLUDE_Bullet , os.path.join(Config.PATH_OgreBullet, 'Collisions' ) , os.path.join(Config.PATH_OgreBullet, 'Dynamics' ) - , Config.PATH_INCLUDE_Ogre - , Config.PATH_INCLUDE_Ogre_Dependencies + , Config.PATH_INCLUDE_Ogre + , Config.PATH_INCLUDE_Ogre_Dependencies ] lib_dirs = [ Config.PATH_LIB_Boost ,Config.PATH_LIB_Bullet @@ -1333,8 +1327,8 @@ else: CCFLAGS = ' -D_PRECOMP ' ModuleName = 'OgreBulletD' - CheckIncludes=['boost/python.hpp', 'Ogre.h'] - + CheckIncludes=['boost/python.hpp', 'Ogre.h'] + class noise: active = True pythonModule = True @@ -1351,8 +1345,8 @@ ] CheckIncludes=[] libs=[ Config.LIB_Boost] - ModuleName="noise" - + ModuleName="noise" + class watermesh: active = True pythonModule = True @@ -1369,8 +1363,8 @@ ] CheckIncludes=[] libs=[ Config.LIB_Boost, 'OgreMain' ] - ModuleName="watermesh" - + ModuleName="watermesh" + class ofusion: active = True pythonModule = True @@ -1387,8 +1381,8 @@ ] CheckIncludes=[] libs=[ Config.LIB_Boost, 'OgreMain' ] - ModuleName="ofusion" - + ModuleName="ofusion" + class cadunetree: active = True pythonModule = True @@ -1405,7 +1399,7 @@ ] CheckIncludes=[] libs=[ Config.LIB_Boost, 'OgreMain' ] - ModuleName="cadunetree" + ModuleName="cadunetree" class opensteer: active = True @@ -1423,7 +1417,7 @@ ] CheckIncludes=[] libs=[ Config.LIB_Boost, 'opensteer' ] - ModuleName="opensteer" + ModuleName="opensteer" class hydrax: active = True @@ -1442,16 +1436,16 @@ Config.PATH_LIB_Ogre_OgreMain ] except: - pass + pass CheckIncludes=[] libs=[ Config.LIB_Boost, 'OgreMain', 'hydrax' ] - ModuleName="hydrax" - + ModuleName="hydrax" + ############################################################################################ ## Here is the master list.... ## Keep eveything here in lowercase so the over rides work :) - + projects = { 'ois' : ois , 'ogre' : ogre @@ -1485,7 +1479,7 @@ , 'particleuniverse' : particleuniverse , 'cadunetree' : cadunetree ,'opensteer' : opensteer -} +} # # let's setup some defaults @@ -1516,14 +1510,14 @@ # # break # # if not found: # # print "WARNING: Unable to find %s library (%s class) in lib_dirs" % (libfile, name) - + # # a couple of specials that should be done differently gccxml_bin = Config.gccxml_bin -pyplusplus_install_dir = Config.pyplusplus_install_dir - -rpath= Config.RPATH - +pyplusplus_install_dir = Config.pyplusplus_install_dir + +rpath= Config.RPATH + for name, cls in projects.items(): # little hack to allow overriding of settings from the PythonOgreConfig_xxxxx.py file @@ -1532,10 +1526,10 @@ _class = Config.__dict__[name] # get the class for key, value in _class.__dict__.items(): if not key.startswith('_'): - cls.__dict__[key] = value - print "Set %s.%s to %s" % (name, key, value) - - + cls.__dict__[key] = value + print "Set %s.%s to %s" % (name, key, value) + + ##CheckPaths( cls, name ) cls.root_dir = os.path.join( root_dir, 'code_generators', name ) cls.dir_name = name + '_' + str(cls.version) @@ -1543,8 +1537,8 @@ cls.cache_file = os.path.join( declarations_cache_dir, cls.dir_name + '_cache.xml' ) if isMac(): # On the mac the Ogre library is lined in with the -framework command in scons - try: - cls.libs.remove('OgreMain') + try: + cls.libs.remove('OgreMain') except: pass ## and we have a commond set of flags that I will set here... This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |