[Python-ogre-commit] SF.net SVN: python-ogre: [594] trunk/python-ogre
Brought to you by:
andy_miller,
roman_yakovenko
From: <and...@us...> - 2008-06-14 14:18:36
|
Revision: 594 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=594&view=rev Author: andy_miller Date: 2008-06-14 07:18:41 -0700 (Sat, 14 Jun 2008) Log Message: ----------- Further Ogre 1.7 support updates Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/ThirdParty/nxogre/NxOgreStable.h trunk/python-ogre/code_generators/bullet/generate_code.py trunk/python-ogre/code_generators/cegui/generate_code.py trunk/python-ogre/code_generators/common_utils/__init__.py trunk/python-ogre/code_generators/ogre/generate_code.py trunk/python-ogre/code_generators/ogreode/generate_code.py trunk/python-ogre/code_generators/particleuniverse/generate_code.py trunk/python-ogre/environment.py Added Paths: ----------- trunk/python-ogre/patch/ogre_svn.patch Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2008-06-12 13:21:31 UTC (rev 593) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2008-06-14 14:18:41 UTC (rev 594) @@ -62,7 +62,8 @@ PATH_plib = os.path.join(PATH_THIRDPARTY, 'plib') PATH_et = os.path.join(PATH_THIRDPARTY, 'et') PATH_caelum = os.path.join(PATH_THIRDPARTY, 'caelum') -PATH_NxOgre= os.path.join(BASE_DIR, 'nxogre') +PATH_NxOgre= os.path.join(BASE_DIR, 'nxogre', 'NxOgre') +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_noise= os.path.join(PATH_THIRDPARTY, 'noise') @@ -71,7 +72,7 @@ PATH_opensteer = os.path.join(BASE_DIR, 'opensteer', 'trunk') PATH_ogrevideoffmpeg = os.path.join(PATH_THIRDPARTY,'ffmpeg') -PATH_Bullet= os.path.join(BASE_DIR, 'bullet-2.66') +PATH_Bullet= os.path.join(BASE_DIR, 'bullet-2.69') PATH_PhysX= "c:/program files/NVIDIA Corporation/NVIDIA Physx SDK/v2.8.1/SDKs" PATH_Theora= os.path.join(PATH_OgreAddons,'videoplugin','TheoraVideo') PATH_ffmpeg= os.path.join(PATH_THIRDPARTY,'extra') @@ -151,6 +152,7 @@ PATH_INCLUDE_quickgui = PATH_quickgui PATH_INCLUDE_NxOgre_09= PATH_NxOgre_09 PATH_INCLUDE_NxOgre= os.path.join(PATH_NxOgre, 'include') +PATH_INCLUDE_NxOgre= PATH_NxOgre PATH_INCLUDE_Bullet= os.path.join(PATH_Bullet, 'src') PATH_INCLUDE_freetype= os.path.join(PATH_INCLUDE_quickgui,'FreeType2.3.5') PATH_INCLUDE_betagui = PATH_betagui Modified: trunk/python-ogre/ThirdParty/nxogre/NxOgreStable.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreStable.h 2008-06-12 13:21:31 UTC (rev 593) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreStable.h 2008-06-14 14:18:41 UTC (rev 594) @@ -3,20 +3,20 @@ * all NxOgre source (cpp) files with no exceptions. * \version 1.0-20 * - * \licence NxOgre a wrapper for the PhysX physics library. - * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software + * \licence NxOgre a wrapper for the PhysX physics library. + * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -36,30 +36,30 @@ #include "NxOgreAllocator.h" -#define Nx_Version_Major 1 -#define Nx_Version_Minor 0 -#define Nx_Version_Commit 19 -#define Nx_Version_Codename "Bleeding Edge" - -#if (NX_DEBUG == 0) -# define Nx_Version_Full "NxOgre 1.0.19 Bleeding Edge" -#else -# define Nx_Version_Full "NxOgre 1.0.19 Bleeding Edge (Debug)" +#define Nx_Version_Major 1 +#define Nx_Version_Minor 0 +#define Nx_Version_Commit 19 +#define Nx_Version_Codename "Bleeding Edge" + +#if (NX_DEBUG == 0) +# define Nx_Version_Full "NxOgre 1.0.19 Bleeding Edge" +#else +# define Nx_Version_Full "NxOgre 1.0.19 Bleeding Edge (Debug)" #endif #if NX_USE_OGRE # include "OgrePrerequisites.h" #endif -#if NX_USE_OGRE -# include <OgreNoMemoryMacros.h> -#endif +// #if NX_USE_OGRE +// # include <OgreNoMemoryMacros.h> +// #endif #include <Nx.h> #include <NxPhysics.h> -#if NX_USE_OGRE -# include <OgreMemoryMacros.h> -#endif +// #if NX_USE_OGRE +// # include <OgreMemoryMacros.h> +// #endif #endif Modified: trunk/python-ogre/code_generators/bullet/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/bullet/generate_code.py 2008-06-12 13:21:31 UTC (rev 593) +++ trunk/python-ogre/code_generators/bullet/generate_code.py 2008-06-14 14:18:41 UTC (rev 594) @@ -310,7 +310,7 @@ os.path.join( environment.bullet.root_dir, "python_bullet.h" ) , environment.bullet.cache_file ) - defined_symbols = [ 'BULLET_EXPORTS' ] + defined_symbols = [ 'BULLET_EXPORTS', 'BT_DECLARE_ALIGNED_ALLOCATOR()' ] defined_symbols.append( 'VERSION_' + environment.bullet.version ) # Modified: trunk/python-ogre/code_generators/cegui/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/cegui/generate_code.py 2008-06-12 13:21:31 UTC (rev 593) +++ trunk/python-ogre/code_generators/cegui/generate_code.py 2008-06-14 14:18:41 UTC (rev 594) @@ -119,7 +119,7 @@ ## CEGUI::WindowManager::loadWindowLayout can take a function pointer as an agrument whcih isn't supported yet ## so lets remove the versions that expose the pointer - lo = CEGUI_ns.class_( 'WindowManager' ).member_function( 'loadWindowLayout' ) + lo = CEGUI_ns.class_( 'WindowManager' ).member_function( 'loadWindowLayout', arg_types=[None, None, None, None, None] ) lo.arguments[3].type = lo.arguments[4].type #AJM Not sure how args work so setting the func pointer to a void pointer ## OgreCEGUIRenderer.h has an assumed namespace in one of the default agrs that we need to fix Modified: trunk/python-ogre/code_generators/common_utils/__init__.py =================================================================== --- trunk/python-ogre/code_generators/common_utils/__init__.py 2008-06-12 13:21:31 UTC (rev 593) +++ trunk/python-ogre/code_generators/common_utils/__init__.py 2008-06-14 14:18:41 UTC (rev 594) @@ -94,10 +94,18 @@ continue if mvar.ignore: continue - if declarations.is_array (mvar.type): - template = '''def_readonly("%(mvar)s", &%(ns)s::%(parent)s::%(mvar)s)''' - else: - template = '''def_readwrite("%(mvar)s", &%(ns)s::%(parent)s::%(mvar)s)''' + if type (mvar) == type (declarations.destructor_t): + continue + try: + if declarations.is_array (mvar.type): + template = '''def_readonly("%(mvar)s", &%(ns)s::%(parent)s::%(mvar)s)''' + else: + template = '''def_readwrite("%(mvar)s", &%(ns)s::%(parent)s::%(mvar)s)''' + except AttributeError: + continue + except: + print "**** Error in unnamed_classes", mvar + named_parent.add_code( template % dict( ns=namespace, mvar=mvar.name, parent=named_parent.name ) ) def set_declaration_aliases(global_ns, aliases): Modified: trunk/python-ogre/code_generators/ogre/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogre/generate_code.py 2008-06-12 13:21:31 UTC (rev 593) +++ trunk/python-ogre/code_generators/ogre/generate_code.py 2008-06-14 14:18:41 UTC (rev 594) @@ -231,9 +231,30 @@ # changes for Ogre 1.7 if environment.ogre.version =="1.7": - main_ns.class_("ResourceBackgroundQueue").exclude() # Ogre::ResourceBackgroundQueue::_fireBackgroundLoadingComplete isn't implemented +# main_ns.class_("ResourceBackgroundQueue").exclude() # Ogre::ResourceBackgroundQueue::_fireBackgroundLoadingComplete isn't implemented main_ns.class_("ResourceGroupManager").mem_fun("_notifyWorldGeometryPrepareStageEnded").exclude() main_ns.class_("ResourceGroupManager").mem_fun("_notifyWorldGeometryPrepareStageStarted").exclude() +# # # fix vistrenderables issues: +# # # # for mf in main_ns.member_functions(): +# # # # if mf.name == 'visitRenderables': +# # # # mf.exclude() ## can't do this as too much exclusion +# # BillboardChain::visitRenderables +# # Entity +# # InstancedGeometry::GeometryBucket +# # InstancedGeometry::BatchInstance +# # Light +# # MovablePlane +# # SimpleRenderable +# # BillboardSet +# # Frustum +# # ManualObject +# # ParticleSystem +# # StaticGeometry::Region + + + noncopy=['Camera','Frustum', 'Log'] + for c in noncopy: + main_ns.class_(c).noncopyable = True for cls in main_ns.classes(): if cls.decl_string.startswith ("::Ogre::AllocatedObject") or\ cls.decl_string.startswith("::Ogre::STLAllocator") or\ Modified: trunk/python-ogre/code_generators/ogreode/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogreode/generate_code.py 2008-06-12 13:21:31 UTC (rev 593) +++ trunk/python-ogre/code_generators/ogreode/generate_code.py 2008-06-14 14:18:41 UTC (rev 594) @@ -160,8 +160,9 @@ global_ns = mb.global_ns # global_ns.member_functions('::OgreOde_Prefab::Ragdoll::pick').exclude() # global_ns.mem_fun('::OgreOde_Prefab::Ragdoll::pick', arg_types=[None,None,None]).include() - f = global_ns.mem_fun('::OgreOde_Prefab::Ragdoll::pick', arg_types=[None,None,None]) - f.add_transformation(ft.output('body'), ft.output('position') , alias='pick') + +# # f = global_ns.mem_fun('::OgreOde_Prefab::Ragdoll::pick', arg_types=[None,None,None]) +# # f.add_transformation(ft.output('body'), ft.output('position') , alias='pick') Modified: trunk/python-ogre/code_generators/particleuniverse/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/particleuniverse/generate_code.py 2008-06-12 13:21:31 UTC (rev 593) +++ trunk/python-ogre/code_generators/particleuniverse/generate_code.py 2008-06-14 14:18:41 UTC (rev 594) @@ -60,7 +60,8 @@ main_ns.class_( c ).exclude() excludes = ['::ParticleUniverse::ParticleTechnique::setSpatialHashingParticleSizeUsed', - '::ParticleUniverse::ParticleTechnique::isSpatialHashingParticleSizeUsed' + '::ParticleUniverse::ParticleTechnique::isSpatialHashingParticleSizeUsed', + '::ParticleUniverse::ParticleSystem::setBounds' ] for e in excludes: print "excluding ", e Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-06-12 13:21:31 UTC (rev 593) +++ trunk/python-ogre/environment.py 2008-06-14 14:18:41 UTC (rev 594) @@ -248,7 +248,18 @@ [0, "cp newtonSDK/sdk/*.a %s/lib" % PREFIX, ''], [0, "cp newtonSDK/sdk/*.a ogreaddons/ogrenewt" , ''] ] - + + if isWindows(): + base = 'newton' + source = [ + [wget, "http://www.newtondynamics.com/downloads/NewtonWin-1.53.zip", downloadPath] + ] + + buildCmds = [ + [0, unzip + os.path.join(downloadPath, "NewtonWin-1.53.zip"), ''], + [0, "setup.exe", ''], + ] + class pygccxml: pythonModule = False active = True @@ -691,17 +702,22 @@ [cvs, " -d :pserver:ano...@cv...:/cvsroot/ogre co -D 01052008 -P "+base, os.getcwd()] ] else: - source = [ - [cvs, " -d :pserver:ano...@cv...:/cvsroot/ogre co -P "+base, os.getcwd()] + source = [ ##to fix + [svn, " co :pserver:ano...@cv...:/cvsroot/ogre co -P "+base, os.getcwd()] ] baseDir = os.path.join(os.getcwd(), base ) buildCmds = [ [0, "patch -s -N -i ../../python-ogre/patch/ogrenewt.patch -p0", baseDir], #[0, "cp SConscript OgreNewt_Main", baseDir], #[0, "rm SConscript", baseDir], - [0, "rm -r ./OgreNewt_Main/inc/boost", baseDir], + [0, rm + " ./OgreNewt_Main/inc/boost", baseDir], [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) ] + if isWindows(): + buildCmds = [ + [0, "patch -s -N -i ../../python-ogre/patch/ogrenewt.patch -p0", baseDir], + [0, "rm -r ./OgreNewt_Main/inc/boost", baseDir], + ] include_dirs = [Config.PATH_Boost , Config.PATH_Newton # only one path for Newton @@ -807,15 +823,22 @@ ["wget", "http://prdownloads.sourceforge.net/opende/ode-src-0.9.zip",downloadPath] ] baseDir = os.path.join(os.getcwd(),"ode-0.9") - buildCmds = [ - [0, "unzip -q -o "+ os.path.join(downloadPath,"ode-src-0.9.zip"), ''], - [0, "chmod +x autogen.sh", baseDir], - [0, "./autogen.sh", baseDir], - [0, "./configure --prefix=%s --includedir=%s/include" %(PREFIX, PREFIX), baseDir], - [0, "make", baseDir], - [0, "make install", baseDir] - - ] + if not isWindows(): + buildCmds = [ + [0, unzip + os.path.join(downloadPath,"ode-src-0.9.zip"), ''], + [0, "chmod +x autogen.sh", baseDir], + [0, "./autogen.sh", baseDir], + [0, "./configure --prefix=%s --includedir=%s/include" %(PREFIX, PREFIX), baseDir], + [0, "make", baseDir], + [0, "make install", baseDir] + + ] + else: + buildCmds = [ + [0, unzip + os.path.join(downloadPath,"ode-src-0.9.zip"), ''], + ] + + class opcode: active = True pythonModule = True @@ -937,6 +960,7 @@ name ='navi' CCFLAGS = '-D"WIN32" -D"NDEBUG", -D"WINDOWS"' cflags="" + base = 'navi' include_dirs = [ Config.PATH_Boost ,Config.PATH_INCLUDE_Ogre ,Config.PATH_INCLUDE_navi @@ -952,7 +976,11 @@ 'kernel32.lib', 'gdi32.lib', 'winspool.lib', 'comdlg32.lib', 'advapi32.lib', 'shell32.lib','ole32.lib','oleaut32.lib','uuid.lib' ] ModuleName="navi" - + source = [ + [svn, " checkout http://navi.googlecode.com/svn/trunk/ "+base, os.getcwd()] + ] + + class betagui: active = True pythonModule = True @@ -996,7 +1024,7 @@ class particleuniverse: active = True pythonModule = True - version="0.7" + version="0.8" name='particleuniverse' parent="ogre/addons" CCFLAGS = ' ' @@ -1291,9 +1319,9 @@ class bullet: active = True pythonModule = True - version= "2.66" + version= "2.69" name='bullet' - base = "bullet-2.66" + base = "bullet-" + version baseDir = os.path.join(os.getcwd(), base) parent = "ogre/physics" libs=[Config.LIB_Boost, 'LibBulletCollision', 'LibBulletDynamics'] @@ -1305,16 +1333,24 @@ include_dirs = [ Config.PATH_Boost , Config.PATH_INCLUDE_Bullet ] - source=[ - [wget, "http://downloads.sourceforge.net/bullet/"+base+"A.tgz", downloadPath] + if not isWindows(): + source=[ + [wget, "http://bullet.googlecode.com/files/"+base+".tgz", downloadPath] + ] + buildCmds = [ + [0, "tar zxf " +os.path.join(downloadPath, base)+".tgz", ''], + [0, "cmake . -DCMAKE_INSTALL_PREFIX:PATH=%s" % PREFIX, baseDir], + [0, "make", baseDir], + [0, "find . -name *.a -execdir cp {} %s/lib \;" % PREFIX, baseDir] + ] + else: + source=[ + [wget, "http://bullet.googlecode.com/files/"+base+".zip", downloadPath] ] - buildCmds = [ - [0, "tar zxf " +os.path.join(downloadPath, base)+".tgz", ''], - [0, "cmake . -DCMAKE_INSTALL_PREFIX:PATH=%s" % PREFIX, baseDir], - [0, "make", baseDir], - [0, "find . -name *.a -execdir cp {} %s/lib \;" % PREFIX, baseDir] - ] - + buildCmds = [ + [0, unzip +os.path.join(downloadPath, base)+".zip", ''], + ] + ModuleName = 'bullet' CheckIncludes = ['boost/python.hpp'] cflags = "" @@ -1451,7 +1487,7 @@ ModuleName="cadunetree" class opensteer: - active = True + active = False pythonModule = True version="1.0" name='opensteer' Added: trunk/python-ogre/patch/ogre_svn.patch =================================================================== --- trunk/python-ogre/patch/ogre_svn.patch (rev 0) +++ trunk/python-ogre/patch/ogre_svn.patch 2008-06-14 14:18:41 UTC (rev 594) @@ -0,0 +1,98 @@ +Index: OgreMovableObject.h +=================================================================== +--- OgreMovableObject.h (revision 7604) ++++ OgreMovableObject.h (working copy) +@@ -479,7 +479,7 @@ + included too. + */ + virtual void visitRenderables(Renderable::Visitor* visitor, +- bool debugRenderables = false) = 0; ++ bool debugRenderables = false) { throw std::runtime_error ( std::string ("Virtual function MovableObject::visitRenderables called!") ); } + + /** Sets whether or not the debug display of this object is enabled. + @remarks +Index: OgreRenderQueueListener.h +=================================================================== +--- OgreRenderQueueListener.h (revision 7604) ++++ OgreRenderQueueListener.h (working copy) +@@ -31,7 +31,9 @@ + + #include "OgrePrerequisites.h" + #include "OgreRenderQueue.h" ++#include <stdexcept> + ++ + namespace Ogre { + + /** Abstract interface which classes must implement if they wish to receive +@@ -65,7 +67,7 @@ + for this queue group. + */ + virtual void renderQueueStarted(uint8 queueGroupId, const String& invocation, +- bool& skipThisInvocation) = 0; ++ bool& skipThisInvocation) { throw std::runtime_error ( std::string ("Virtual function RenderQueueListener::renderQueueStarted called!") ); } + + /** Event raised after a queue group is rendered. + @remarks +@@ -80,7 +82,7 @@ + events will also be fired for it again. + */ + virtual void renderQueueEnded(uint8 queueGroupId, const String& invocation, +- bool& repeatThisInvocation) = 0; ++ bool& repeatThisInvocation) { throw std::runtime_error ( std::string ("Virtual function RenderQueueListener::renderQueueEnded called!") ); } + }; + + } +Index: OgreDataStream.h +=================================================================== +--- OgreDataStream.h (revision 7604) ++++ OgreDataStream.h (working copy) +@@ -33,6 +33,7 @@ + #include "OgreString.h" + #include "OgreSharedPtr.h" + #include <istream> ++#include <stdexcept> + + namespace Ogre { + +@@ -79,7 +80,7 @@ + @param count Number of bytes to read + @returns The number of bytes read + */ +- virtual size_t read(void* buf, size_t count) = 0; ++ virtual size_t read(void* buf, size_t count) { throw std::runtime_error ( std::string ("Virtual function DataStream::read called!") ); } + /** Get a single line from the stream. + @remarks + The delimiter character is not included in the data +@@ -146,7 +147,7 @@ + /** Returns the total size of the data to be read from the stream, + or 0 if this is indeterminate for this stream. + */ +- size_t size(void) const { return mSize; } ++ virtual size_t size(void) const { return mSize; } + + /** Close the stream; this makes further operations invalid. */ + virtual void close(void) = 0; +Index: OgreHardwareBuffer.h +=================================================================== +--- OgreHardwareBuffer.h (revision 7604) ++++ OgreHardwareBuffer.h (working copy) +@@ -31,7 +31,9 @@ + + // Precompiler options + #include "OgrePrerequisites.h" ++#include <stdexcept> + ++ + namespace Ogre { + + /** Abstract class defining common features of hardware buffers. +@@ -244,7 +246,7 @@ + @param pDest The area of memory in which to place the data, must be large enough to + accommodate the data! + */ +- virtual void readData(size_t offset, size_t length, void* pDest) = 0; ++ virtual void readData(size_t offset, size_t length, void* pDest) { throw std::runtime_error ( std::string ("Virtual function HardwareBuffer::readData called!") ); } + /** Writes data to the buffer from an area of system memory; note that you must + ensure that your buffer is big enough. + @param offset The byte offset from the start of the buffer to start writing This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |