[Python-ogre-commit] SF.net SVN: python-ogre: [552] trunk/python-ogre
Brought to you by:
andy_miller,
roman_yakovenko
From: <and...@us...> - 2008-01-16 05:42:59
|
Revision: 552 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=552&view=rev Author: andy_miller Date: 2008-01-15 21:43:04 -0800 (Tue, 15 Jan 2008) Log Message: ----------- Support for dual NxOgre versions Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/PythonOgreConfig_posix.py trunk/python-ogre/code_generators/nxogre_09/generate_code.py trunk/python-ogre/demos/ogre/Demo_BSP.py trunk/python-ogre/demos/ogre/SampleLoadingBar.py trunk/python-ogre/demos/ogre/quake3settings.cfg trunk/python-ogre/environment.py trunk/python-ogre/setup.py Removed Paths: ------------- trunk/python-ogre/ThirdParty/nxogre/FireState.cpp trunk/python-ogre/ThirdParty/nxogre/FireState.h Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2008-01-16 05:33:53 UTC (rev 551) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2008-01-16 05:43:04 UTC (rev 552) @@ -54,8 +54,8 @@ PATH_et = os.path.join(PATH_THIRDPARTY, 'et') PATH_caelum = os.path.join(PATH_THIRDPARTY, 'caelum') PATH_NxOgre= os.path.join(PATH_THIRDPARTY, 'nxogre') +PATH_NxOgre_09= os.path.join(PATH_THIRDPARTY, 'nxogre_0.9') PATH_watermesh= os.path.join(PATH_THIRDPARTY, 'watermesh') -# PATH_NxOgre= os.path.join(BASE_DIR, 'nxogre/NxOgre') PATH_noise= os.path.join(PATH_THIRDPARTY, 'noise') PATH_ofusion= os.path.join(PATH_THIRDPARTY, 'ofusion') PATH_cadunetree= os.path.join(PATH_THIRDPARTY, 'cadunetree') @@ -140,6 +140,7 @@ PATH_INCLUDE_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'samples/Common/CEGUIRenderer/include') PATH_INCLUDE_quickgui = PATH_quickgui PATH_INCLUDE_NxOgre= PATH_NxOgre +PATH_INCLUDE_NxOgre_09= PATH_NxOgre_09 # PATH_INCLUDE_NxOgre= os.path.join(PATH_NxOgre, 'include') PATH_INCLUDE_Bullet= os.path.join(PATH_Bullet, 'src') PATH_INCLUDE_freetype= os.path.join(PATH_INCLUDE_quickgui,'FreeType2.3.5') Modified: trunk/python-ogre/PythonOgreConfig_posix.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_posix.py 2008-01-16 05:33:53 UTC (rev 551) +++ trunk/python-ogre/PythonOgreConfig_posix.py 2008-01-16 05:43:04 UTC (rev 552) @@ -67,6 +67,7 @@ PATH_ofusion= os.path.join(PATH_THIRDPARTY, 'ofusion') PATH_ogrevideoffmpeg = os.path.join(PATH_THIRDPARTY,'ffmpeg') PATH_NxOgre= os.path.join(PATH_THIRDPARTY, 'nxogre') +PATH_NxOgre_09= os.path.join(PATH_THIRDPARTY, 'nxogre_0.9') # PATH_NxOgre= os.path.join(BASE_DIR, 'nxogre/NxOgre') PATH_Bullet= os.path.join(BASE_DIR, 'bullet-2.64') ###PATH_PhysX= os.path.join(BASE_DIR, 'Physx/v2.7.3/SDKs') @@ -149,6 +150,7 @@ PATH_INCLUDE_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'Samples/Common/CEGUIRenderer/include') PATH_INCLUDE_quickgui = PATH_quickgui PATH_INCLUDE_NxOgre= PATH_NxOgre +PATH_INCLUDE_NxOgre_09= PATH_NxOgre_09 # PATH_INCLUDE_NxOgre= os.path.join(PATH_NxOgre, 'include') PATH_INCLUDE_Bullet = os.path.join( PATH_Bullet, 'src') PATH_INCLUDE_betagui = PATH_betagui Deleted: trunk/python-ogre/ThirdParty/nxogre/FireState.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/FireState.cpp 2008-01-16 05:33:53 UTC (rev 551) +++ trunk/python-ogre/ThirdParty/nxogre/FireState.cpp 2008-01-16 05:43:04 UTC (rev 552) @@ -1 +0,0 @@ -// FireState Deleted: trunk/python-ogre/ThirdParty/nxogre/FireState.h =================================================================== Modified: trunk/python-ogre/code_generators/nxogre_09/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/nxogre_09/generate_code.py 2008-01-16 05:33:53 UTC (rev 551) +++ trunk/python-ogre/code_generators/nxogre_09/generate_code.py 2008-01-16 05:43:04 UTC (rev 552) @@ -631,8 +631,8 @@ # NOTE: If you update the source library code you need to manually delete the cache .XML file # xml_cached_fc = parser.create_cached_source_fc( - os.path.join( environment.nxogre_0.9.root_dir, "python_nxogre.h" ) - , environment.nxogre_0.9.cache_file ) + os.path.join( environment.nxogre_09.root_dir, "python_nxogre.h" ) + , environment.nxogre_09.cache_file ) if os.name == 'nt': defined_symbols = [ 'NxExport','OGRE_NONCLIENT_BUILD', 'OGRE_GCC_VISIBILITY', 'WIN32', 'GCC_XML']#NXOGRE_EXPORTS' else: @@ -641,7 +641,7 @@ if environment._USE_THREADS: defined_symbols.append('BOOST_HAS_THREADS') defined_symbols.append('BOOST_HAS_WINTHREADS') - defined_symbols.append( 'VERSION_' + environment.nxogre_0.9.version ) + defined_symbols.append( 'VERSION_' + environment.nxogre_09.version ) undefined_symbols = [] # @@ -650,7 +650,7 @@ mb = module_builder.module_builder_t( [ xml_cached_fc ] , gccxml_path=environment.gccxml_bin , working_directory=environment.root_dir - , include_paths=environment.nxogre_0.9.include_dirs + , include_paths=environment.nxogre_09.include_dirs , define_symbols=defined_symbols # # , undefine_symbols = undefined_symbols , indexing_suite_version=2 @@ -717,7 +717,7 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'PROJECT_version' : '"%s"' % environment.nxogre_0.9.version.replace("\n", "\\\n") + common_utils.add_constants( mb, { 'PROJECT_version' : '"%s"' % environment.nxogre_09.version.replace("\n", "\\\n") , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) ## need to create a welcome doc string for this... @@ -730,21 +730,21 @@ # ########################################################################################## extractor = exdoc.doc_extractor("") # I'm excluding the UTFstring docs as lots about nothing - mb.build_code_creator (module_name='_nxogre_0.9_' , doc_extractor= extractor ) + mb.build_code_creator (module_name='_nxogre_09_' , doc_extractor= extractor ) - for inc in environment.nxogre_0.9.include_dirs: + for inc in environment.nxogre_09.include_dirs: mb.code_creator.user_defined_directories.append(inc ) - mb.code_creator.user_defined_directories.append( environment.nxogre_0.9.generated_dir ) - mb.code_creator.replace_included_headers( customization_data.header_files( environment.nxogre_0.9.version ) ) + mb.code_creator.user_defined_directories.append( environment.nxogre_09.generated_dir ) + mb.code_creator.replace_included_headers( customization_data.header_files( environment.nxogre_09.version ) ) - huge_classes = map( mb.class_, customization_data.huge_classes( environment.nxogre_0.9.version ) ) + huge_classes = map( mb.class_, customization_data.huge_classes( environment.nxogre_09.version ) ) - mb.split_module(environment.nxogre_0.9.generated_dir, huge_classes,use_files_sum_repository=False) + mb.split_module(environment.nxogre_09.generated_dir, huge_classes,use_files_sum_repository=False) ## now we need to ensure a series of headers and additional source files are ## copied to the generaated directory.. - common_utils.copyTree ( sourcePath = environment.Config.PATH_NxOgre_0.9, - destPath = environment.nxogre_0.9.generated_dir, + common_utils.copyTree ( sourcePath = environment.Config.PATH_NxOgre_09, + destPath = environment.nxogre_09.generated_dir, recursive=False ) if __name__ == '__main__': Modified: trunk/python-ogre/demos/ogre/Demo_BSP.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_BSP.py 2008-01-16 05:33:53 UTC (rev 551) +++ trunk/python-ogre/demos/ogre/Demo_BSP.py 2008-01-16 05:43:04 UTC (rev 552) @@ -55,12 +55,12 @@ cf.load("quake3settings.cfg") - self.mQuakePk3 = cf.getSetting("Pak0Location") + self.mQuakePk3 = cf.getSetting("Pak1Location") self.mQuakeLevel = cf.getSetting("Map") sf.Application._setUpResources(self) ogre.ResourceGroupManager.getSingleton().addResourceLocation( - self.mQuakePk3, "Zip", ogre.ResourceGroupManager.getSingleton().getWorldResourceGroupName()) + self.mQuakePk3, "FileSystem", 'General') #ogre.ResourceGroupManager.getSingleton().getWorldResourceGroupName()) # Override scene manager (use indoor instead of generic) def _chooseSceneManager(self): Modified: trunk/python-ogre/demos/ogre/SampleLoadingBar.py =================================================================== --- trunk/python-ogre/demos/ogre/SampleLoadingBar.py 2008-01-16 05:33:53 UTC (rev 551) +++ trunk/python-ogre/demos/ogre/SampleLoadingBar.py 2008-01-16 05:43:04 UTC (rev 552) @@ -38,6 +38,7 @@ # */ def __init__ ( self ): ogre.ResourceGroupListener.__init__(self) + def start(self, window,numGroupsInit = 1, numGroupsLoad = 1,initProportion = 0.70): self.mWindow = window self.mNumGroupsInit = numGroupsInit @@ -82,7 +83,7 @@ # Lets assume script loading is 70% self.mProgressBarInc = self.mProgressBarMaxSize * self.mInitProportion / scriptCount self.mProgressBarInc /= self.mNumGroupsInit - self.mLoadingDescriptionElement.setCaption(ogre.UTFString("Parsing scripts...")) + self.mLoadingDescriptionElement.setCaption(ogre.UTFString("Parsing scripts..")) self.mWindow.update() def scriptParseStarted(self, scriptName): @@ -104,13 +105,15 @@ pass def resourceGroupLoadStarted(self, groupName, resourceCount): + ogre.LogManager.getSingleton().logMessage("GroupLoadStarted " + groupName ) if self.mNumGroupsLoad >0 : self.mProgressBarInc = self.mProgressBarMaxSize * (1-self.mInitProportion) / resourceCount self.mProgressBarInc /= self.mNumGroupsLoad - self.mLoadingDescriptionElement.setCaption(ogre.UTFString("Loading resources...")) + self.mLoadingDescriptionElement.setCaption(ogre.UTFString("Loading resources..")) self.mWindow.update() def resourceLoadStarted(self, resource): + ogre.LogManager.getSingleton().logMessage("GroupLoadEnded" ) self.mLoadingCommentElement.setCaption(ogre.UTFString(resource.getName())) self.mWindow.update() @@ -118,10 +121,12 @@ pass def worldGeometryStageStarted(self, description): + ogre.LogManager.getSingleton().logMessage("StageStarted " + description ) self.mLoadingCommentElement.setCaption(ogre.UTFString(description)) self.mWindow.update() def worldGeometryStageEnded(self): + ogre.LogManager.getSingleton().logMessage("StageEnded") self.mLoadingBarElement.setWidth( self.mLoadingBarElement.getWidth() + self.mProgressBarInc) self.mWindow.update() Modified: trunk/python-ogre/demos/ogre/quake3settings.cfg =================================================================== --- trunk/python-ogre/demos/ogre/quake3settings.cfg 2008-01-16 05:33:53 UTC (rev 551) +++ trunk/python-ogre/demos/ogre/quake3settings.cfg 2008-01-16 05:43:04 UTC (rev 552) @@ -1,3 +1,5 @@ -Pak0Location: ../media/packs/ogretestmap.zip +#Pak0Location: ../media/packs/ogretestmap.zip #Map: maps/q3dm3.bsp -Map: ogretestmap.bsp +#Map: ogretestmap.bsp +Pak1Location: c:/temp/ww +Map: maps/wamphi1.bsp Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-01-16 05:33:53 UTC (rev 551) +++ trunk/python-ogre/environment.py 2008-01-16 05:43:04 UTC (rev 552) @@ -957,7 +957,36 @@ libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'PhysXCore','PhysXLoader','OgreMain' ] ModuleName="NxOgre" +class nxogre_09: + active = True + pythonModule = True + version="0.9" + name='nxogre_09' + parent="ogre/physics" + cflags="" + include_dirs = [ Config.PATH_Boost, + Config.PATH_INCLUDE_Ogre, + Config.PATH_INCLUDE_NxOgre, + ] + for d in Config.PATH_INCLUDE_PhysX: + include_dirs.append( d ) + if os.name == 'nt': + CCFLAGS = ' -DWIN32 -DNxExport="" ' + + else: + CCFLAGS = ' -DNX_LINUX -DLINUX -DNX_DISABLE_FLUIDS ' + lib_dirs = [Config.PATH_LIB_Boost, + Config.PATH_LIB_Ogre_OgreMain, + Config.PATH_LIB_PhysX + ] + CheckIncludes=[] + if os.name =='nt': + libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'NxExtensions', 'PhysXLoader','OgreMain' ] + else: + libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'PhysXCore','PhysXLoader','OgreMain' ] + ModuleName="NxOgre_09" + class theora: active = True pythonModule = True @@ -1081,7 +1110,7 @@ [0, "tar zxf " + os.path.join(downloadPath, "libogg-1.1.3.tar.gz"), ''], [0, "tar zxf " + os.path.join(downloadPath, "libvorbis-1.2.0.tar.gz"), ''], [0, "./configure --prefix=%s\nmake\nmake install" % PREFIX, os.path.join(os.getcwd(), "libogg-1.1.3")], - [0, "./configure --prefix=%s\nmake\nmake install" % PREFIX, os.path.join(os.getcwd(), "libvorbis-1.2.0")], + [0, "./configure --prefix=%s\nmake\nmake install" % PREFIX, os.path.join(os.getcwd(), "libvorbis-1.2.0")], [0, "sed --in-place -s 's|( ALCvoid )|()|' alc.h",os.path.join(os.getcwd(),"openal-0.0.8","common", "include", "AL")], [0, "aclocal\n./autogen.sh", os.path.join(os.getcwd(),"openal-0.0.8")], [0, "./configure --prefix=%s\nmake\nmake install" % PREFIX, os.path.join(os.getcwd(), "openal-0.0.8")] @@ -1334,6 +1363,7 @@ , 'quickgui' : quickgui , 'opcode' : opcode , 'nxogre' : nxogre + , 'nxogre_09' : nxogre_09 , 'bullet' : bullet , 'physx' : physx , 'betagui': betagui Modified: trunk/python-ogre/setup.py =================================================================== --- trunk/python-ogre/setup.py 2008-01-16 05:33:53 UTC (rev 551) +++ trunk/python-ogre/setup.py 2008-01-16 05:43:04 UTC (rev 552) @@ -64,7 +64,7 @@ 'ogre.sound', 'ogre.sound.OgreAL', 'ogre.physics', 'ogre.physics.ODE', 'ogre.physics.OgreRefApp', 'ogre.physics.OgreOde', 'ogre.physics.OgreNewt', 'ogre.physics.Opcode', - 'ogre.physics.bullet','ogre.physics.PhysX','ogre.physics.NxOgre', + 'ogre.physics.bullet','ogre.physics.PhysX','ogre.physics.NxOgre','ogre.physics.NxOgre_09' 'ogre.physics.OgreBulletC', 'ogre.physics.OgreBulletD', 'ogre.addons','ogre.addons.theora', 'ogre.addons.ogrevideoffmpeg', 'ogre.addons.ogredshow', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |