Mac: Ogre.framework portability

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
Ajaxamander
Gnoblar
Posts: 10
Joined: Wed Feb 09, 2005 6:05 am
Location: Ann Arbor, MI
Contact:

Mac: Ogre.framework portability

Post by Ajaxamander »

Has anyone tried to do the following:

Compile the Ogre.framework (doing all the weird library/framework fixing that has been discussed in other threads)

Compile the samples

Then copy the built sample application on another machine? A virgin install of OS X.

Ogre's dylib path is (thankfully) @executable/../Frameworks, so it's meant to be copied into the Sample.app/MacOS/Frameworks/ directory inside the bundle, but none of the samples have the copy files build phase to put it there. Nor do any of them copy the Resources they need into their bundle heirarchy. Has anyone had any luck getting the samples to run *outside* of the build directory, or on another machine, or, more importantly, a build product of your own project?

If so, what build settings and whatnot did you use?
User avatar
temas
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 390
Joined: Sun Oct 06, 2002 11:19 pm
Location: The Woodlands, TX
Contact:

Post by temas »

I've sent my samples to other people many different times. Just put my frameworks in the Frameworks directory as expected.

The reason I don't have the framework copy step hooked up is that it would be a huge waste of disk space for a dev setup.
User avatar
Ajaxamander
Gnoblar
Posts: 10
Joined: Wed Feb 09, 2005 6:05 am
Location: Ann Arbor, MI
Contact:

The Resources too?

Post by Ajaxamander »

the media.cfg file that's loaded in all the samples sets the Resource path to something like ../../../../Samples/Media/etc. etc. Do you switch this*, and copy the resources into the bundle as well?


*To access Bundle.app/Resources/etc. does this need to include the name of the bundle in the path?
User avatar
temas
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 390
Joined: Sun Oct 06, 2002 11:19 pm
Location: The Woodlands, TX
Contact:

Post by temas »

Yeah that's only there for the Samples to run in place for now. As has been noted it will probably need to change to be based off the Resources path.
User avatar
Ajaxamander
Gnoblar
Posts: 10
Joined: Wed Feb 09, 2005 6:05 am
Location: Ann Arbor, MI
Contact:

still no dice

Post by Ajaxamander »

So, modified the target for "Shadows" a bit, so that it copies all the resources, zip files, etc into Shadows.app/Resources/ and SDL.framework, Ogre.framework and zzip.framework are copied into Shadows.app/Frameworks/.

Changed resources.cfg to read:

Code: Select all

# Resource locations to be added to the 'boostrap' path
# This also contains the minimum you need to use the Ogre example framework
#[Bootstrap]
Zip=Shadows.app/Contents/Resources/OgreCore.zip
#FileSystem=../../../../Samples/Media/packs

# Resource locations to be added to the default path
[General]
FileSystem=Shadows.app/Contents/Resources/
Zip=Shadows.app/Contents/Resources/cubemap.zip
Zip=Shadows.app/Contents/Resources/cubemapsJS.zip
Zip=Shadows.app/Contents/Resources/dragon.zip
Zip=Shadows.app/Contents/Resources/fresneldemo.zip
Zip=Shadows.app/Contents/Resources/ogretestmap.zip
Zip=Shadows.app/Contents/Resources/skybox.zip
Now it can run elsewhere on the computer it's built on, (which has zzip.framework installed in /Library/Frameworks/) but if I copy it to another machine, it gives the following error on the console:

Code: Select all

dyld: /Users/woodardj/Desktop/Shadows.app/Contents/MacOS/Shadows can't open library: /Users/temas/Library/Frameworks/zzip.framework/Versions/A/zzip  (No such file or directory, errno = 2)
All of this was built from Ogre HEAD (as CVS updated last night)
User avatar
temas
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 390
Joined: Sun Oct 06, 2002 11:19 pm
Location: The Woodlands, TX
Contact:

Post by temas »

Use this copy of zzip.framework. I'll get the SF copy updated tonight.
Post Reply