[Python-ogre-commit] SF.net SVN: python-ogre: [531] trunk/python-ogre
Brought to you by:
andy_miller,
roman_yakovenko
|
From: <and...@us...> - 2008-01-08 02:44:52
|
Revision: 531
http://python-ogre.svn.sourceforge.net/python-ogre/?rev=531&view=rev
Author: andy_miller
Date: 2008-01-07 18:44:54 -0800 (Mon, 07 Jan 2008)
Log Message:
-----------
Added Cadunetree to the modules
Modified Paths:
--------------
trunk/python-ogre/PythonOgreConfig_nt.py
trunk/python-ogre/PythonOgreConfig_posix.py
trunk/python-ogre/environment.py
trunk/python-ogre/setup.py
Added Paths:
-----------
trunk/python-ogre/code_generators/cadunetree/
trunk/python-ogre/code_generators/cadunetree/customization_data.py
trunk/python-ogre/code_generators/cadunetree/generate_code.py
trunk/python-ogre/code_generators/cadunetree/hand_made_wrappers.py
trunk/python-ogre/code_generators/cadunetree/python_cadunetree.h
trunk/python-ogre/code_generators/cadunetree/python_cadunetree_aliases.h
trunk/python-ogre/code_generators/cadunetree/python_cadunetree_sizeof.h
trunk/python-ogre/packages_2.5/ogre/addons/cadunetree/
trunk/python-ogre/packages_2.5/ogre/addons/cadunetree/__init__.py
Modified: trunk/python-ogre/PythonOgreConfig_nt.py
===================================================================
--- trunk/python-ogre/PythonOgreConfig_nt.py 2008-01-06 11:30:00 UTC (rev 530)
+++ trunk/python-ogre/PythonOgreConfig_nt.py 2008-01-08 02:44:54 UTC (rev 531)
@@ -52,6 +52,7 @@
# 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')
PATH_ogrevideoffmpeg = os.path.join(PATH_THIRDPARTY,'ffmpeg')
Modified: trunk/python-ogre/PythonOgreConfig_posix.py
===================================================================
--- trunk/python-ogre/PythonOgreConfig_posix.py 2008-01-06 11:30:00 UTC (rev 530)
+++ trunk/python-ogre/PythonOgreConfig_posix.py 2008-01-08 02:44:54 UTC (rev 531)
@@ -30,9 +30,9 @@
# and the Py++ directory as sometimes we need access to the code repository there
pyplusplus_install_dir = os.path.join(BASE_DIR,'pygccxml')
-SDK = False
-if os.sys.platform == 'darwin': # we use the pre built sdk for OSX
- SDK = True
+SDK = False
+if os.sys.platform == 'darwin': # we use the pre built sdk for OSX
+ SDK = True
# # ## Parent directories of the libraries
PATH_THIRDPARTY = os.path.join(module_dir, 'ThirdParty' )
@@ -74,6 +74,7 @@
PATH_ffmpeg= os.path.join(BASE_DIR, 'ffmpeg')
PATH_navi = os.path.join(BASE_DIR, 'navi','Navi')
PATH_particleuniverse = os.path.join(PATH_Ogre, 'PlugIns', 'ParticleUniverse' )
+PATH_cadunetree= os.path.join(PATH_THIRDPARTY, 'cadunetree')
###
Added: trunk/python-ogre/code_generators/cadunetree/customization_data.py
===================================================================
--- trunk/python-ogre/code_generators/cadunetree/customization_data.py (rev 0)
+++ trunk/python-ogre/code_generators/cadunetree/customization_data.py 2008-01-08 02:44:54 UTC (rev 531)
@@ -0,0 +1,7 @@
+
+def header_files( version ):
+ return [ 'CaduneTree.h']
+
+def huge_classes( version ):
+ return []
+
\ No newline at end of file
Added: trunk/python-ogre/code_generators/cadunetree/generate_code.py
===================================================================
--- trunk/python-ogre/code_generators/cadunetree/generate_code.py (rev 0)
+++ trunk/python-ogre/code_generators/cadunetree/generate_code.py 2008-01-08 02:44:54 UTC (rev 531)
@@ -0,0 +1,286 @@
+#!/usr/bin/env python
+# -----------------------------------------------------------------------------
+# This source file is part of Python-Ogre and is covered by the LGPL
+# For the latest info, see http://python-ogre.org/
+#
+# -----------------------------------------------------------------------------
+
+## STARTER TEMPLATE..
+## replace cadunetree with lowercase project name
+## set MAIN_NAMESPACE
+## rename and configure .h files
+
+
+import os, sys, time, shutil
+
+#add environment to the path
+sys.path.append( os.path.join( '..', '..' ) )
+#add common utils to the pass
+sys.path.append( '..' )
+sys.path.append( '.' )
+
+import environment
+import common_utils
+import customization_data
+import hand_made_wrappers
+
+from pygccxml import parser
+from pygccxml import declarations
+from pyplusplus import messages
+from pyplusplus import module_builder
+from pyplusplus import decl_wrappers
+
+from pyplusplus import function_transformers as ft
+from pyplusplus.module_builder import call_policies
+from pyplusplus.module_creator import sort_algorithms
+
+import common_utils.extract_documentation as exdoc
+import common_utils.var_checker as varchecker
+import common_utils.ogre_properties as ogre_properties
+from common_utils import docit
+
+MAIN_NAMESPACE = 'CaduneTree'
+
+############################################################
+##
+## Here is where we manually exclude stuff
+##
+############################################################
+
+def ManualExclude ( mb ):
+ global_ns = mb.global_ns
+ if MAIN_NAMESPACE:
+ main_ns = global_ns.namespace( MAIN_NAMESPACE )
+ else:
+ main_ns = global_ns
+
+############################################################
+##
+## And there are things that manually need to be INCLUDED
+##
+############################################################
+
+def ManualInclude ( mb ):
+ global_ns = mb.global_ns
+ if MAIN_NAMESPACE:
+ main_ns = global_ns.namespace( MAIN_NAMESPACE )
+ else:
+ main_ns = global_ns
+
+############################################################
+##
+## And things that need manual fixes, but not necessarly hand wrapped
+##
+############################################################
+def ManualFixes ( mb ):
+ global_ns = mb.global_ns
+ if MAIN_NAMESPACE:
+ main_ns = global_ns.namespace( MAIN_NAMESPACE )
+ else:
+ main_ns = global_ns
+
+############################################################
+##
+## And things that need to have their argument and call values fixed.
+## ie functions that pass pointers in the argument list and of course we need
+## to read the updated values - so instead we pass them back
+## as new values in a tuple (ETC ETC)
+##
+############################################################
+
+def ManualTransformations ( mb ):
+ global_ns = mb.global_ns
+ if MAIN_NAMESPACE:
+ main_ns = global_ns.namespace( MAIN_NAMESPACE )
+ else:
+ main_ns = global_ns
+
+ def create_output( size ):
+ return [ ft.output( i ) for i in range( size ) ]
+
+
+###############################################################################
+##
+## Now for the AUTOMATIC stuff that should just work
+##
+###############################################################################
+
+def AutoFixes ( mb, MAIN_NAMESPACE ):
+ """ now we fix a range of things automatically - typically by going through
+ the entire name space trying to guess stuff and fix it:)
+ """
+ global_ns = mb.global_ns
+ if MAIN_NAMESPACE:
+ main_ns = global_ns.namespace( MAIN_NAMESPACE )
+ else:
+ main_ns = global_ns
+
+ # Functions that have void pointers in their argument list need to change to unsigned int's
+ pointee_types=[]
+ ignore_names=[]
+ common_utils.Fix_Void_Ptr_Args ( main_ns ) # , pointee_types, ignore_names )
+
+ # and change functions that return a variety of pointers to instead return unsigned int's
+ pointee_types=[]
+ ignore_names=[] # these are function names we know it's cool to exclude
+ common_utils.Fix_Pointer_Returns ( main_ns ) # , pointee_types, ignore_names )
+
+ # functions that need to have implicit conversions turned off
+ ImplicitClasses=[]
+ common_utils.Fix_Implicit_Conversions ( main_ns, ImplicitClasses )
+
+ if os.name =='nt':
+ Fix_NT( mb )
+ elif os.name =='posix':
+ Fix_Posix( mb )
+
+ common_utils.Auto_Document( mb, MAIN_NAMESPACE )
+
+
+###############################################################################
+##
+## here are the helper functions that do much of the work
+##
+###############################################################################
+def Fix_Posix ( mb ):
+ """ fixup for posix specific stuff -- note only expect to be called on a posix machine
+ """
+ ## we could do more here if need be...
+ if sys.platform == 'darwin':
+ pass
+ elif sys.platform.startswith ('linux'):
+ pass
+
+
+def Fix_NT ( mb ):
+ """ fixup for NT systems
+ """
+
+
+#
+# the 'main'function
+#
+def generate_code():
+ messages.disable(
+# Warnings 1020 - 1031 are all about why Py++ generates wrapper for class X
+ messages.W1020
+ , messages.W1021
+ , messages.W1022
+ , messages.W1023
+ , messages.W1024
+ , messages.W1025
+ , messages.W1026
+ , messages.W1027
+ , messages.W1028
+ , messages.W1029
+ , messages.W1030
+ , messages.W1031
+ , messages.W1035
+ , messages.W1040
+ , messages.W1038
+ , messages.W1041
+ , messages.W1036 # pointer to Python immutable member
+ , messages.W1033 # unnamed variables
+ , messages.W1018 # expose unnamed classes
+ , messages.W1049 # returns reference to local variable
+ , messages.W1014 # unsupported '=' operator
+ )
+ #
+ # Use GCCXML to create the controlling XML file.
+ # If the cache file (../cache/*.xml) doesn't exist it gets created, otherwise it just gets loaded
+ # 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.cadunetree.root_dir, "python_cadunetree.h" )
+ , environment.cadunetree.cache_file )
+
+ defined_symbols = [ 'OGRE_NONCLIENT_BUILD', 'OGRE_GCC_VISIBILITY' ]
+ defined_symbols.append( 'VERSION_' + environment.cadunetree.version )
+
+ #
+ # build the core Py++ system from the GCCXML created source
+ #
+ mb = module_builder.module_builder_t( [ xml_cached_fc ]
+ , gccxml_path=environment.gccxml_bin
+ , working_directory=environment.root_dir
+ , include_paths=environment.cadunetree.include_dirs
+ , define_symbols=defined_symbols
+ , indexing_suite_version=2
+ , cflags=environment.cadunetree.cflags
+ )
+
+ # if this module depends on another set it here
+ mb.register_module_dependency ( environment.ogre.generated_dir )
+
+ # normally implicit conversions work OK, however they can cause strange things to happen so safer to leave off
+ mb.constructors().allow_implicit_conversion = False
+
+ mb.BOOST_PYTHON_MAX_ARITY = 25
+ mb.classes().always_expose_using_scope = True
+
+ #
+ # We filter (both include and exclude) specific classes and functions that we want to wrap
+ #
+ global_ns = mb.global_ns
+ global_ns.exclude()
+ main_ns = global_ns.namespace( MAIN_NAMESPACE )
+ main_ns.include()
+
+ common_utils.AutoExclude ( mb, MAIN_NAMESPACE )
+ ManualExclude ( mb )
+ common_utils.AutoInclude ( mb, MAIN_NAMESPACE )
+ ManualInclude ( mb )
+ # here we fixup functions that expect to modifiy their 'passed' variables
+ ManualTransformations ( mb )
+ AutoFixes ( mb, MAIN_NAMESPACE )
+ ManualFixes ( mb )
+ #
+ # We need to tell boost how to handle calling (and returning from) certain functions
+ #
+ common_utils.Set_DefaultCall_Policies ( mb.global_ns.namespace ( MAIN_NAMESPACE ) )
+
+ #
+ # the manual stuff all done here !!!
+ #
+ hand_made_wrappers.apply( mb )
+
+ NoPropClasses = [""]
+ for cls in main_ns.classes():
+ if cls.name not in NoPropClasses:
+ cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() )
+
+ common_utils.add_constants( mb, { 'cadunetree_version' : '"%s"' % environment.cadunetree.version.replace("\n", "\\\n")
+ , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } )
+
+ ## need to create a welcome doc string for this...
+ common_utils.add_constants( mb, { '__doc__' : '"cadunetree DESCRIPTION"' } )
+
+
+ ##########################################################################################
+ #
+ # Creating the code. After this step you should not modify/customize declarations.
+ #
+ ##########################################################################################
+ extractor = exdoc.doc_extractor() # I'm excluding the UTFstring docs as lots about nothing
+ mb.build_code_creator (module_name='_cadunetree_' , doc_extractor= extractor )
+
+ for inc in environment.cadunetree.include_dirs:
+ mb.code_creator.user_defined_directories.append(inc )
+ mb.code_creator.user_defined_directories.append( environment.cadunetree.generated_dir )
+ mb.code_creator.replace_included_headers( customization_data.header_files( environment.cadunetree.version ) )
+
+ huge_classes = map( mb.class_, customization_data.huge_classes( environment.cadunetree.version ) )
+
+ mb.split_module(environment.cadunetree.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 generated directory..
+
+ common_utils.copyTree ( sourcePath = environment.Config.PATH_cadunetree,
+ destPath = environment.cadunetree.generated_dir,
+ recursive=False )
+
+if __name__ == '__main__':
+ start_time = time.clock()
+ generate_code()
+ print 'Source code was updated( %f minutes ).' % ( ( time.clock() - start_time )/60 )
Added: trunk/python-ogre/code_generators/cadunetree/hand_made_wrappers.py
===================================================================
--- trunk/python-ogre/code_generators/cadunetree/hand_made_wrappers.py (rev 0)
+++ trunk/python-ogre/code_generators/cadunetree/hand_made_wrappers.py 2008-01-08 02:44:54 UTC (rev 531)
@@ -0,0 +1,15 @@
+import os
+import environment
+
+
+
+#################################################################################################
+#################################################################################################
+
+def apply_reg ( class_, code ):
+ for c in code:
+ class_.add_registration_code ( c )
+
+def apply( mb ):
+ pass
+
\ No newline at end of file
Added: trunk/python-ogre/code_generators/cadunetree/python_cadunetree.h
===================================================================
--- trunk/python-ogre/code_generators/cadunetree/python_cadunetree.h (rev 0)
+++ trunk/python-ogre/code_generators/cadunetree/python_cadunetree.h 2008-01-08 02:44:54 UTC (rev 531)
@@ -0,0 +1,22 @@
+
+#include "CTParameters.h"
+#include "CTSerializer.h"
+//#include "CTSection.h"
+#include "CTStem.h"
+
+// First we create a magic namespace to hold all our aliases
+namespace pyplusplus { namespace aliases {
+
+ #include "python_cadunetree_aliases.h"
+} }
+
+// then we exposed everything needed (and more) to ensure GCCXML makes them visible to Py++
+//
+namespace python_cadunetree{ namespace details{
+inline void instantiate(){
+ using namespace CaduneTree;
+ #include "python_cadunetree_sizeof.h"
+
+} } }
+
+
Added: trunk/python-ogre/code_generators/cadunetree/python_cadunetree_aliases.h
===================================================================
--- trunk/python-ogre/code_generators/cadunetree/python_cadunetree_aliases.h (rev 0)
+++ trunk/python-ogre/code_generators/cadunetree/python_cadunetree_aliases.h 2008-01-08 02:44:54 UTC (rev 531)
@@ -0,0 +1 @@
+// typedef name nicename;
Added: trunk/python-ogre/code_generators/cadunetree/python_cadunetree_sizeof.h
===================================================================
--- trunk/python-ogre/code_generators/cadunetree/python_cadunetree_sizeof.h (rev 0)
+++ trunk/python-ogre/code_generators/cadunetree/python_cadunetree_sizeof.h 2008-01-08 02:44:54 UTC (rev 531)
@@ -0,0 +1 @@
+// sizeof ( variable );
Modified: trunk/python-ogre/environment.py
===================================================================
--- trunk/python-ogre/environment.py 2008-01-06 11:30:00 UTC (rev 530)
+++ trunk/python-ogre/environment.py 2008-01-08 02:44:54 UTC (rev 531)
@@ -137,9 +137,9 @@
unzip = "unzip -o "
cvs = "cvs -z3 -q "
svn = "svn --non-interactive "
- if isMac():
- sed_ = "sed -i '' "
- else:
+ if isMac():
+ sed_ = "sed -i '' "
+ else:
sed_ = "sed --in-place "
if isMac():
@@ -196,13 +196,13 @@
buildCmds = [
[0,"python setup.py install --prefix=%s" % PREFIX, os.path.join(os.getcwd(),'python-ogre')]
- ]
+ ]
class newton:
pythonModule = False
- active = True
+ active = True
if not os.path.exists( os.path.join(os.getcwd(), 'ogreaddons/ogrenewt')):
- os.makedirs ( os.path.join(os.getcwd(), 'ogreaddons/ogrenewt') )
+ os.makedirs ( os.path.join(os.getcwd(), 'ogreaddons/ogrenewt') )
if isLinux():
base = 'newton'
@@ -210,26 +210,26 @@
[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 ", ''],
- [0, "cp newtonSDK/sdk/Newton.h %s/include" % PREFIX, ''],
- [0, "cp newtonSDK/sdk/*.a %s/lib" % PREFIX, ''],
- [0, "cp newtonSDK/sdk/*.a ogreaddons/ogrenewt",'']
- ]
+ buildCmds = [
+ [0, "tar zxf " + os.path.join(downloadPath, "newtonLinux-1.53.tar.gz"), ''],
+ [0,"patch -s -i ./python-ogre/patch/Newton.patch -p0 ", ''],
+ [0, "cp newtonSDK/sdk/Newton.h %s/include" % PREFIX, ''],
+ [0, "cp newtonSDK/sdk/*.a %s/lib" % PREFIX, ''],
+ [0, "cp newtonSDK/sdk/*.a ogreaddons/ogrenewt",'']
+ ]
if isMac():
base = 'newton'
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 ", ''],
- [0, "cp newtonSDK/sdk/Newton.h %s/include" % PREFIX, ''],
- [0, "cp newtonSDK/sdk/*.a %s/lib" % PREFIX, ''],
- [0, "cp newtonSDK/sdk/*.a ogreaddons/ogrenewt" , '']
- ]
+ buildCmds = [
+ [0, "unzip -q -o " + os.path.join(downloadPath, "NewtonMac-1.53.zip"), ''],
+ [0,"patch -s -i ./python-ogre/patch/Newton.patch -p0 ", ''],
+ [0, "cp newtonSDK/sdk/Newton.h %s/include" % PREFIX, ''],
+ [0, "cp newtonSDK/sdk/*.a %s/lib" % PREFIX, ''],
+ [0, "cp newtonSDK/sdk/*.a ogreaddons/ogrenewt" , '']
+ ]
class pygccxml:
pythonModule = False
@@ -385,7 +385,7 @@
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', ''],
@@ -473,15 +473,15 @@
source = [
[wget, "http://prdownloads.sourceforge.net/ogre/"+base+".tar.bz2",downloadPath],
]
- buildCmds = [
+ buildCmds = [
[0, "env >1", ''],
[0, tar + " jxf " + os.path.join(downloadPath,base)+".tar.bz2 --overwrite",os.getcwd() ],
[0, "patch -s -N -i ./python-ogre/patch/ogre.patch -p0 ", os.getcwd()],
[0, "aclocal", os.path.join(os.getcwd(), 'ogrenew')],
[0, "./bootstrap", os.path.join(os.getcwd(), 'ogrenew')],
- #[1, "import os\nos.environ['ZZIPLIB_LIBS']='-lzzip'", ''],
+ #[1, "import os\nos.environ['ZZIPLIB_LIBS']='-lzzip'", ''],
[0, "./configure --prefix=%s --with-gui=Xt --disable-devil" % PREFIX, os.path.join(os.getcwd(), 'ogrenew')],
- #export ZZIPLIB_LIBS="-lzzip"
+ #export ZZIPLIB_LIBS="-lzzip"
[0, "make", os.path.join(os.getcwd(), 'ogrenew')],
[0, "make install", os.path.join(os.getcwd(), 'ogrenew')],
]
@@ -539,18 +539,18 @@
cflags=''
parent = "ogre/io"
if isMac():
- source=[]
- if isLinux():
- base = "ois-1.0RC1"
- source=[
- [wget, "http://prdownloads.sourceforge.net/wgois/ois-1.0RC1.tar.gz", downloadPath]
- ]
+ source=[]
+ if isLinux():
+ base = "ois-1.0RC1"
+ source=[
+ [wget, "http://prdownloads.sourceforge.net/wgois/ois-1.0RC1.tar.gz", downloadPath]
+ ]
buildCmds = [
[0, tar + " zxf " + os.path.join(downloadPath,base)+".tar.gz --overwrite",os.getcwd() ],
- [0, "./bootstrap" ,os.path.join(os.getcwd(), base )],
- [0,"./configure --prefix=%s --includedir=%s/include" %(PREFIX,PREFIX) ,os.path.join(os.getcwd(), base )],
+ [0, "./bootstrap" ,os.path.join(os.getcwd(), base )],
+ [0,"./configure --prefix=%s --includedir=%s/include" %(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 )]
+ [0,'make install', os.path.join(os.getcwd(), base )]
]
if os.name=='nt':
if _PreCompiled:
@@ -580,10 +580,10 @@
pythonModule = True
version = "1.4"
name = 'ogrerefapp'
- parent = "ogre/physics"
- baseDir = os.path.join(os.getcwd(),'ogrenew', 'ReferenceApplication')
- source = []
- buildCmds=[
+ parent = "ogre/physics"
+ baseDir = os.path.join(os.getcwd(),'ogrenew', 'ReferenceApplication')
+ source = []
+ buildCmds=[
[0, "aclocal", baseDir],
[0, "./bootstrap", baseDir],
[0, "./configure --prefix=%s " % PREFIX, baseDir],
@@ -613,23 +613,23 @@
pythonModule = True
version = "1.0"
name = 'ogrenewt'
- parent = "ogre/physics"
+ parent = "ogre/physics"
base = 'ogreaddons/ogrenewt'
if isWindows():
libs = ['Newton', Config.LIB_Boost, 'OgreNewt_Main', 'OgreMain']
else:
- libs = ['Newton', Config.LIB_Boost, 'OgreNewt', 'OgreMain']
+ libs = ['Newton', Config.LIB_Boost, 'OgreNewt', 'OgreMain']
source = [
[cvs, " -d :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, "scons prefix=%s boost=%s/include/%s install" % (PREFIX, PREFIX, boost.base), baseDir],
- ]
+ 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, "scons prefix=%s boost=%s/include/%s install" % (PREFIX, PREFIX, boost.base), baseDir],
+ ]
include_dirs = [Config.PATH_Boost
, Config.PATH_Newton # only one path for Newton
@@ -660,23 +660,23 @@
pchincludes = ['boost/python.hpp', 'cegui.h']
libs=[Config.LIB_Boost, 'CEGUIBase', 'OgreMain', 'OgreGUIRenderer' ]
else:
- libs=[Config.LIB_Boost, 'CEGUIBase', 'OgreMain', 'CEGUIOgreRenderer' ]
+ libs=[Config.LIB_Boost, 'CEGUIBase', 'OgreMain', 'CEGUIOgreRenderer' ]
- if isLinux():
- base = "CEGUI-0.5.0"
- source=[
- [wget, "http://prdownloads.sourceforge.net/crayzedsgui/CEGUI-0.5.0b.tar.gz", downloadPath]
- ]
+ if isLinux():
+ base = "CEGUI-0.5.0"
+ source=[
+ [wget, "http://prdownloads.sourceforge.net/crayzedsgui/CEGUI-0.5.0b.tar.gz", downloadPath]
+ ]
buildCmds = [
[0, tar + " zxf " + os.path.join(downloadPath,base)+"b.tar.gz --overwrite",os.getcwd() ],
- [0, "patch -s -N -i ../python-ogre/patch/cegui.patch -p0", os.path.join(os.getcwd(),base)],
- [0, "echo 'EMPTY' >>./INSTALL", os.path.join(os.getcwd(),base)],
- [0, "echo 'EMPTY' >>./NEWS", os.path.join(os.getcwd(),base)],
- [0, "aclocal", os.path.join(os.getcwd(),base)],
- [0, "automake" ,os.path.join(os.getcwd(), base )],
- [0,"./configure --prefix=%s --enable-freeimage=yes --disable-samples --without-ogre-renderer --includedir=%s/include" %(PREFIX,PREFIX) ,os.path.join(os.getcwd(), base )],
+ [0, "patch -s -N -i ../python-ogre/patch/cegui.patch -p0", os.path.join(os.getcwd(),base)],
+ [0, "echo 'EMPTY' >>./INSTALL", os.path.join(os.getcwd(),base)],
+ [0, "echo 'EMPTY' >>./NEWS", os.path.join(os.getcwd(),base)],
+ [0, "aclocal", os.path.join(os.getcwd(),base)],
+ [0, "automake" ,os.path.join(os.getcwd(), base )],
+ [0,"./configure --prefix=%s --enable-freeimage=yes --disable-samples --without-ogre-renderer --includedir=%s/include" %(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 )]
+ [0,'make install', os.path.join(os.getcwd(), base )]
]
include_dirs = [Config.PATH_Boost
@@ -719,16 +719,16 @@
CheckIncludes = ['boost/python.hpp', 'ode/ode.h']
source = [
["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]
-
+ 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]
+
]
class opcode:
active = True
@@ -790,16 +790,16 @@
]
source = [
[cvs, " -d :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/ogreode.patch -p0", baseDir],
- [0, "chmod +x autogen.sh", baseDir],
- [0, "./autogen.sh", baseDir],
- [0, "./configure --prefix=%s" % PREFIX, baseDir],
- [0, "make", baseDir],
- [0, "make install", baseDir],
- ]
+ buildCmds = [
+ [0, "patch -s -N -i ../../python-ogre/patch/ogreode.patch -p0", baseDir],
+ [0, "chmod +x autogen.sh", baseDir],
+ [0, "./autogen.sh", baseDir],
+ [0, "./configure --prefix=%s" % PREFIX, baseDir],
+ [0, "make", baseDir],
+ [0, "make install", baseDir],
+ ]
libs=[Config.LIB_Boost, 'OgreMain', 'ode', 'OgreOde_Core', 'OgreOde_Prefab', 'OgreOde_Loader' ]
CCFLAGS = ' -DBOOST_PYTHON_MAX_ARITY=19'
@@ -1075,16 +1075,16 @@
["wget", "http://www.openal.org/openal_webstf/downloads/openal-0.0.8.tar.gz",downloadPath],
["wget", "http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz",downloadPath],
["wget", "http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.0.tar.gz",downloadPath],
- ]
- buildCmds = [
- [0, "tar zxf " + os.path.join(downloadPath, "openal-0.0.8.tar.gz"), ''],
- [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, "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")]
- ]
+ ]
+ buildCmds = [
+ [0, "tar zxf " + os.path.join(downloadPath, "openal-0.0.8.tar.gz"), ''],
+ [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, "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")]
+ ]
class ogrevideoffmpeg:
@@ -1157,8 +1157,8 @@
active = True
pythonModule = True
version= "2.64"
- name='bullet'
- base = "bullet-2.64"
+ name='bullet'
+ base = "bullet-2.64"
baseDir = os.path.join(os.getcwd(), base)
parent = "ogre/physics"
libs=[Config.LIB_Boost, 'LibBulletCollision', 'LibBulletDynamics']
@@ -1170,15 +1170,15 @@
include_dirs = [ Config.PATH_Boost
, Config.PATH_INCLUDE_Bullet
]
- source=[
- [wget, "http://downloads.sourceforge.net/bullet/"+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]
- ]
+ source=[
+ [wget, "http://downloads.sourceforge.net/bullet/"+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]
+ ]
ModuleName = 'bullet'
CheckIncludes = ['boost/python.hpp']
@@ -1296,6 +1296,24 @@
CheckIncludes=[]
libs=[ Config.LIB_Boost, 'OgreMain' ]
ModuleName="ofusion"
+
+class cadunetree:
+ active = True
+ pythonModule = True
+ version="0.6"
+ name='cadunetree'
+ parent="ogre/addons"
+ cflags = ""
+ include_dirs = [ Config.PATH_Boost,
+ Config.PATH_cadunetree
+ , Config.PATH_INCLUDE_Ogre
+ ]
+ lib_dirs = [Config.PATH_LIB_Boost,
+ Config.PATH_LIB_Ogre_OgreMain
+ ]
+ CheckIncludes=[]
+ libs=[ Config.LIB_Boost, 'OgreMain' ]
+ ModuleName="cadunetree"
############################################################################################
@@ -1332,6 +1350,7 @@
, 'watermesh' : watermesh
, 'ofusion' : ofusion
, 'particleuniverse' : particleuniverse
+ , 'cadunetree' : cadunetree
}
#
@@ -1381,28 +1400,28 @@
if not key.startswith('_'):
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)
cls.generated_dir = os.path.join( generated_dir, cls.dir_name )
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')
- except:
- pass
- ## and we have a commond set of flags that I will set here...
- cls.include_dirs.append(Config.MAC_SDK_INCLUDE)
- if not hasattr(cls, 'CCFLAGS'):
- cls.CCFLAGS=''
- cls.CCFLAGS += Config.MAC_CCFLAGS
- if not hasattr(cls, 'cflags'):
- cls.cflags=''
- cls.cflags += Config.MAC_cflags
-
+
+ if isMac(): # On the mac the Ogre library is lined in with the -framework command in scons
+ try:
+ cls.libs.remove('OgreMain')
+ except:
+ pass
+ ## and we have a commond set of flags that I will set here...
+ cls.include_dirs.append(Config.MAC_SDK_INCLUDE)
+ if not hasattr(cls, 'CCFLAGS'):
+ cls.CCFLAGS=''
+ cls.CCFLAGS += Config.MAC_CCFLAGS
+ if not hasattr(cls, 'cflags'):
+ cls.cflags=''
+ cls.cflags += Config.MAC_cflags
+
if not hasattr (cls, 'ModuleName'):
cls.ModuleName = name[0].upper() + name[1:]
if not hasattr (cls, 'PydName'):
Added: trunk/python-ogre/packages_2.5/ogre/addons/cadunetree/__init__.py
===================================================================
--- trunk/python-ogre/packages_2.5/ogre/addons/cadunetree/__init__.py (rev 0)
+++ trunk/python-ogre/packages_2.5/ogre/addons/cadunetree/__init__.py 2008-01-08 02:44:54 UTC (rev 531)
@@ -0,0 +1 @@
+from _cadunetree_ import *
Modified: trunk/python-ogre/setup.py
===================================================================
--- trunk/python-ogre/setup.py 2008-01-06 11:30:00 UTC (rev 530)
+++ trunk/python-ogre/setup.py 2008-01-08 02:44:54 UTC (rev 531)
@@ -71,7 +71,7 @@
'ogre.addons.plib','ogre.gui.navi',
'ogre.addons.ogreforests', 'ogre.addons.et', 'ogre.addons.caelum',
'ogre.addons.noise', 'ogre.addons.watermesh', 'ogre.addons.ofusion',
- 'ogre.addons.particleuniverse' ],
+ 'ogre.addons.particleuniverse', 'ogre.addons.cadunetree' ],
"package_dir": {'': 'packages_'+ PythonVersionString },
"package_data": {'': ['*.pyd', '*.dll', '*.so']}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|