[Python-ogre-commit] SF.net SVN: python-ogre: [491] trunk/python-ogre
Brought to you by:
andy_miller,
roman_yakovenko
From: <and...@us...> - 2007-12-07 05:28:32
|
Revision: 491 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=491&view=rev Author: andy_miller Date: 2007-12-06 21:28:32 -0800 (Thu, 06 Dec 2007) Log Message: ----------- Initial checkin for particleuniverse module -- doesn't work yet, however wnat the framework here Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/PythonOgreConfig_posix.py trunk/python-ogre/environment.py trunk/python-ogre/scripts/00-PreReqs.sh trunk/python-ogre/scripts/01-RetrieveSource.sh trunk/python-ogre/scripts/config.sh Added Paths: ----------- trunk/python-ogre/code_generators/particleuniverse/ trunk/python-ogre/code_generators/particleuniverse/customization_data.py trunk/python-ogre/code_generators/particleuniverse/generate_code.py trunk/python-ogre/code_generators/particleuniverse/hand_made_wrappers.py trunk/python-ogre/code_generators/particleuniverse/python_particleuniverse.h trunk/python-ogre/code_generators/particleuniverse/python_particleuniverse_aliases.h trunk/python-ogre/code_generators/particleuniverse/python_particleuniverse_sizeof.h Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2007-12-05 00:32:48 UTC (rev 490) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2007-12-07 05:28:32 UTC (rev 491) @@ -61,6 +61,8 @@ 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' ) + # it's time for the SDK version if SDK: PATH_CEGUI = os.path.join(BASE_DIR, 'Ogrenew') @@ -96,7 +98,7 @@ PATH_LIB_plib = PATH_plib PATH_LIB_navi= os.path.join(PATH_navi, 'lib') PATH_LIB_ogredshow = PATH_ogredshow - +PATH_LIB_particleuniverse = os.path.join(PATH_particleuniverse, 'bin', 'release') if SDK: PATH_LIB_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'lib') PATH_LIB_OIS = os.path.join( PATH_Ogre, 'Dependencies/lib/Release') ## NOTE Posix platforms this lives in'lib' not 'dll' @@ -144,6 +146,7 @@ PATH_INCLUDE_noise = PATH_noise ##PATH_INCLUDE_ogreforests = os.path.join (PATH_ogreforests,'include') PATH_INCLUDE_ogreforests = PATH_ogreforests +PATH_INCLUDE_particleuniverse = os.path.join(PATH_particleuniverse, 'include' ) PATH_INCLUDE_OggVorbisTheora = [ os.path.join(BASE_DIR,'ogg','include') ,os.path.join(BASE_DIR, 'vorbis', 'include') Modified: trunk/python-ogre/PythonOgreConfig_posix.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_posix.py 2007-12-05 00:32:48 UTC (rev 490) +++ trunk/python-ogre/PythonOgreConfig_posix.py 2007-12-07 05:28:32 UTC (rev 491) @@ -50,7 +50,7 @@ PATH_et = os.path.join(PATH_THIRDPARTY, 'et') PATH_caelum = os.path.join(PATH_THIRDPARTY, 'caelum') PATH_noise= os.path.join(PATH_THIRDPARTY, 'noise') -PATH_watermesh= os.path.join(PATH_THIRDPARTY, 'watermesh') +PATH_watermesh= os.path.join(PATH_THIRDPARTY, 'watermesh') PATH_ofusion= os.path.join(PATH_THIRDPARTY, 'ofusion') PATH_ogrevideoffmpeg = os.path.join(PATH_THIRDPARTY,'ffmpeg') PATH_NxOgre= os.path.join(PATH_THIRDPARTY, 'nxogre') @@ -60,6 +60,7 @@ PATH_Theora= os.path.join(PATH_OgreAddons,'videoplugin','TheoraVideo') 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' ) ### @@ -91,6 +92,7 @@ PATH_LIB_ffmpeg= os.path.join(PATH_ffmpeg, 'lib') PATH_LIB_plib = PATH_plib PATH_LIB_navi= os.path.join(PATH_navi, 'lib') +PATH_LIB_particleuniverse = os.path.join(PATH_particleuniverse, 'bin', 'release') PATH_INCLUDE_Ogre= os.path.join(LOCAL_INCLUDE,'OGRE') # os.path.join(PATH_Ogre,'OgreMain/include') @@ -131,11 +133,12 @@ PATH_INCLUDE_noise = PATH_noise PATH_INCLUDE_ogredshow = PATH_ogredshow PATH_INCLUDE_ogreforests = PATH_ogreforests +PATH_INCLUDE_particleuniverse = os.path.join(PATH_particleuniverse, 'include' ) PATH_INCLUDE_OggVorbisTheora = [ os.path.join(BASE_DIR,'ogg','include') ,os.path.join(BASE_DIR, 'vorbis', 'include') ,os.path.join(PATH_OgreAddons,'videoplugin','theora','include') - ##,os.path.join(PATH_OgreAddons,'videoplugin','ptypes-1.8.3','include') + ##,os.path.join(PATH_OgreAddons,'videoplugin','ptypes-1.8.3','include') ,os.path.join(PATH_THIRDPARTY,'ptypes','include') ] physxbase = os.path.join(LOCAL_INCLUDE, 'PhysX','v2.7.3', 'SDKs') Added: trunk/python-ogre/code_generators/particleuniverse/customization_data.py =================================================================== --- trunk/python-ogre/code_generators/particleuniverse/customization_data.py (rev 0) +++ trunk/python-ogre/code_generators/particleuniverse/customization_data.py 2007-12-07 05:28:32 UTC (rev 491) @@ -0,0 +1,7 @@ + +def header_files( version ): + return [ "ParticleUniverseSystemManager.h"] + +def huge_classes( version ): + return [] + \ No newline at end of file Added: trunk/python-ogre/code_generators/particleuniverse/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/particleuniverse/generate_code.py (rev 0) +++ trunk/python-ogre/code_generators/particleuniverse/generate_code.py 2007-12-07 05:28:32 UTC (rev 491) @@ -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 particleuniverse 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 = 'ParticleUniverse' + +############################################################ +## +## 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.particleuniverse.root_dir, "python_particleuniverse.h" ) + , environment.particleuniverse.cache_file ) + + defined_symbols = [ 'OGRE_NONCLIENT_BUILD', 'OGRE_GCC_VISIBILITY' ,'PARTICLE_UNIVERSE_EXPORTS', '__PYTHONOGRE_BUILD_CODE' ] + defined_symbols.append( 'VERSION_' + environment.particleuniverse.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.particleuniverse.include_dirs + , define_symbols=defined_symbols + , indexing_suite_version=2 + , cflags=environment.particleuniverse.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, { 'particleuniverse_version' : '"%s"' % environment.particleuniverse.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__' : '"particleuniverse 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='_particleuniverse_' , doc_extractor= extractor ) + + for inc in environment.particleuniverse.include_dirs: + mb.code_creator.user_defined_directories.append(inc ) + mb.code_creator.user_defined_directories.append( environment.particleuniverse.generated_dir ) + mb.code_creator.replace_included_headers( customization_data.header_files( environment.particleuniverse.version ) ) + + huge_classes = map( mb.class_, customization_data.huge_classes( environment.particleuniverse.version ) ) + + mb.split_module(environment.particleuniverse.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_INCLUDE_particleuniverse, +# destPath = environment.particleuniverse.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/particleuniverse/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/particleuniverse/hand_made_wrappers.py (rev 0) +++ trunk/python-ogre/code_generators/particleuniverse/hand_made_wrappers.py 2007-12-07 05:28:32 UTC (rev 491) @@ -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/particleuniverse/python_particleuniverse.h =================================================================== --- trunk/python-ogre/code_generators/particleuniverse/python_particleuniverse.h (rev 0) +++ trunk/python-ogre/code_generators/particleuniverse/python_particleuniverse.h 2007-12-07 05:28:32 UTC (rev 491) @@ -0,0 +1,19 @@ +// keep everything in lowercase (except the namespace which must match the C++ library) to stop Linux/Windows issues +#include "ParticleUniverseSystemManager.h" // the master include for the c++ library + +// First we create a magic namespace to hold all our aliases +namespace pyplusplus { namespace aliases { + + #include "python_particleuniverse_aliases.h" // we use this to fix up what would otherwise be ugly names +} } + +// then we exposed everything needed (and more) to ensure GCCXML makes them visible to Py++ +// +namespace python_particleuniverse{ namespace details{ +inline void instantiate(){ + using namespace ParticleUniverse; // note the use of the 'actual' namespace here -- case sensitive + #include "python_particleuniverse_sizeof.h" // this is used to expose classes/variables that don't happen automatically + +} } } + + Added: trunk/python-ogre/code_generators/particleuniverse/python_particleuniverse_aliases.h =================================================================== --- trunk/python-ogre/code_generators/particleuniverse/python_particleuniverse_aliases.h (rev 0) +++ trunk/python-ogre/code_generators/particleuniverse/python_particleuniverse_aliases.h 2007-12-07 05:28:32 UTC (rev 491) @@ -0,0 +1 @@ +// typedef name nicename; Added: trunk/python-ogre/code_generators/particleuniverse/python_particleuniverse_sizeof.h =================================================================== --- trunk/python-ogre/code_generators/particleuniverse/python_particleuniverse_sizeof.h (rev 0) +++ trunk/python-ogre/code_generators/particleuniverse/python_particleuniverse_sizeof.h 2007-12-07 05:28:32 UTC (rev 491) @@ -0,0 +1 @@ +// sizeof ( variable ); Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2007-12-05 00:32:48 UTC (rev 490) +++ trunk/python-ogre/environment.py 2007-12-07 05:28:32 UTC (rev 491) @@ -503,6 +503,24 @@ ModuleName="ogreforests" active=True +class particleuniverse: + version="0.4" + parent="ogre/addons" + CCFLAGS = ' ' + cflags="" + include_dirs = [ Config.PATH_Boost, + Config.PATH_INCLUDE_Ogre, + Config.PATH_INCLUDE_particleuniverse + ] + lib_dirs = [Config.PATH_LIB_Boost, + Config.PATH_LIB_Ogre_OgreMain, + Config.PATH_LIB_particleuniverse + ] + CheckIncludes=[] + libs=[ Config.LIB_Boost, 'OgreMain', 'ParticleUniverse' ] + ModuleName="particleuniverse" + active=True + class nxogre: version="0.9" parent="ogre/physics" @@ -864,6 +882,7 @@ , 'noise' : noise , 'watermesh' : watermesh , 'ofusion' : ofusion + , 'particleuniverse' : particleuniverse } # Modified: trunk/python-ogre/scripts/00-PreReqs.sh =================================================================== --- trunk/python-ogre/scripts/00-PreReqs.sh 2007-12-05 00:32:48 UTC (rev 490) +++ trunk/python-ogre/scripts/00-PreReqs.sh 2007-12-07 05:28:32 UTC (rev 491) @@ -1,6 +1,25 @@ #!/bin/bash -# Part of the Python-Ogre installation +# Part of the Python-Ogre installation +if [ $DARWIN == 1 ] then + pushd $DOWNLOADS + curl -o wget-1.10.2.tar.gz http://ftp.gnu.org/pub/gnu/wget/wget-1.10.2.tar.gz + curl -o subversion-client-1.3.1.dmg http://metissian.com/downloads/macosx/subversion/subversion-client-1.3.1.dmg + curl -o python-2.5-macosx.dmg http://www.pythonmac.org/packages/py25-fat/dmg/python-2.5-macosx.dmg + + popd + tar zxf $DOWNLOADS/wget-1.10.2.tar.gz + pushd wget-1.10.2 + ./configure --prefix='/usr' + make + sudo make install + popd + sudo open $DOWNLOADS/subversion-client-1.3.1.dmg + sudo open $DOWNLOADS/python-2.5-macosx.dmg +else + sudo apt-get install g++ libfreetype6-dev libpcre3-dev autoconf automake1.9 libgl1-mesa-dev libx11-dev \ libglut3-dev libtool libxaw7-dev libxxf86vm-dev patch \ libxrandr-dev cvs subversion libxt-dev libexpat1-dev python python-dev \ python-celementtree libglew-dev + +if \ No newline at end of file Modified: trunk/python-ogre/scripts/01-RetrieveSource.sh =================================================================== --- trunk/python-ogre/scripts/01-RetrieveSource.sh 2007-12-05 00:32:48 UTC (rev 490) +++ trunk/python-ogre/scripts/01-RetrieveSource.sh 2007-12-07 05:28:32 UTC (rev 491) @@ -10,25 +10,38 @@ # pushd $DOWNLOADS echo " -- Getting bundles" -$WGET http://developer.download.nvidia.com/cg/Cg_1.5/1.5.0/0022/Cg-1.5_Aug2007_x86.tar.gz + +## Handle Mac/Linux differences +if [ $DARWIN == 1 ] +then +# Mac files +$WGET http://developer.download.nvidia.com/cg/Cg_1.5/1.5.0023/Cg-1.5_Sep2007_Tiger.dmg +$WGET http://downloads.sourceforge.net/boost/boost-jam-3.1.16-1-macosxppc.tgz +else +# Linux files +$WGET http://developer.download.nvidia.com/cg/Cg_1.5/1.5.0023/Cg-1.5_Sep2007_x86.tar.gz +$WGET http://prdownloads.sourceforge.net/boost/boost-jam-3.1.16-1-linuxx86.tgz +$WGET http://www.newtondynamics.com/downloads/newtonLinux-1.53.tar.gz +fi + +# Generic +$WGET http://prdownloads.sourceforge.net/ogre/ogre-linux_osx-v1-4-5.tar.bz2 $WGET http://www.cmake.org/files/v2.4/cmake-2.4.6-Linux-i386.tar.gz $WGET http://prdownloads.sourceforge.net/freeimage/FreeImage393.zip $WGET http://prdownloads.sourceforge.net/crayzedsgui/CEGUI-0.5.0b.tar.gz $WGET http://prdownloads.sourceforge.net/wgois/ois-1.0RC1.tar.gz -$WGET http://prdownloads.sourceforge.net/boost/boost-jam-3.1.13-1-linuxx86.tgz -##$WGET http://prdownloads.sourceforge.net/scons/scons-0.96.96.tar.gz $WGET http://downloads.sourceforge.net/scons/scons-0.97.0d20070918.tar.gz -$WGET http://prdownloads.sourceforge.net/ogre/ogre-linux_osx-v1-4-5.tar.bz2 $WGET http://prdownloads.sourceforge.net/opende/ode-src-0.9.zip -$WGET http://downloads.sourceforge.net/boost/boost_1_34_0.tar.bz2 -$WGET http://www.newtondynamics.com/downloads/newtonLinux-1.53.tar.gz +$WGET http://downloads.sourceforge.net/boost/boost_1_34_1.tar.bz2 $WGET http://www.openal.org/openal_webstf/downloads/openal-0.0.8.tar.gz $WGET http://www.openal.org/openal_webstf/downloads/freealut-1.1.0.tar.gz $WGET http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz $WGET http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.0.tar.gz $WGET http://downloads.sourceforge.net/zziplib/zziplib-0.13.49.tar.bz2 +$WGET http://downloads.sourceforge.net/bullet/bullet-2.64.tgz + + ##$WGET http://devfiles.ageia.com/PhysX_2.7.2_SDK_CoreLinux_deb.tar.gz? -$WGET http://downloads.sourceforge.net/bullet/bullet-2.64.tgz popd cd $INSTALL_DIR echo " -- getting pygccxml" Modified: trunk/python-ogre/scripts/config.sh =================================================================== --- trunk/python-ogre/scripts/config.sh 2007-12-05 00:32:48 UTC (rev 490) +++ trunk/python-ogre/scripts/config.sh 2007-12-07 05:28:32 UTC (rev 491) @@ -5,6 +5,19 @@ WGETARGS="-c -nc --tries=3 --random-wait" WGET="`which wget` $WGETARGS" + +TEMPFILE=`mktemp -t temp.XXXXX` +cat << EOF > $TEMPFILE +#!/usr/bin/python +import sys,os +if sys.platform=='darwin': + print 1 +else : print 0 +EOF +DARWIN=`python $TEMPFILE` +rm $TEMPFILE + + TEMPFILE=`mktemp` cat << EOF > $TEMPFILE #!/usr/bin/python This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |