Changeset 40

Show
Ignore:
Timestamp:
04/01/07 15:41:36 (2 years ago)
Author:
astraw
Message:

compiles on Mac OS X using boost 1.33.1

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/pyosg/MANIFEST.in

    r3 r40  
    11include setup*.py 
    2 include SConstruct 
    3 include Jamfile 
    4 include Jamrules 
    5 recursive-include scons *.py 
    62recursive-include include *.hpp 
    73include include/osgScript/Export 
  • trunk/pyosg/Producer/Camera.cpp

    r3 r40  
    9696}; 
    9797 
    98  
     98/* 
    9999void Camera_addPreCullCallback(Producer::Camera * self, PyObject * cb) 
    100100{ 
     
    168168    } 
    169169} 
     170*/ 
    170171 
    171172tuple getProjectionRectangle(Producer::Camera * self) 
     
    385386        .def("advance", &Producer::Camera::advance) 
    386387        .def("sync", &Producer::Camera::sync) 
    387  
     388      /* 
    388389        .def("addPreCullCallback", 
    389390            &Camera_addPreCullCallback) 
     
    397398        .def("addPostDrawCallback", 
    398399            &Camera_addPostDrawCallback) 
     400      */ 
    399401        .def("cancel", &Producer::Camera::cancel) 
    400402        .def("run", &Producer::Camera::run) 
  • trunk/pyosg/README

    r37 r40  
    22 
    33= Welcome to PyOSG = 
     4 
     5A Python wrapper for [http://openscenegraph.org OpenSceneGraph] 
    46 
    57Given: 
     
    1517 
    1618As I am not able to devote much time to maintaining PyOSG, I ask the community for any and all help with this site and the source -- I will happily grant commit access to either if to anyone with more than a trivial patch. 
     19 
     20= News = 
     21 
     22 * 2007-04-01 PyOSG (trunk in svn repository) now compiles against OSG 
     23   1.0, 1.1, and 1.2 on linux and Mac OS X. I'm still having trouble 
     24   getting it running on Mac OS X (boost::python issues), but 
     25   hopefully the worst is behind us and Windows support can be added 
     26   relatively painlessly. 
    1727 
    1828= Development = 
     
    3545 * Miguel Escriva has been implementing bindings that use the new osgIntrospection features: [http://mescriva.okode.com/svn/osgPython/trunk svn repository] [http://mescriva.okode.com/svn/osgPython/trunk/examples/viewer.py viewer example] 
    3646 
     47= Building notes = 
    3748 
    38 - Andrew Straw [mailto:strawman@astraw.com strawman@astraw.com] (a.k.a. [mailto:astraw@caltech.edu astraw@caltech.edu]) 
     49PyOSG is known to compile and run with OSG versions 1.0, 1.1, and 1.2 
     50on linux. It compiles on Mac OS X but doesn't currently run. 
     51 
     52- Andrew Straw [mailto:strawman@astraw.com strawman@astraw.com] 
  • trunk/pyosg/modules.py

    r32 r40  
    1010    'osgProducer', 
    1111    'osgSim', 
    12 #    'osgText', # disabled (temporarily) until it works with OSG 1.2 
     12#    'osgText', # disabled until someone can get the Python wrapper to work with OSG 1.2 
    1313    'osgUtil', 
    1414    ] 
  • trunk/pyosg/osgProducer/Viewer.cpp

    r32 r40  
    5252    void setUpViewer_2(osgProducer::Viewer::ViewerOptions options) { osgProducer::Viewer::setUpViewer(options); } 
    5353 
     54  /* 
    5455    unsigned int addCameraManipulator(PyObject * cm) 
    5556    { 
     
    6667        } 
    6768    } 
    68  
     69  */ 
    6970        /** compute, from normalized mouse coords, for all Cameras, intersections with the specified subgraph.*/ 
    7071        bool computeIntersections_1(float x,float y,unsigned int cameraNum,osg::Node *node,osgUtil::IntersectVisitor::HitList& hits,osg::Node::NodeMask traversalMask) 
     
    159160        .def("getUsage",  
    160161            &Viewer::getUsage) 
    161  
     162      /* 
    162163        .def("addCameraManipulator",  
    163164            &Viewer::addCameraManipulator) 
     165      */ 
    164166        .def("selectCameraManipulator",  
    165167            &Viewer::selectCameraManipulator) 
  • trunk/pyosg/setup.py

    r15 r40  
    5555    DistributionMetadata.download_url = None 
    5656 
     57define_macros=[('VERSION','"'+__version__+'"')] 
     58library_dirs = [] 
     59extra_link_args = [] 
     60libraries=['OpenThreads','Producer']+modules.ext_modules 
     61libraries.append('osgText') # currently not being built 
     62 
     63data_files = [] 
     64 
     65if sys.platform == 'darwin': 
     66##     data_files = [ 
     67##         ('/usr/local/lib', ['/usr/local/lib/libboost_python-' + boost_version_default + '.dylib']) 
     68##         ] 
     69    if 'osgSound' in modules.ext_modules: 
     70        data_files.append( ('/usr/local/lib', ['/usr/local/lib/libfmodex.dylib']) ) 
     71    package_data = {} 
     72    #define_macros.append( ('__USE_OSX_CGL_IMPLEMENTATION__',None ) ) # prevent building OSG glx version 
     73    define_macros.append( ('__USE_OSX_AGL_IMPLEMENTATION__',None ) ) # prevent building OSG glx version 
     74    library_dirs.append( os.path.join(sys.prefix,'lib') ) 
     75     
     76    for lib in libraries: 
     77        extra_link_args.append('-framework') 
     78        extra_link_args.append(lib) 
     79    libraries=[] # overwrite 
     80     
     81elif sys.platform == 'win32': 
     82    data_files.extend([ 
     83        ('.' , [boost_root_default + '\\lib\\' + 'boost_python-vc71-mt-' + boost_version_default + '.dll']) 
     84        ]) 
     85    if 'osgSound' in modules.ext_modules: 
     86        data_files.append( ('.', ['\\gideon\\bin\\fmodex.dll']) ) 
     87        data_files.append( ('.', ['\\gideon\\bin\\osgsound.dll']) ) 
     88    package_data = {} 
     89else: 
     90    package_data = {} 
     91 
     92libraries.insert(0,'boost_python') 
     93 
    5794extensions = [] 
    5895for libname in modules.ext_modules: 
     
    65102                                cppfiles, 
    66103                                include_dirs=['include'], 
    67                                 define_macros=[('VERSION','"'+__version__+'"')], 
    68                                 libraries=['boost_python','Producer']+modules.ext_modules)) 
     104                                define_macros=define_macros, 
     105                                library_dirs=library_dirs, 
     106                                libraries=libraries, 
     107                                extra_link_args=extra_link_args, 
     108                                )) 
    69109 
    70  
    71 if sys.platform == 'darwin': 
    72     data_files = [ 
    73         ('/usr/local/lib', ['/usr/local/lib/libboost_python-' + boost_version_default + '.dylib']) 
    74         ] 
    75     if 'osgSound' in modules.ext_modules: 
    76         data_files.append( ('/usr/local/lib', ['/usr/local/lib/libfmodex.dylib']) ) 
    77     package_data = {} 
    78 elif sys.platform == 'win32': 
    79     data_files = [ 
    80         ('.' , [boost_root_default + '\\lib\\' + 'boost_python-vc71-mt-' + boost_version_default + '.dll']) 
    81         ] 
    82     if 'osgSound' in modules.ext_modules: 
    83         data_files.append( ('.', ['\\gideon\\bin\\fmodex.dll']) ) 
    84         data_files.append( ('.', ['\\gideon\\bin\\osgsound.dll']) ) 
    85     package_data = {} 
    86 else: 
    87     data_files = [] 
    88     package_data = {} 
    89110 
    90111scriptfiles = filter(isfile, glob('applications/*'))