[Python-ogre-commit] SF.net SVN: python-ogre:[868] trunk/python-ogre
Brought to you by:
andy_miller,
roman_yakovenko
|
From: <and...@us...> - 2009-01-30 13:53:27
|
Revision: 868
http://python-ogre.svn.sourceforge.net/python-ogre/?rev=868&view=rev
Author: andy_miller
Date: 2009-01-30 13:53:17 +0000 (Fri, 30 Jan 2009)
Log Message:
-----------
OgreNewt fixed for Mac -- now build OgreNewt C++ along with the wrapper code much like many of the thirdparty modules
Modified Paths:
--------------
trunk/python-ogre/code_generators/ogrenewt/generate_code.py
trunk/python-ogre/code_generators/ogrenewt/python_ogrenewt.h
trunk/python-ogre/environment.py
Modified: trunk/python-ogre/code_generators/ogrenewt/generate_code.py
===================================================================
--- trunk/python-ogre/code_generators/ogrenewt/generate_code.py 2009-01-30 13:42:48 UTC (rev 867)
+++ trunk/python-ogre/code_generators/ogrenewt/generate_code.py 2009-01-30 13:53:17 UTC (rev 868)
@@ -214,13 +214,13 @@
, environment.ogrenewt.cache_file )
defined_symbols = [ 'OGRE_NONCLIENT_BUILD','__PYTHONOGRE_BUILD_CODE',
- 'ogrenewt_NONCLIENT_BUILD','OIS_NONCLIENT_BUILD', 'OIS_STATIC_BUILD' ]
+ 'ogrenewt_NONCLIENT_BUILD','OIS_NONCLIENT_BUILD' ] #, 'OIS_STATIC_BUILD' ]
defined_symbols.append( 'VERSION_' + environment.ogrenewt.version )
if environment._USE_THREADS:
defined_symbols.append('BOOST_HAS_THREADS')
defined_symbols.append('BOOST_HAS_WINTHREADS')
- if environment.isLinux():
+ if environment.isLinux():
defined_symbols.append('BOOST_IS_ENUM')
mb = module_builder.module_builder_t( [ xml_cached_fc ]
@@ -228,6 +228,7 @@
, working_directory=environment.root_dir
, include_paths=environment.ogrenewt.include_dirs
, define_symbols=defined_symbols
+ , cflags=environment.ogrenewt.cflags
, indexing_suite_version=2 )
## This module depends on Ogre
@@ -293,6 +294,19 @@
# if not os.path.exists( return_pointee_value_target_path ):
# shutil.copy( return_pointee_value_source_path, environment.ogrenewt.generated_dir )
+ if environment.isMac():
+ ## now we need to ensure a series of headers and additional source files are
+ ## copied to the generated directory..
+ basePath = os.path.join(environment.Config.PATH_OgreAddons,'ogrenewt', 'OgreNewt_Main')
+ common_utils.copyTree ( sourcePath = os.path.join(basePath, 'inc'),
+ destPath = environment.ogrenewt.generated_dir,
+ recursive= False,
+ extensions = ['h'] )
+ common_utils.copyTree ( sourcePath = os.path.join(basePath, 'src'),
+ destPath = environment.ogrenewt.generated_dir,
+ recursive= False,
+ collapse = True, # put all the source in a single directory
+ extensions = ['cpp'] )
if __name__ == '__main__':
start_time = time.clock()
Modified: trunk/python-ogre/code_generators/ogrenewt/python_ogrenewt.h
===================================================================
--- trunk/python-ogre/code_generators/ogrenewt/python_ogrenewt.h 2009-01-30 13:42:48 UTC (rev 867)
+++ trunk/python-ogre/code_generators/ogrenewt/python_ogrenewt.h 2009-01-30 13:53:17 UTC (rev 868)
@@ -1,3 +1,7 @@
+#if defined __APPLE_CC__
+ #include "strings.h"
+ #include "Carbon/Carbon.h"
+#endif
#include <vector>
#include <string>
Modified: trunk/python-ogre/environment.py
===================================================================
--- trunk/python-ogre/environment.py 2009-01-30 13:42:48 UTC (rev 867)
+++ trunk/python-ogre/environment.py 2009-01-30 13:53:17 UTC (rev 868)
@@ -705,7 +705,8 @@
[0, "cp OgrePrerequisites.h Ogre",os.path.join(os.getcwd() ,'ogre','OgreMain', 'include') ],
[0, "xcodebuild -project ogre/Mac/Ogre/Ogre.xcodeproj -configuration Release", ''],
[0, "xcodebuild -project ogre/Mac/Samples/Samples.xcodeproj -configuration Release", ''],
- [0, "cp -R *.framework ~/Library/Frameworks", os.path.join(os.getcwd() ,'ogre',"Mac", "build", "Release") ]
+ [0, "cp -R *.framework ~/Library/Frameworks", os.path.join(os.getcwd() ,'ogre',"Mac", "build", "Release") ],
+ [0, "cp -R *.framework ~/Library/Frameworks", os.path.join(os.getcwd() ,'ogre',"Dependencies") ]
]
libs=[boost.lib]
@@ -844,9 +845,11 @@
base = 'ogreaddons/ogrenewt'
if isWindows():
libs = ['Newton', boost.lib, 'OgreNewt_Main', 'OgreMain']
+ elif isLinux():
+ libs = ['Newton', boost.lib, 'OgreNewt', 'OgreMain']
else:
- libs = ['Newton', boost.lib, 'OgreNewt', 'OgreMain']
-# libs.append ( boost_python_index.lib )
+ libs = ['Newton32', boost.lib, 'OgreMain']
+
if _STABLE:
source = [
[cvs, " -d :pserver:ano...@cv...:/cvsroot/ogre co -D 01052008 -P "+base, os.getcwd()]
@@ -883,6 +886,19 @@
, Config.PATH_LIB_Ogre_OgreMain
]
+ if isMac():
+ include_dirs = [Config.PATH_Boost
+ , Config.PATH_Newton # only one path for Newton
+ , Config.PATH_INCLUDE_Ogre
+ , Config.PATH_INCLUDE_Ogre_Dependencies #needed for OIS/OIS.h
+ ,os.path.join(Config.PATH_OgreAddons,'ogrenewt', 'OgreNewt_Main', 'inc')
+ ]
+ lib_dirs = [ boost.PATH_LIB
+ ,Config.PATH_LIB_Newton
+ , Config.PATH_LIB_Ogre_OgreMain
+ ]
+ if isMac():
+ LINKFLAGS = ' -framework OIS '
ModuleName = 'OgreNewt'
CheckIncludes=['boost/python.hpp', 'Ogre.h', 'OgreNewt.h', 'Newton.h']
@@ -901,8 +917,10 @@
pchbuild = 'buildpch.cpp'
pchincludes = ['boost/python.hpp', 'cegui.h']
libs=[boost.lib, 'CEGUIBase', 'OgreMain', 'OgreGUIRenderer' ]
+ elif isLinux():
+ libs=[boost.lib, 'CEGUIBase', 'OgreMain', 'CEGUIOgreRenderer' ]
else:
- libs=[boost.lib, 'CEGUIBase', 'OgreMain', 'CEGUIOgreRenderer' ]
+ libs=[boost.lib, 'CEGUI', 'OgreMain', 'CEGUIOgreRenderer' ]
# libs.append ( boost_python_index.lib )
if isLinux() or isMac():
@@ -960,9 +978,10 @@
, Config.PATH_LIB_Ogre_Dependencies
]
ModuleName = 'CEGUI'
+ if isMac():
+ LINKFLAGS = ' -F CEGUI '
+
CheckIncludes = ['boost/python.hpp', 'Ogre.h', 'CEGUI.h', 'OgreCEGUIRenderer.h']
-# if isLinux():
-# LINKFLAGS = "-l%s" % boost_python_index.lib
class ode:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|