[Python-ogre-commit] SF.net SVN: python-ogre: [375] trunk/python-ogre
Brought to you by:
andy_miller,
roman_yakovenko
From: <and...@us...> - 2007-09-12 13:40:20
|
Revision: 375 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=375&view=rev Author: andy_miller Date: 2007-09-12 06:40:08 -0700 (Wed, 12 Sep 2007) Log Message: ----------- General updates for 1.1 release Support for latest Quickgui and NXogre (from their SVN's) Initial wrapping for navi GUI -- not yet complete however works 'ok' Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/code_generators/nxogre/generate_code.py trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h trunk/python-ogre/code_generators/quickgui/generate_code.py trunk/python-ogre/environment.py trunk/python-ogre/scripts/MakeRelease.bat trunk/python-ogre/setup.py Added Paths: ----------- trunk/python-ogre/code_generators/navi/ trunk/python-ogre/code_generators/navi/NxOgre.log.html trunk/python-ogre/code_generators/navi/customization_data.py trunk/python-ogre/code_generators/navi/generate_code.py trunk/python-ogre/code_generators/navi/hand_made_wrappers.py trunk/python-ogre/code_generators/navi/python_navi.h trunk/python-ogre/code_generators/navi/python_navi_aliases.h trunk/python-ogre/code_generators/navi/python_navi_sizeof.h trunk/python-ogre/code_generators/navi/register_exceptions.py trunk/python-ogre/scripts/MakeSnapShot.bat trunk/python-ogre/scripts/PythonOgreInstallCreator.iss.1.0 trunk/python-ogre/scripts/PythonOgreInstallCreator.iss.org trunk/python-ogre/scripts/UpdateDLLs.bat Removed Paths: ------------- trunk/python-ogre/scripts/PythonOgreInstallCreator.iss Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2007-09-06 10:19:05 UTC (rev 374) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2007-09-12 13:40:08 UTC (rev 375) @@ -47,7 +47,9 @@ PATH_ffmpeg= os.path.join(BASE_DIR, 'ffmpeg') PATH_ogredshow = os.path.join(root_dir, 'ThirdParty','dshow') PATH_plib = os.path.join(BASE_DIR, 'plib') +PATH_navi = os.path.join(BASE_DIR, 'navi','Navi') + # # it's time for the SDK version if SDK: @@ -96,6 +98,7 @@ PATH_LIB_ffmpeg= os.path.join(PATH_ffmpeg, 'lib') PATH_LIB_ogredshow = PATH_ogredshow PATH_LIB_plib = PATH_plib +PATH_LIB_navi= os.path.join(PATH_navi, 'lib') if SDK: PATH_LIB_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'lib') @@ -138,6 +141,7 @@ PATH_INCLUDE_ffmpeg = os.path.join (PATH_ffmpeg,'include') PATH_INCLUDE_ogredshow = PATH_ogredshow PATH_INCLUDE_plib = PATH_plib +PATH_INCLUDE_navi = os.path.join (PATH_navi,'include') PATH_INCLUDE_OggVorbisTheora = [ os.path.join(BASE_DIR,'ogg','include') ,os.path.join(BASE_DIR, 'vorbis', 'include') Added: trunk/python-ogre/code_generators/navi/NxOgre.log.html =================================================================== --- trunk/python-ogre/code_generators/navi/NxOgre.log.html (rev 0) +++ trunk/python-ogre/code_generators/navi/NxOgre.log.html 2007-09-12 13:40:08 UTC (rev 375) @@ -0,0 +1,29 @@ +<html> + <head> + <title>NxOgre Log - NxOgre 0.9-28</title> + <style> + body {background:#121212;color:white;font-family:Helvetica,sans-serif;font-size:80%;padding-top:1em;} + h2 {font-size:145%;margin:0;padding:0;color:#999;} + h2 small {padding-left:1em;} + div.log {width:75%;margin:0 auto 2em auto;padding:1em 2em 2em 1em;border-left:2px solid #333;background-color:#181818;} + div.conflict {border-left:2px solid hotpink;} + div.error {border-left:2px solid red;} + div.error h2{color:orangered} + div.leak {border-left:2px solid orangered;} + div.debug {border-left:2px solid #333;} + div.debug h2 {font-size:125%;color:#444;} + div.warning {border-left:2px solid SaddleBrown;} + span.item{font-size:85%;background:red;} + small {font-size:95%;color:#333;} + div.et0{border-left:2px solid red;} + div.et99{} + pre {font-size:1.1em;padding:0.5em 0 0 0;margin:0;overflow:auto;} + h1 {background: url("data:image/png;base64,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") top center no-repeat;padding-top:85px;text-align:center;font-size:1.2em;} + a#jump {position:absolute;top:0.5em;right:0.5em;color:white;text-decoration:none;} + a#jump:hover {text-decoration:underline;} + h5 {width:80%;margin:0 auto 2em auto;padding:1.25em 0 0.25em 0;border-bottom:2px solid red;text-align:center;} + div#e {width:90%;margin:0 auto 2em auto;padding:1.25em 0 0 0;font-size:0.9em;text-align:center;} + div#key {margin:0 auto 2em auto;display:table;font-size:0.75em;} div#key span{display:table-cell;margin-left:24px;width:12px;height:1em;font-size:1px;border-left:32px solid #121212;border-right:8px solid #121212;} </style> + </head> +<body> +<h1>Log<br /><small>NxOgre 0.9-28</small></h1><a href="#bottom" id="jump">Jump to bottom</a><div id="key"><span style="background-color:#333;"> </span> Debug <span style="background-color:Indigo;"> </span> Warning<span style="background-color:hotpink;"> </span> Conflict<span style="background-color: red;"> </span> Error <span style="background-color: orangered;"> </span> Leaks</div> Added: trunk/python-ogre/code_generators/navi/customization_data.py =================================================================== --- trunk/python-ogre/code_generators/navi/customization_data.py (rev 0) +++ trunk/python-ogre/code_generators/navi/customization_data.py 2007-09-12 13:40:08 UTC (rev 375) @@ -0,0 +1,9 @@ + +def header_files( version ): + return [ 'navi.h' + + ] + +def huge_classes( version ): + return [] + \ No newline at end of file Added: trunk/python-ogre/code_generators/navi/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/navi/generate_code.py (rev 0) +++ trunk/python-ogre/code_generators/navi/generate_code.py 2007-09-12 13:40:08 UTC (rev 375) @@ -0,0 +1,517 @@ +#!/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/ +# +# ----------------------------------------------------------------------------- + + +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 +import register_exceptions + +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 + +MAIN_NAMESPACE = 'NaviLibrary' + +## small helper function +def docit ( general, i, o ): + docs = "Python-Ogre Modified Function Call\\n" + general +"\\n" + docs = docs + "Input: " + i + "\\n" + docs = docs + "Output: " + o + "\\n\\\n" + return docs + +############################################################ +## +## Here is where we manually exclude stuff +## +############################################################ + +def ManualExclude ( mb ): + global_ns = mb.global_ns + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + + # things not yet implemented in the C source.. + excludes=[] + for c in main_ns.classes(): + for m in c.member_functions(allow_empty=True): + for e in excludes: + if e in m.decl_string: + m.exclude() + + ### Member Functions + excludes=[ '::NaviLibrary::NaviDataValue::isEmpty' + ,'::NaviLibrary::NaviDataValue::isNumber' ## inline functions + ] + for e in excludes: + print "excluding ", e + main_ns.member_functions(e).exclude() + + ### Free Functions + excludes = [] + for e in excludes: + main_ns.free_functions(e).exclude() + + ## Classes + excludes = [] + for e in excludes: + main_ns.class_(e).exclude() + + + ## I have a challenge that Py++ doesn't recognise these classes by full name (perhaps because they are structs?) + ## so I have to look through and match on a class by class basis + excludeName = [] + for c in main_ns.classes(): + if c.name in excludeName: + c.exclude() + + ### Variables + excludes = [] + for e in excludes: + main_ns.variable(e).exclude() + + ### Typedefs + excludes = [] + for e in excludes: + main_ns.typedefs(e).exclude() + + ### Operators + excludes=[] + for e in excludes: + main_ns.operators(e).exclude() + + main_ns.class_('::NaviLibrary::NaviDataValue').constructor(arg_types=['bool']).exclude() +# ### Constructors +# for c in main_ns.class_('NaviDataValue').constructor(arg_types=['bool']): ## these hide the working constructors +# for a in c.arguments: +# if 'NxVec3' in a.type.decl_string or 'NxQuat' in a.type.decl_string: +# c.exclude() +# break + + +############################################################ +## +## And there are things that manually need to be INCLUDED +## +############################################################ + +def ManualInclude ( mb ): + global_ns = mb.global_ns + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + + includes=[] + ### Free Functions + for e in includes: + main_ns.free_functions(e).include() + +############################################################ +## +## And things that need manual fixes, but not necessarly hand wrapped +## +############################################################ +def ManualFixes ( mb ): + + global_ns = mb.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 ): + def _ReturnUnsignedInt( type_ ): + """helper to return an UnsignedInt call for tranformation functions + """ + return declarations.cpptypes.unsigned_int_t() + + global_ns = mb.global_ns + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + + def create_output( size ): + return [ ft.output( i ) for i in range( size ) ] + + +############################################################################### +## +## Now for the AUTOMATIC stuff that should just work +## +############################################################################### + + +def AutoExclude( mb ): + """ Automaticaly exclude a range of things that don't convert well from C++ to Python + """ + global_ns = mb.global_ns + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + + # vars that are static consts but have their values set in the header file are bad + Remove_Static_Consts ( main_ns ) + + ## Exclude protected and private that are not pure virtual + query = ~declarations.access_type_matcher_t( 'public' ) \ + & ~declarations.virtuality_type_matcher_t( declarations.VIRTUALITY_TYPES.PURE_VIRTUAL ) + non_public_non_pure_virtual = main_ns.calldefs( query ) + non_public_non_pure_virtual.exclude() + + #Virtual functions that return reference could not be overriden from Python + query = declarations.virtuality_type_matcher_t( declarations.VIRTUALITY_TYPES.VIRTUAL ) \ + & declarations.custom_matcher_t( lambda decl: declarations.is_reference( decl.return_type ) ) + try: + main_ns.calldefs( query ).virtuality = declarations.VIRTUALITY_TYPES.NOT_VIRTUAL + except: + pass + +def AutoInclude( mb ): + global_ns = mb.global_ns + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + + +def AutoFixes ( mb ): + """ 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 + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + + # arguments passed as refs but not const are not liked by boost + #Fix_Ref_Not_Const ( main_ns ) + + # Functions that have void pointers in their argument list need to change to unsigned int's + Fix_Void_Ptr_Args ( main_ns ) + + # and change functions that return a variety of pointers to instead return unsigned int's + Fix_Pointer_Returns ( main_ns ) + + # functions that need to have implicit conversions turned off + Fix_Implicit_Conversions ( main_ns) + + if os.name =='nt': + Fix_NT( mb ) + elif os.name =='posix': + Fix_Posix( mb ) + + +############################################################################### +## +## 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 + """ + + +def Fix_Implicit_Conversions ( mb ): + """By default we disable explicit conversion, however sometimes it makes sense + """ + pass + +def Add_Auto_Conversions( mb ): + pass + + +def Set_Call_Policies( mb ): + """ set the return call policies on classes that this hasn't already been done for. + Set the default policy to deal with pointer/reference return types to reference_existing object + """ + mem_funs = mb.calldefs () + mem_funs.create_with_signature = True #Generated code will not compile on + #MSVC 7.1 if function has throw modifier. + for mem_fun in mem_funs: + if mem_fun.call_policies: + continue + if not mem_fun.call_policies and \ + (declarations.is_reference (mem_fun.return_type) or declarations.is_pointer (mem_fun.return_type) ): + mem_fun.call_policies = call_policies.return_value_policy( + call_policies.reference_existing_object ) + + +def Set_Exception(mb): + pass + #~ """We don't exclude Exception, because it contains functionality, that could + #~ be useful to user. But, we will provide automatic exception translator + #~ """ + #~ Exception = mb.namespace( 'Ogre' ).class_( 'Exception' ) + #~ Exception.include() + #~ Exception.mem_fun('what').exclude() # declared with empty throw + #~ Exception.mem_fun('getNumber').exclude() # declared with empty throw + #~ Exception.translate_exception_to_string( 'PyExc_RuntimeError', 'exc.getFullDescription().c_str()' ) + + +def _ReturnUnsignedInt( type_ ): + """helper to return an UnsignedInt call for tranformation functions + """ + return declarations.cpptypes.unsigned_int_t() + +def Fix_Void_Ptr_Args ( mb ): + """ we modify functions that take void *'s in their argument list to instead take + unsigned ints, which allows us to use CTypes buffers + """ + for fun in mb.member_functions(): + arg_position = 0 + for arg in fun.arguments: + if declarations.type_traits.is_void_pointer(arg.type) or arg.type.decl_string == "void const *": + fun.add_transformation( ft.modify_type(arg_position,_ReturnUnsignedInt ), alias=fun.name ) + fun.documentation = docit ("Modified Input Argument to work with CTypes", + "Argument "+arg.name+ "(pos:" + str(arg_position)\ + +") takes a CTypes.adddressof(xx)", "...") + print "Fixed Void Ptr", fun, arg_position + break + arg_position +=1 + + ## lets go and look for stuff that might be a problem + pointee_types=['unsigned int',' int ', ' float ', ' Real ', 'uchar', 'uint8', + 'unsigned char'] + + function_names=[] + for fun in mb.member_functions(): + if fun.documentation or fun.ignore: continue ## means it's been tweaked somewhere else + for n in function_names: + if n in fun.name: + print "CHECK :", fun + break + arg_position = 0 + for arg in fun.arguments: + if declarations.is_pointer(arg.type): ## and "const" not in arg.type.decl_string: + for i in pointee_types: + if i in arg.type.decl_string: + print '"',arg.type.decl_string, '"' + print "CHECK ", fun, str(arg_position) + fun.documentation=docit("SUSPECT - MAYBE BROKEN", "....", "...") + break + arg_position +=1 + +## NEED To do the same for constructors + for fun in mb.constructors(): + arg_position = 0 + for arg in fun.arguments: + if declarations.is_pointer(arg.type): ## and "const" not in arg.type.decl_string: + for i in pointee_types: + if i in arg.type.decl_string: + print '"',arg.type.decl_string, '"' + print "Excluding: ", fun + fun.exclude() + break + arg_position +=1 + +def Fix_Pointer_Returns ( mb ): + """ Change out functions that return a variety of pointer to base types and instead + have them return the address the pointer is pointing to (the pointer value) + This allow us to use CTypes to handle in memory buffers from Python + + Also - if documentation has been set then ignore the class/function as it means it's been tweaked else where + """ + pointee_types=['unsigned int','int', 'float', 'unsigned char'] + known_names=[] # these are function names we know it's cool to exclude + for fun in mb.member_functions(): + if declarations.is_pointer (fun.return_type) and not fun.documentation: + for i in pointee_types: + if fun.return_type.decl_string.startswith ( i ) and not fun.documentation: + if not fun.name in known_names: + print "Excluding (function):", fun, "as it returns (pointer)", i + fun.exclude() + for fun in mb.member_operators(allow_empty=True): + if declarations.is_pointer (fun.return_type) and not fun.documentation: + for i in pointee_types: + if fun.return_type.decl_string.startswith ( i ) and not fun.documentation: + print "Excluding (operator):", fun + fun.exclude() + + + +def query_containers_with_ptrs(decl): + if not isinstance( decl, declarations.class_types ): + return False + if not decl.indexing_suite: + return False + return declarations.is_pointer( decl.indexing_suite.element_type ) + + +def Remove_Static_Consts ( mb ): + """ linux users have compile problems with vars that are static consts AND have values set in the .h files + we can simply leave these out """ + checker = varchecker.var_checker() + for var in mb.vars(): + if type(var.type) == declarations.cpptypes.const_t: + if checker( var ): + print "Excluding static const ", var + var.exclude() + +# +# 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.W1039 +# , 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.navi.root_dir, "python_navi.h" ) + , environment.navi.cache_file ) + + defined_symbols = [ 'OGRE_NONCLIENT_BUILD', 'OGRE_GCC_VISIBILITY'] + if environment._USE_THREADS: + defined_symbols.append('BOOST_HAS_THREADS') + defined_symbols.append('BOOST_HAS_WINTHREADS') + defined_symbols.append( 'VERSION_' + environment.navi.version ) + + undefined_symbols = [] + # + # 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.navi.include_dirs + , define_symbols=defined_symbols + , indexing_suite_version=2 + , cflags=environment.navi.cflags + ) + # NOTE THE CHANGE HERE + mb.constructors().allow_implicit_conversion = False + mb.register_module_dependency ( environment.ogre.generated_dir ) + + 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() + + + AutoExclude ( mb ) + ManualExclude ( mb ) + AutoInclude ( mb ) + ManualInclude ( mb ) + # here we fixup functions that expect to modifiy their 'passed' variables + ManualTransformations ( mb ) + + AutoFixes ( mb ) + ManualFixes ( mb ) + + + # + # We need to tell boost how to handle calling (and returning from) certain functions + # + Set_Call_Policies ( mb.global_ns ) + + # + # 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, { 'PROJECT_version' : '"%s"' % environment.navi.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__' : '"Navi PROJECT 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='_navi_' , doc_extractor= extractor ) + + for inc in environment.navi.include_dirs: + mb.code_creator.user_defined_directories.append(inc ) + mb.code_creator.user_defined_directories.append( environment.navi.generated_dir ) + mb.code_creator.replace_included_headers( customization_data.header_files( environment.navi.version ) ) + + huge_classes = map( mb.class_, customization_data.huge_classes( environment.navi.version ) ) + + mb.split_module(environment.navi.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.. + additional_files = [] + paths = [] + + for p in paths: + additional_files = os.listdir(p) + for f in additional_files: + if f.endswith('cpp') or f.endswith('.h'): + sourcefile = os.path.join(p, f) + destfile = os.path.join(environment.navi.generated_dir, f ) + + if not common_utils.samefile( sourcefile ,destfile ): + shutil.copy( sourcefile, environment.navi.generated_dir ) + print "Updated ", f, "as it was missing or out of date" +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/navi/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/navi/hand_made_wrappers.py (rev 0) +++ trunk/python-ogre/code_generators/navi/hand_made_wrappers.py 2007-09-12 13:40:08 UTC (rev 375) @@ -0,0 +1,72 @@ +import os +import environment + + +WRAPPER_DEFINITION_NaviManager = \ +""" +class EventCallback +{ +public: + EventCallback(PyObject* subscriber, std::string const & method) + { + mSubscriber = subscriber; + mMethod = method; + } + + void call(const NaviLibrary::NaviData &naviData) + { + if (mMethod.length() > 0 ) { + boost::python::call_method<void>(mSubscriber, mMethod.c_str(), + static_cast<const NaviLibrary::NaviData&>(naviData) ); + } + else + boost::python::call<void>(mSubscriber, + static_cast<const NaviLibrary::NaviData&>(naviData) ); + } + PyObject* mSubscriber; + std::string mMethod; +}; + + + +void NaviManager_bind(NaviLibrary::NaviManager &me, const std::string &naviName, + const std::string &naviDataName, + PyObject* subscriber, std::string const & method="", + boost::python::list listin= boost::python::list()) +{ + int index; + + // create a new call back function that knows how to call a python function or class method + EventCallback * cb = new EventCallback( subscriber, method); + + // create the necessary Delegate wrapper around this new functions + NaviLibrary::NaviDelegate callback = NaviLibrary::NaviDelegate ( cb, &EventCallback::call ); + + // we allow a list of strings to be passed in and we convert these to a string vector + std::vector<std::string> myVector; + for (index=0;index<len(listin);index++ ) + myVector.push_back ( boost::python::extract<std::string> (listin[index]) ); + + // and finally call the bind function to make it all work + me.bind(naviName, naviDataName, callback, myVector ) ; +} + +""" +WRAPPER_REGISTRATION_NaviManager = [ + """def( "bind", &::NaviManager_bind );""" + +] + + +################################################################################################# +################################################################################################# + +def apply_reg ( class_, code ): + for c in code: + class_.add_registration_code ( c ) + +def apply( mb ): + rt = mb.class_( 'NaviManager' ) + rt.add_declaration_code( WRAPPER_DEFINITION_NaviManager ) + apply_reg (rt, WRAPPER_REGISTRATION_NaviManager ) + \ No newline at end of file Added: trunk/python-ogre/code_generators/navi/python_navi.h =================================================================== --- trunk/python-ogre/code_generators/navi/python_navi.h (rev 0) +++ trunk/python-ogre/code_generators/navi/python_navi.h 2007-09-12 13:40:08 UTC (rev 375) @@ -0,0 +1,19 @@ +#include "navi.h" + +// First we create a magic namespace to hold all our aliases +namespace pyplusplus { namespace aliases { + + #include "python_navi_aliases.h" +} } + +// then we exposed everything needed (and more) to ensure GCCXML makes them visible to Py++ +// +namespace python_plib{ namespace details{ +inline void instantiate(){ + using namespace NaviLibrary; + + #include "python_navi_sizeof.h" + +} } } + + Added: trunk/python-ogre/code_generators/navi/python_navi_aliases.h =================================================================== --- trunk/python-ogre/code_generators/navi/python_navi_aliases.h (rev 0) +++ trunk/python-ogre/code_generators/navi/python_navi_aliases.h 2007-09-12 13:40:08 UTC (rev 375) @@ -0,0 +1,5 @@ +typedef NaviLibrary::NaviUtilities::InlineVector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >\ + InlineVectorString; +typedef std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > >\ + MapStringString; +typedef std::vector<std::string, std::allocator<std::string> > VectorString; Added: trunk/python-ogre/code_generators/navi/python_navi_sizeof.h =================================================================== --- trunk/python-ogre/code_generators/navi/python_navi_sizeof.h (rev 0) +++ trunk/python-ogre/code_generators/navi/python_navi_sizeof.h 2007-09-12 13:40:08 UTC (rev 375) @@ -0,0 +1,3 @@ + + + Added: trunk/python-ogre/code_generators/navi/register_exceptions.py =================================================================== --- trunk/python-ogre/code_generators/navi/register_exceptions.py (rev 0) +++ trunk/python-ogre/code_generators/navi/register_exceptions.py 2007-09-12 13:40:08 UTC (rev 375) @@ -0,0 +1,137 @@ +import os +import environment +from string import Template + +base_exception = \ +""" +class OgreException(Exception): + def __init__( self, app_error ): + Exception.__init__( self ) + self._pimpl = app_error + + def __str__( self ): + return self._pimpl.getFullDescription() + + def __getattribute__(self, attr): + my_pimpl = super(OgreException, self).__getattribute__("_pimpl") + try: + return getattr(my_pimpl, attr) + except AttributeError: + return super(OgreException,self).__getattribute__(attr) + +_ogre_.OgreException = OgreException +#this one for backward compatability +_ogre_.Exception = OgreException +_ogre_._Exception_.py_err_class = OgreException +""".strip() + +derived_py_exception = \ +""" +class Ogre${err_class}(OgreException): + def __init__( self, app_error ): + OgreException.__init__( self, app_error ) + + def __getattribute__(self, attr): + return super(Ogre${err_class},self).__getattribute__(attr) + +_ogre_._${err_class}_.py_err_class = Ogre${err_class} +_ogre_.Ogre${err_class} = Ogre${err_class} +""".strip() + +register_translator = """${err_class}_exception_translator();""" + +exception_translator = \ +""" + +struct ${err_class}_exception_translator{ + + typedef Ogre::${err_class} exception_type; + typedef ${err_class}_exception_translator translator_type; + + ${err_class}_exception_translator(){ + bp::converter::registry::push_back( &translator_type::convertible + , &translator_type::construct + , bp::type_id<exception_type>() ); + + bp::register_exception_translator<exception_type>(&translator_type::translate); + } + + static void + translate( const exception_type& err ){ + bp::object pimpl_err( err ); + bp::object pyerr_class = pimpl_err.attr( "py_err_class" ); + bp::object pyerr = pyerr_class( pimpl_err ); + PyErr_SetObject( pyerr_class.ptr(), bp::incref( pyerr.ptr() ) ); + } + + //Sometimes, exceptions should be passed back to the library. + static void* + convertible(PyObject* py_obj){ + if( 1 != PyObject_IsInstance( py_obj, PyExc_Exception ) ){ + return 0; + } + + if( !PyObject_HasAttrString( py_obj, "_pimpl" ) ){ + return 0; + } + + bp::object pyerr( bp::handle<>( bp::borrowed( py_obj ) ) ); + bp::object pimpl = bp::getattr( pyerr, "_pimpl" ); + bp::extract<exception_type> type_checker( pimpl ); + if( !type_checker.check() ){ + return 0; + } + return py_obj; + } + + static void + construct( PyObject* py_obj, bp::converter::rvalue_from_python_stage1_data* data){ + typedef bp::converter::rvalue_from_python_storage<exception_type> storage_t; + + bp::object pyerr( bp::handle<>( bp::borrowed( py_obj ) ) ); + bp::object pimpl = bp::getattr( pyerr, "_pimpl" ); + + storage_t* the_storage = reinterpret_cast<storage_t*>( data ); + void* memory_chunk = the_storage->storage.bytes; + exception_type* cpp_err + = new (memory_chunk) exception_type( bp::extract<exception_type>(pimpl) ); + + data->convertible = memory_chunk; + } + +}; +""".strip() + +def substitute( text, **keywd ): + return Template( text ).substitute( **keywd ) + +def register( mb ): + ogre_ns = mb.namespace( 'Ogre' ) + python_part_code = ['import _ogre_'] + + exception = ogre_ns.class_( 'Exception' ) + exception.include() + exception.alias = '_%s_' % exception.name + exception.add_declaration_code( substitute( exception_translator, err_class=exception.name ) ) + exception.add_registration_code( substitute( register_translator, err_class=exception.name ), False ) + python_part_code.append( base_exception ) + + for derived_info in exception.derived: + derived = derived_info.related_class + derived.include() + derived.alias = '_%s_' % derived.name + derived.add_declaration_code( substitute( exception_translator, err_class=derived.name ) ) + derived.add_registration_code( substitute( register_translator, err_class=derived.name ), False ) + python_part_code.append( substitute( derived_py_exception, err_class=derived.name ) ) + + directory_path = environment.ogre.generated_dir + ogre_exceptions = os.path.join( directory_path, '_ogre_exceptions_.py' ) + + if os.path.exists( directory_path ) and not os.path.isdir(directory_path): + raise RuntimeError( 'directory_path should be a path not a file.' ) + if not os.path.exists( directory_path ): + os.makedirs( directory_path ) + + f = file( ogre_exceptions, 'w+' ) + f.write( os.linesep.join( python_part_code ) ) + f.close() Modified: trunk/python-ogre/code_generators/nxogre/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/nxogre/generate_code.py 2007-09-06 10:19:05 UTC (rev 374) +++ trunk/python-ogre/code_generators/nxogre/generate_code.py 2007-09-12 13:40:08 UTC (rev 375) @@ -93,6 +93,11 @@ ,'::NxOgre::Container<std::string, NxOgre::FluidDrain*>::get' ,'::NxOgre::Container<std::string, NxOgre::FluidDrain*>::getFirst' ,'::NxOgre::Container<std::string, NxOgre::FluidDrain*>::next' + ,'::NxOgre::Container<std::string, NxOgre::FluidDrain*>::_begin' + ,'::NxOgre::Container<std::string, NxOgre::FluidDrain*>::_next' + ,'::NxOgre::Container<std::string, NxOgre::FluidEmitter*>::_begin' + ,'::NxOgre::Container<std::string, NxOgre::FluidEmitter*>::_next' + ,'::NxOgre::Container<std::string, NxOgre::FluidEmitter*>::getFirst' ,'::NxOgre::List<NxOgre::RemoteDebuggerConnection::Camera>::destroyAndEraseAll' ,'::NxOgre::List<NxOgre::RemoteDebuggerConnection::Camera>::dumpToConsole' @@ -109,20 +114,24 @@ ,'::NxOgre::Joint::getBreakableMaxTorque' ,'::NxOgre::Joint::getGlobalAxis' ,'::NxOgre::Joint::setGlobalAxis' - ,'::NxOgre::Joint::getType' - ,'::NxOgre::Joint::hasMoreLimitPlanes' - ,'::NxOgre::Joint::purgeLimitPlanes' - ,'::NxOgre::Joint::resetLimitPlaneIterator' - ,'::NxOgre::Joint::addLimitPlane' - ,'::NxOgre::Joint::setBreakable' - ,'::NxOgre::Joint::getGlobalAnchor' - ,'::NxOgre::Joint::setGlobalAnchor' - ,'::NxOgre::Joint::getState' - ,'::NxOgre::Joint::getNextLimitPlane' - ,'::NxOgre::Joint::setLimitPoint' - ,'::NxOgre::Joint::getLimitPoint' - ,'::NxOgre::Joint::getActorA' - ,'::NxOgre::Joint::getActorB' +# # # ,'::NxOgre::Joint::getType' +# ,'::NxOgre::Joint::hasMoreLimitPlanes' +# ,'::NxOgre::Joint::purgeLimitPlanes' +# ,'::NxOgre::Joint::resetLimitPlaneIterator' +# ,'::NxOgre::Joint::addLimitPlane' +# ,'::NxOgre::Joint::setBreakable' +# ,'::NxOgre::Joint::getGlobalAnchor' +# ,'::NxOgre::Joint::setGlobalAnchor' +# ,'::NxOgre::Joint::getState' +# ,'::NxOgre::Joint::getNextLimitPlane' +# ,'::NxOgre::Joint::setLimitPoint' +# ,'::NxOgre::Joint::getLimitPoint' +# ,'::NxOgre::Joint::getActorA' +# ,'::NxOgre::Joint::getActorB' + ,'::NxOgre::JointParams::setSpring' + ,'::NxOgre::JointParams::setMotor' + ,'::NxOgre::JointParams::setLimits' + ,'::NxOgre::JointParams::setJointProjection' ,'::NxOgre::Scene::addMaterialPairsFromFile' ,'::NxOgre::Scene::addMaterialPair' ,'::NxOgre::Fluid::setName' @@ -134,6 +143,8 @@ ,'::NxOgre::Scene::createPrismaticJoint' ,'::NxOgre::Scene::createFixedJoint' ,'::NxOgre::Scene::save' + ,'::NxOgre::Scene::batchDestroyActors' + ,'::NxOgre::SimpleIntersection::getResult' ,'::NxOgre::SoftBody::simulate' ,'::NxOgre::SoftBody::render' ,'::NxOgre::PhysXDriver::stop' @@ -169,6 +180,7 @@ ## I have a challenge that Py++ doesn't recognise these classes by full name (perhaps because they are structs?) ## so I have to look through and match on a class by class basis excludeName = ['Container<NxOgre::Scene::Renderables, float>' + ,'Container<std::string,NxOgre::Actor*>' ,'List<NxOgre::CharacterHitReport*>' ,'List<NxOgre::RemoteDebuggerConnection::Camera>' ,'List<NxOgre::Blueprints::ActorBlueprint*>' Modified: trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h =================================================================== --- trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h 2007-09-06 10:19:05 UTC (rev 374) +++ trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h 2007-09-12 13:40:08 UTC (rev 375) @@ -1,3 +1,6 @@ +typedef std::vector<NxOgre::Joint::LimitPlane,std::allocator<NxOgre::Joint::LimitPlane> > VectorJointLimitPlane; +typedef std::vector<NxOgre::SimplePlane*,std::allocator<NxOgre::SimplePlane*> > VectorSimplePlane; + typedef std::vector<float, std::allocator<float> > VectorFloat; typedef std::vector<std::string, std::allocator<std::string> > VectorString; typedef std::list<std::string> stdString; Modified: trunk/python-ogre/code_generators/quickgui/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/quickgui/generate_code.py 2007-09-06 10:19:05 UTC (rev 374) +++ trunk/python-ogre/code_generators/quickgui/generate_code.py 2007-09-12 13:40:08 UTC (rev 375) @@ -369,8 +369,8 @@ os.path.join( environment.quickgui.root_dir, "python_quickgui.h" ) , environment.quickgui.cache_file ) - defined_symbols = [ 'OGRE_NONCLIENT_BUILD', 'FT2_BUILD_LIBRARY', 'QUICKGUI_EXPORTS', - 'WIN32', 'NDEBUG', 'WINDOWS' ] + defined_symbols = [ 'OGRE_NONCLIENT_BUILD', + 'WIN32', 'NDEBUG', 'WINDOWS' ] ## , 'QUICKGUI_EXPORTS' if environment._USE_THREADS: defined_symbols.append('BOOST_HAS_THREADS') defined_symbols.append('BOOST_HAS_WINTHREADS') @@ -461,17 +461,17 @@ ## now we need to ensure a series of headers and additional source files are ## copied to the generated directory.. - additional_files= os.listdir(environment.Config.PATH_INCLUDE_quickgui) - additional_files=[] - for f in additional_files: - if f.endswith('cpp') or f.endswith('.h'): - sourcefile = os.path.join(environment.Config.PATH_INCLUDE_quickgui, f) - destfile = os.path.join(environment.quickgui.generated_dir, f ) + additional_dirs=[environment.Config.PATH_INCLUDE_quickgui, + os.path.join(environment.Config.PATH_quickgui,'QuickGUI','src')] + for d in additional_dirs: + for f in os.listdir(d): + if f.endswith('cpp') or f.endswith('.h'): + sourcefile = os.path.join(d, f) + destfile = os.path.join(environment.quickgui.generated_dir, f ) + if not common_utils.samefile( sourcefile ,destfile ): + shutil.copy( sourcefile, environment.quickgui.generated_dir ) + print "Updated ", f, "as it was missing or out of date" - if not common_utils.samefile( sourcefile ,destfile ): - shutil.copy( sourcefile, environment.quickgui.generated_dir ) - print "Updated ", f, "as it was missing or out of date" - if __name__ == '__main__': start_time = time.clock() generate_code() Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2007-09-06 10:19:05 UTC (rev 374) +++ trunk/python-ogre/environment.py 2007-09-12 13:40:08 UTC (rev 375) @@ -103,15 +103,64 @@ ###################### ## Hopefully we can make the rest of this 'automagic' ## +class Default: + version = "" + pythonModule = False + moduleName = "" + myHome = "" + myLibraryPaths = [ ] + myLibraries = [ ] + parent = None + children = [] + codeGenerationFlags=[] + dependsOn = [] + compileFlags = [] + linkFlags= [] + includePaths = [] + myIncludes = [] + libaries = myLibraries # a list of the libraries I need plus + mySource = [] # where to get the source - tuples, {'svn|cvs|ftp|http','utl'} + myBuildCmds = [] # commands to build the library with ###################### - +class boost: + version = "3.4" + pythonModule = False + moduleName = "" + myHome = 'boost' + myLibraryPaths = [ 'boost/bin.v2/libs/python2.5/build/msvc-8.0/release/threading-multi' ] + myLibraries = [ 'boost_python-vc80-mt-1_35'] + + parent = None + children = [] + codeGenerationFlags=[] + dependsOn = [] + compileFlags = [] + linkFlags= [] + includePaths = [] + myIncludes = [] + libaries = myLibraries # a list of the libraries I need plus + mySource = ['http://prdownloads.sourceforge.net/boost/boost-jam-3.1.13-1-linuxx86.tgz', + 'http://downloads.sourceforge.net/boost/boost_1_34_0.tar.bz2'] # where to get the source - tuples, {'svn|cvs|ftp|http','utl'} + myBuildCmds = [] # commands to build the library with + class ogre: active = True - version = "1.4" # "1.2" + pythonModule = True + version = "1.4" + myName='ogre' + moduleName='OGRE' cflags = "" - parent = "ogre/renderer" - ModuleName = 'OGRE' + moduleParentLocation = "renderer" + dependsOn = ['boost'] + myLibraryPaths = [] + myLibraries = ['OgreMain'] + libraries = myLibraries + +# for mod in dependsOn: +# libraries += mod.libraries +# + if os.name =='nt': libs=[Config.LIB_Boost, 'OgreMain' ] #, 'OgreGUIRenderer', 'CEGUIBase'] lib_dirs = [ Config.PATH_LIB_Boost @@ -335,7 +384,7 @@ class quickgui: version="0.9.6" parent="ogre/gui" - CCFLAGS = ' /D "WIN32" /D "NDEBUG", /D "WINDOWS" /D "OGRE_PLATFORM_WIN32"' # /D "FT2_BUILD_LIBRARY" + CCFLAGS = ' /D "WIN32" /D "NDEBUG", /D "WINDOWS"' ###/D "OGRE_PLATFORM_WIN32"' # /D "FT2_BUILD_LIBRARY" cflags="" include_dirs = [ Config.PATH_Boost, Config.PATH_INCLUDE_Ogre, @@ -343,14 +392,35 @@ #,Config.PATH_INCLUDE_freetype ] lib_dirs = [Config.PATH_LIB_Boost, - Config.PATH_LIB_Ogre_OgreMain, - Config.PATH_LIB_quickgui + Config.PATH_LIB_Ogre_OgreMain + ##,Config.PATH_LIB_quickgui ] CheckIncludes=[] - libs=[ Config.LIB_Boost, 'OgreMain', 'QuickGUI' ] + libs=[ Config.LIB_Boost, 'OgreMain' ] ModuleName="quickgui" active=True +class navi: + version="0.9" + parent="ogre/gui" + CCFLAGS = '/D "WIN32" /D "NDEBUG", /D "WINDOWS"' + cflags="" + include_dirs = [ Config.PATH_Boost + ,Config.PATH_INCLUDE_Ogre + ,Config.PATH_INCLUDE_navi + ,os.path.join(Config.PATH_navi,'..','Dependencies','win32','llmozlib','include') + ] + lib_dirs = [Config.PATH_LIB_Boost, + Config.PATH_LIB_Ogre_OgreMain + ,Config.PATH_LIB_navi + ,os.path.join(Config.PATH_navi,'..','Dependencies','win32','llmozlib','lib') + ] + CheckIncludes=[] + libs=[ Config.LIB_Boost, 'Navi', 'OgreMain','llmozlib', 'user32', + 'kernel32.lib', 'gdi32.lib', 'winspool.lib', 'comdlg32.lib', 'advapi32.lib', + 'shell32.lib','ole32.lib','oleaut32.lib','uuid.lib' ] + ModuleName="navi" + active=True class betagui: version="0.16" @@ -558,6 +628,7 @@ , 'ogrevideoffmpeg' : ogrevideoffmpeg , 'ogredshow' : ogredshow , 'plib' : plib + , 'navi': navi #, 'raknet' : raknet } Modified: trunk/python-ogre/scripts/MakeRelease.bat =================================================================== --- trunk/python-ogre/scripts/MakeRelease.bat 2007-09-06 10:19:05 UTC (rev 374) +++ trunk/python-ogre/scripts/MakeRelease.bat 2007-09-12 13:40:08 UTC (rev 375) @@ -26,6 +26,7 @@ del ..\..\PythonOgreRelease\1 /s del ..\..\PythonOgreRelease\2 /s del ..\..\PythonOgreRelease\ogre.cfg /s +for /r ..\..\PythonOgreRelease\ %1 in (*) do touch %1 rem rmdir /s /q ..\..\PythonOgreRelease\demos\gui\tofix rem rmdir /s /q ..\..\PythonOgreRelease\demos\ogre\tofix Added: trunk/python-ogre/scripts/MakeSnapShot.bat =================================================================== --- trunk/python-ogre/scripts/MakeSnapShot.bat (rev 0) +++ trunk/python-ogre/scripts/MakeSnapShot.bat 2007-09-12 13:40:08 UTC (rev 375) @@ -0,0 +1,31 @@ +rem echo off +echo +echo ====== Python-Ogre Snap Shot ====== +echo = +rmdir /s /q ..\..\PythonOgreSnapShot +mkdir ..\..\PythonOgreSnapShot\packages_2.5 +mkdir ..\..\PythonOgreSnapShot\plugins +mkdir ..\..\PythonOgreSnapShot\demos +mkdir ..\..\PythonOgreSnapShot\ThirdParty +mkdir ..\..\PythonOgreSnapShot\Tools +mkdir ..\..\PythonOgreSnapShot\docs +xcopy ..\packages_2.5 ..\..\PythonOgreSnapShot\packages_2.5 /s +xcopy ..\plugins ..\..\PythonOgreSnapShot\plugins +copy ..\*.rtf ..\..\PythonOgreSnapShot +copy ..\COPYING ..\..\PythonOgreSnapShot +copy ..\*.gpl ..\..\PythonOgreSnapShot +copy ..\setup.py ..\..\PythonOgreSnapShot + +copy ..\changelog.txt ..\..\PythonOgreSnapShot +del ..\..\PythonOgreSnapShot\*.pyc /s +del ..\..\PythonOgreSnapShot\*.log /s +del ..\..\PythonOgreSnapShot\1 /s +del ..\..\PythonOgreSnapShot\2 /s +del ..\..\PythonOgreSnapShot\ogre.cfg /s +for /r ..\..\PythonOgreSnapShot\ %1 in (*) do touch %1 +rem rmdir /s /q ..\..\PythonOgreSnapShot\demos\gui\tofix +rem rmdir /s /q ..\..\PythonOgreSnapShot\demos\ogre\tofix + + + + Deleted: trunk/python-ogre/scripts/PythonOgreInstallCreator.iss =================================================================== --- trunk/python-ogre/scripts/PythonOgreInstallCreator.iss 2007-09-06 10:19:05 UTC (rev 374) +++ trunk/python-ogre/scripts/PythonOgreInstallCreator.iss 2007-09-12 13:40:08 UTC (rev 375) @@ -1,446 +0,0 @@ -; -; Python-Ogre setup script -; -[Setup] -AppName=Python-Ogre -AppVerName=Python-Ogre 1.0RC2c -DefaultDirName=C:\PythonOgre -DefaultGroupName=Python-Ogre -OutputBaseFilename=PythonOgreInstaller -OutputDir=C:\temp -SourceDir=C:\Development\PythonOgreRelease -VersionInfoDescription=First Installer Release of Python-Ogre -AllowNoIcons=true -AppPublisher=OpenSource -AppPublisherURL=http://www.python-ogre.org -AppSupportURL=http://www.python-ogre.org -AppUpdatesURL=http://www.python-ogre.org -AppVersion=1.0.2.3 -LicenseFile=LICENSE.GPL -Compression=lzma -InfoBeforeFile=InstallWarning.rtf -InfoAfterFile=postinstall.rtf -SolidCompression=true -AppCopyright=LPGL -VersionInfoCompany=OpenSource -VersionInfoTextVersion=1.0RC2c -VersionInfoCopyright=PythonOgre Development Team -RestartIfNeededByRun=false -UninstallDisplayName=PythonOgre -WizardImageFile=compiler:WizModernImage-IS.bmp -WizardSmallImageFile=compiler:WizModernSmallImage-IS.bmp -VersionInfoVersion=1.0.2.3 -[Files] -; base files, demos and tools -Source: *; DestDir: {app} -Source: plugins\*; DestDir: {app}\plugins -Source: tools\*; DestDir: {app}\tools -Source: demos\*; DestDir: {app}\demos; Flags: recursesubdirs -Source: docs\*; DestDir: {app}\docs; Flags: recursesubdirs -; the python modules - in the event we find python -Source: packages_2.5\*; DestDir: {code:GetPythonSiteDir}; Flags: recursesubdirs; Check: SelectedPython('2.5') -Source: packages_2.4\*; DestDir: {code:GetPythonSiteDir}; Flags: recursesubdirs; Check: SelectedPython('2.4') -; the python modules again - if we don't find python we install both versions in the app directory -Source: packages_2.5\*; DestDir: {app}\packages_2.5; Flags: recursesubdirs; Check: NoPythonFound -Source: packages_2.4\*; DestDir: {app}\packages_2.4; Flags: recursesubdirs; Check: NoPythonFound -; -; we need to remove the .pyc files when we uninstall -; -Source: ThirdParty\dxwebsetup.exe; DestDir: {app}\ThirdParty -Source: ThirdParty\vcredist_x86.exe; DestDir: {app}\ThirdParty - -[UninstallDelete] -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\renderer\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\renderer\OGRE\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\io\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\io\OIS\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\gui\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\gui\CEGUI\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\gui\QuickGUI\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\sound\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\sound\OgreAL\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\physics\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\physics\OgreRefApp\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\physics\ODE\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\physics\OgreOde\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\physics\OgreNewt\*.pyc - -Type: files; Name: {app}\demos\CEGUI\*.pyc -Type: files; Name: {app}\demos\CEGUI\*.log -Type: files; Name: {app}\demos\GUI\*.pyc -Type: files; Name: {app}\demos\GUI\*.log -Type: files; Name: {app}\demos\ogre\*.pyc -Type: files; Name: {app}\demos\ogre\*.log -Type: files; Name: {app}\demos\ogreode\*.pyc -Type: files; Name: {app}\demos\ogreode\*.log -Type: files; Name: {app}\demos\ogrenewt\*.pyc -Type: files; Name: {app}\demos\ogrenewt\*.log -Type: files; Name: {app}\demos\ogreal\*.pyc -Type: files; Name: {app}\demos\ogreal\*.log -Type: files; Name: {app}\demos\ode\*.pyc -Type: files; Name: {app}\demos\ode\*.log -Type: files; Name: {app}\demos\CEGUI\*.cfg -Type: files; Name: {app}\demos\GUI\*.cfg -Type: files; Name: {app}\demos\ogre\*.cfg -Type: files; Name: {app}\demos\ogreode\*.cfg -Type: files; Name: {app}\demos\ogrenewt\*.cfg -Type: files; Name: {app}\demos\ogreal\*.cfg -Type: files; Name: {app}\demos\ode\*.cfg -Type: dirifempty; Name: {app}\demos\CEGUI -Type: dirifempty; Name: {app}\demos\GUI -Type: dirifempty; Name: {app}\demos\ogre -Type: dirifempty; Name: {app}\demos\ogreode -Type: dirifempty; Name: {app}\demos\ogrenewt -Type: dirifempty; Name: {app}\demos\ogreal -Type: dirifempty; Name: {app}\demos\ode -Type: dirifempty; Name: {app}\demos -Type: dirifempty; Name: {app} - -; -; I REALLY DON'T like doing this but if people have used a previous version of Python-Ogre -; I need to remove it to force any existing source code to fail and hence have them -; update to the new directory structure.. -; being very conservative in this!!!!!!!!!!!!! -; -[InstallDelete] -Type: files; Name: {code:GetPythonSiteDir}\Ogre\*.pyd -Type: files; Name: {code:GetPythonSiteDir}\OIS\*.pyd -Type: files; Name: {code:GetPythonSiteDir}\GUI\*.pyd -Type: files; Name: {code:GetPythonSiteDir}\OgreOde\*.pyd -Type: files; Name: {code:GetPythonSiteDir}\OgreNewt\*.pyd -Type: files; Name: {code:GetPythonSiteDir}\OgreAL\*.pyd -Type: files; Name: {code:GetPythonSiteDir}\OgreRefApp\*.pyd -Type: files; Name: {code:GetPythonSiteDir}\ODE\*.pyd -Type: files; Name: {code:GetPythonSiteDir}\FMOD\*.pyd - -Type: files; Name: {code:GetPythonSiteDir}\Ogre\*.dll -Type: files; Name: {code:GetPythonSiteDir}\OIS\*.dll -Type: files; Name: {code:GetPythonSiteDir}\GUI\*.dll -Type: files; Name: {code:GetPythonSiteDir}\OgreOde\*.dll -Type: files; Name: {code:GetPythonSiteDir}\OgreNewt\*.dll -Type: files; Name: {code:GetPythonSiteDir}\OgreAL\*.dll -Type: files; Name: {code:GetPythonSiteDir}\OgreRefApp\*.dll -Type: files; Name: {code:GetPythonSiteDir}\ODE\*.dll -Type: files; Name: {code:GetPythonSiteDir}\FMOD\*.dll - -Type: files; Name: {code:GetPythonSiteDir}\Ogre\_*.p* -Type: files; Name: {code:GetPythonSiteDir}\OIS\_*.p* -Type: files; Name: {code:GetPythonSiteDir}\GUI\_*.p* -Type: files; Name: {code:GetPythonSiteDir}\OgreOde\_*.p* -Type: files; Name: {code:GetPythonSiteDir}\OgreNewt\_*.p* -Type: files; Name: {code:GetPythonSiteDir}\OgreAL\_*.p* -Type: files; Name: {code:GetPythonSiteDir}\OgreRefApp\_*.p* -Type: files; Name: {code:GetPythonSiteDir}\ODE\_*.p* -Type: files; Name: {code:GetPythonSiteDir}\FMOD\_*.p* - -Type: files; Name: {code:GetPythonSiteDir}\Ogre\sf_*.* - -Type: files; Name: {code:GetPythonSiteDir}\Ogre -Type: files; Name: {code:GetPythonSiteDir}\OIS -Type: files; Name: {code:GetPythonSiteDir}\GUI -Type: files; Name: {code:GetPythonSiteDir}\OgreOde -Type: files; Name: {code:GetPythonSiteDir}\OgreNewt -Type: files; Name: {code:GetPythonSiteDir}\OgreAL -Type: files; Name: {code:GetPythonSiteDir}\OgreRefApp -Type: files; Name: {code:GetPythonSiteDir}\ODE -Type: files; Name: {code:GetPythonSiteDir}\FMOD - -Type: dirifempty; Name: {code:GetPythonSiteDir}\Ogre -Type: dirifempty; Name: {code:GetPythonSiteDir}\OIS -Type: dirifempty; Name: {code:GetPythonSiteDir}\GUI -Type: dirifempty; Name: {code:GetPythonSiteDir}\OgreOde -Type: dirifempty; Name: {code:GetPythonSiteDir}\OgreNewt -Type: dirifempty; Name: {code:GetPythonSiteDir}\OgreAL -Type: dirifempty; Name: {code:GetPythonSiteDir}\OgreRefApp -Type: dirifempty; Name: {code:GetPythonSiteDir}\ODE - -[Icons] -Name: {group}\Ogre Demos\Bezier; Filename: {code:GetPythonExe}; Parameters: Demo_Bezier.py; WorkingDir: {app}\Demos\Ogre -Name: {group}\Ogre Demos\BSP; Filename: {code:GetPythonExe}; Parameters: Demo_BSP.py; WorkingDir: {app}\Demos\Ogre -Name: {group}\Ogre Demos\BSP_Collision; Filename: {code:GetPythonExe}; Parameters: Demo_BspCollision.py; WorkingDir: {app}\Demos\Ogre -Name: {group}\Ogre Demos\Camera Tracking; Filename: {code:GetPythonExe}; Parameters: Demo_CameraTracking.py; WorkingDir: {app}\Demos\Ogre -Name: {group}\Ogre Demos\CEL Shading; Filename: {code:GetPythonExe}; Parameters: Demo_CelShading.py; WorkingDir: {app}\Demos\Ogre -Name: {group}\Ogre Demos\Compositor; Filename: {code:GetPythonExe}; Parameters: Demo_Compositor.py; WorkingDir: {app}\Demos\Ogre -Name: {group}\Ogre Demos\ENV Map; Filename: {code:GetPythonExe}; Parameters: Demo_EnvMap.py; WorkingDir: {app}\Demos\Ogre -Name: {group}\Ogre Demos\Facial; Filename: {code:GetPythonExe}; Parameters: Demo_Facial.py; WorkingDir: {app}\Demos\Ogre -Name: {group}\Ogre ... [truncated message content] |