[692] | 1 | QuickStart |
---|
| 2 | ---------- |
---|
| 3 | 1) Check your OS X and XCode install |
---|
| 4 | - OS X 10.2, minimum |
---|
| 5 | - Latest XCode (1.5) suggested |
---|
| 6 | - X11 SDK Install Required (for freetype2 dylib) |
---|
| 7 | 2) Retrieve the necessary external frameworks from SourceForge: |
---|
| 8 | http://sourceforge.net/project/showfiles.php?group_id=2997&package_id=101495&release_id=307256) |
---|
| 9 | |
---|
| 10 | OR |
---|
| 11 | |
---|
| 12 | Install all the frameworks yourself: |
---|
| 13 | - SDL 1.2 (http://www.libsdl.org/download-1.2.php) |
---|
| 14 | - DevIL 1.6.7 (http://openil.sourceforge.net/download.php) |
---|
| 15 | - Cg 1.2 (http://developer.nvidia.com/object/cg_toolkit_1_2.html) |
---|
| 16 | - zzip (Get the source from http://zziplib.sf.net and see the OGRE forums |
---|
| 17 | for an Xcode build file.) |
---|
| 18 | 3) Open and build Mac/XCode/Ogre/Ogre.xcode |
---|
| 19 | 4) Install the built Ogre.framework |
---|
| 20 | 5) Open and build Mac/XCode/Samples/Samples.xcode |
---|
| 21 | 6) Run samples and be happy. |
---|
| 22 | |
---|
| 23 | FAQ |
---|
| 24 | --- |
---|
| 25 | |
---|
| 26 | Q: How to I build individual samples? |
---|
| 27 | A: In Samples.xcode select an individual app as the target rather than the |
---|
| 28 | aggregate target. Build. |
---|
| 29 | |
---|
| 30 | Q: How to I run other samples? |
---|
| 31 | A: In Samples.xcode open the Run window (cmd-shift-R) and change the target |
---|
| 32 | executable in the toolbar. Run. |
---|
| 33 | |
---|
| 34 | Using the Ogre.framework in Your Applications |
---|
| 35 | --------------------------------------------- |
---|
| 36 | 1) Build the Ogre.framework |
---|
| 37 | 2) Create a new project, using the Cocoa Application template |
---|
| 38 | 3) Delete ALL the generated files from within XCode. Delete *.m, *.pch, *.nib |
---|
| 39 | 4) In you build target's Info screen (cmd+i while the target is highlighed), |
---|
| 40 | remove the Prefix Header |
---|
| 41 | 5) Add SDLMain.m and SDLMain.h to your project. These are in the |
---|
| 42 | ogrenew/Mac/XCode/Classes folder. You will probably want to copy |
---|
| 43 | these items so you may change them without affecting the originals. |
---|
| 44 | 6) Wrap your main function with: |
---|
| 45 | |
---|
| 46 | #ifdef __cplusplus |
---|
| 47 | extern "C" |
---|
| 48 | { |
---|
| 49 | #endif |
---|
| 50 | |
---|
| 51 | int main (...) |
---|
| 52 | |
---|
| 53 | #ifdef __cplusplus |
---|
| 54 | } |
---|
| 55 | #endif |
---|
| 56 | |
---|
| 57 | 7) Add the SDL and Ogre frameworks to your project in "Linked Frameworks". |
---|
| 58 | You can have these copied into your application when it is built, and then |
---|
| 59 | not have your users install these themselves. For information on how to do |
---|
| 60 | this refer to the XCode documentation. |
---|
| 61 | 8) Create the required plugins.cfg and resources.cfg files. |
---|
| 62 | You may start from the examples of these files in |
---|
| 63 | ogrenew/Mac/XCode/Samples. The plugins.cfg can probably be left as is, |
---|
| 64 | but you will want to remove the entries from resources.cfg, as they refer |
---|
| 65 | to the Sample resources. The entries in resources.cfg are relative to the |
---|
| 66 | 'Resources' group in your application. By default, it and all of its |
---|
| 67 | sub-directories are searched by Ogre. |
---|
| 68 | 9) If you have built the Ogre framework with the Development build |
---|
| 69 | style (the default), you will have to edit the Development build |
---|
| 70 | style of your Application to use the Ogre debug headers. To do this, |
---|
| 71 | set your 'OTHER_CFLAGS' and 'OTHER_CXXFLAGS' to '-DDEBUG'. |
---|
| 72 | 10) You are now ready to add your own resources and source files. |
---|
| 73 | Take a look at the Samples and the documentation on the ogre |
---|
| 74 | website for guidance. You should be able to replicate the Samples |
---|
| 75 | by adding all of the source files from the Sample to your application, |
---|
| 76 | and adding the files from Media that it uses to your Resources. |
---|
| 77 | 11) When shipping your newly built .app You should be able to put the OGRE and |
---|
| 78 | other frameworks in .app/Contents/Frameworks and they will be found and |
---|
| 79 | used at runtime. |
---|