PyOgre on Mac OS X installation notes
I've been working on getting this going (with svn revision 194, checked out yesterda). Here are some notes for whoever's maintaining docs/build_macosx.txt...
First of all, it should be mentioned somewhere that the swig step is really slow, at least with version 1.3.25. It took about 70 minutes on my 1.33MHz iBook with 768 megs of RAM.
Then, the compiler invocation references a framework (libpng) that is not inlcuded in the clump of Mac frameworks (Cg, IL, SDL, zzip) supplied on the ogre3d download page. I made this compile by just removing "-framework libpng" from the command, but I'm not sure what repercussions this may have; The main Ogre3d example programs run successfully, and seem to be accessing png files in Samples/Matericals/textures without any trouble, so we may be getting png access "for free" through another framework.
Next, the compiler invocation doesn't generate ogre.pyc, though its existence is suggested by the "cp" command. I just copied _ogre.so and ogre.py into the site-packages directory, hopefully that will work.
Finally, we may want to mention possible alternate locations for the site-packages directory. Many python developers on Mac will have installed separate "framework" versions of python, and then the site-packages directory will be in one of these places:
Typically a mac python developer will be aware of this, but it bears repeating (at least while there's no setup script that takes care of this automatically).
I goofed on my suggested alternate site-packages directories, it should actually be these:
The examples want to include pyogre.ogre, and that doesn't seem to work for me. Instead of suggesting that people put _ogre.so and ogre.py directly in site-packages, it may be a good idea to tell people to create a directory called pyogre in site-packages, and put _ogre.so and ogre.py in there, along with an __init__.py file containing the single line:
With things set up that way, I can now at least me do "import pyogre.ogre" just like the examples do.
The right directory structure for the pyogre package is:
Note that you'll have cegui only if you build it and that __init__.py is an empty file (don't need the import, ogre will be found as sub-package.)
Thank you very much for your notes, I'll add them to the macosx readme.
Which cegui version should I use, the old one (that seems to be the one that was used with the older versions of pyogre), or the recently-released one? And do I do roughly the same thing, wrapping it with swig? I've never used swig before this... Well, maybe I'll try to hack it in there and see what I come up with.
I just realized, I should probably be using the cegui that's in the "Cg.framework" that I downloaded with ogre3d.
One more note for the mac readme: Along with changing the installation directory for _ogre.so, ogre.py, etc, an include dir in the compilation step should be changed (for those users who are using a version of python they installed themselves).
would in this case be one of these instead:
I can't change anything in the MacOS build because I don't have a mac o test it. I'll just add your notes to the readme.
As for CEGUI, only 0.3 (half) works right now and I don't think Cg.framework is the same thing. Cg.framework to me it seems the NVIDIA Cg toolkit ported to MacOS.
First, thanks for all the info on the Mac version. It's sorely needed.
would in this case be one of these instead:
How the heck do I change these settings in Xcode (1.5)? Or do you mean something in the swig files?
Edit: DOH! Nevermind.
I hadn't gotten that far yet, but now I see that you meant in the command line when you invoke g++.
I'm not sure.... I really wish we could be more help, but neither fog nor I own a mac (though I'd love one of those PowerBooks, I just don't have the money for it). Until we find someone with a Mac who's willing and able to maintain Mac support, there's not much we can do. Sorry. =*(
You might try contacting jacknutting directly. He left a large amount of contact information (AIM, ICQ, email...). If he has something that will allow it to compile I'd love to update the mac building notes.
I got it built, but it doesn't run.
It bombs out somewhere during initialization. I'd love to try to get it working, but I'm pretty new to Mac development and haven't done anything with Cocao (the app framework).
Thanks for your reply.