OGRE Wiki
Support and community documentation for Ogre3D
Ogre Forums
ogre3d.org
Log in
Username:
Password:
CapsLock is on.
Remember me (for 1 year)
Log in
Home
Tutorials
Tutorials Home
Basic Tutorials
Intermediate Tutorials
Mad Marx Tutorials
In Depth Tutorials
Older Tutorials
External Tutorials
Cookbook
Cookbook Home
CodeBank
Snippets
Experiences
Ogre Articles
Libraries
Libraries Home
Alternative Languages
Assembling A Toolset
Development Tools
OGRE Libraries
List of Libraries
Tools
Tools Home
DCC Tools
DCC Tutorials
DCC Articles
DCC Resources
Assembling a production pipeline
Development
Development Home
Roadmap
Building Ogre
Installing the Ogre SDK
Setting Up An Application
Ogre Wiki Tutorial Framework
Frequently Asked Questions
Google Summer Of Code
Help Requested
Ogre Core Articles
Community
Community Home
Projects Using Ogre
Recommended Reading
Contractors
Wiki
Immediate Wiki Tasklist
Wiki Ideas
Wiki Guidelines
Article Writing Guidelines
Wiki Styles
Wiki Page Tracker
Ogre Wiki Help
Ogre Wiki Help Overview
Help - Basic Syntax
Help - Images
Help - Pages and Structures
Help - Wiki Plugins
Toolbox
Freetags
Categories
List Pages
Structures
Trackers
Statistics
Rankings
List Galleries
Ogre Lexicon
Comments
History: Setting Up An Application - Mac OSX - Shoggoth
View page
Source of version: 13
(current)
%prevogre% {maketoc} !!XCode * In XCode, select menu File > New project > Carbon Application. * Place your project wherever you want and name it, then click ''finish'' * Remove ''main.nib'' and ''*_Prefix.pch'' (note: if you wish to use a precompiled prefix header, you may, just adapt the instructions as needed) * rename main.c to main.cpp. Remove its content and replace it with Ogre code (for instance [http://www.ogre3d.org/wiki/index.php/BasicTutorial2Source)]. * Add Ogre.framework and Cg.framework to your project by right-clicking on your project name in the tree and selecting ''Add > Existing frameworks''. Add the IOKit framework from system directories the same way. * Add static library libois.a the same way (libFreeImage.a, libfreetype.a libzzip.a were also previously required but apparently are no more). ''(These libraries are all provided in the Ogre dependencies download except Ogre.framework that you either got from the mac SDK or built from source.)'' ''(As of Ogre 1.4.5, I had better success with the CVS version of OIS on mac. OIS versions greater than 1.0 should be all okay though.)'' Now you must add the required config files to your project. You can find these files in Ogre/Mac/Samples/config Just drag and drop them to the file tree and they should automatically be copied to the ''Resources'' directory of your app. __Whenever you add data or source files to the project, make sure you check the ''copy items'' checkbox in the dialog that pops-up before confirming file addition because you don't want to modify the original files. There is no need to do that with libraries though.__ * plugins.cfg * media.cfg * resources.cfg : you will need to edit this one to point inside your application. here is an example of resources.cfg file to work with the samples and tutorials {CODE(wrap="1")}# Resource locations to be added to the 'boostrap' path # This also contains the minimum you need to use the Ogre example framework [Bootstrap] Zip=Contents/Resources/Media/packs/OgreCore.zip # Resource locations to be added to the default path [General] FileSystem=Contents/Resources/Media FileSystem=Contents/Resources/Media/fonts FileSystem=Contents/Resources/Media/materials/programs FileSystem=Contents/Resources/Media/materials/scripts FileSystem=Contents/Resources/Media/materials/textures FileSystem=Contents/Resources/Media/models FileSystem=Contents/Resources/Media/overlays FileSystem=Contents/Resources/Media/particle FileSystem=Contents/Resources/Media/gui FileSystem=Contents/Resources/Media/DeferredShadingMedia Zip=Contents/Resources/Media/packs/cubemap.zip Zip=Contents/Resources/Media/packs/cubemapsJS.zip Zip=Contents/Resources/Media/packs/dragon.zip Zip=Contents/Resources/Media/packs/fresneldemo.zip Zip=Contents/Resources/Media/packs/ogretestmap.zip Zip=Contents/Resources/Media/packs/skybox.zip{CODE} * Media : found in Ogre/Samples (if you want to run the samples or tutorials. make sure you create folder references and not group references - you can choose that in the dialog that pops-up just after you dragged and dropped the folder onto the tree) * Open __targets__ in the file tree * Right-click on your target, select ''get info'', go in tab ''build'' * In __configuration__, make sure to select ''all configurations'' when you make changes that should apply to both debug and release * In collection __architectures__, double-click on element ''Architectures'' in the list and select the architectures you wish to build (and have built Ogre for). If you build Universal binary, make sure the SDK path in ''build locations'' is a universal one (for instance /Developer/SDKs/MacOSX10.4u.sdk. This template should set it to universal by default.). * In __linking__, disable ''ZeroLink'' * In __language__, remove the file in ''Prefix Header'' and uncheck ''Precompile prefix header'' * In __search paths__, add the path to includes provided in Ogre dependencies (double-click on ''header search paths'', drag and drop the ''OgreDependencies-1.4.5/include'' folder there) ** __Note:__ Be sure to leave the "Recursive" check box unchecked, otherwise you may experience compiler errors. (ex: [http://www.ogre3d.org/phpBB2/viewtopic.php?p=279172#279172)] Existing projects will try to include ''Ogre.h'' and not <Ogre/Ogre.h> like frameworks usually require, so you may want to set up an additional header search path pointing inside your Ogre framework headers directory. If you want to use the samples or tutorials you will also need to copy example application header files from /ogre-1.4.5/Samples/Common/include/ You will now need a copy files build step in your target: * Right-click on your target * select Add > New Build Phase > New Copy File Build Phase * In the window that pops up, select ''Frameworks'' in the ''destination'' field, don't change any other settings. * Now expand your target in the tree view and you should see the new step you just added as a child of your target, by befault named something like ''Copy Files''. * Drag and drop all Ogre-related frameworks (including those from Ogre dependencies) inside the new build step you just created. * Warning, files you add to the project from now on will tend to add themselves to the copy files build step, make sure only frameworks find their way there. You are now ready to build and run! Once you're done, put a copy of your project in ~/Library/Application Support/Developer/Shared/Xcode/Project Templates/Application/, so next time you can just select __New project__ and choose this one from the template list (in older versions of OSX/Xcode, the templates directoy was at ~/Library/Application Support/Apple/Developer Tools/Project Templates) --- {INCLUDE(page="Setting Up An Application - First Application")}{INCLUDE}
Search by Tags
Search Wiki by Freetags
Latest Changes
IDE Eclipse
FMOD SoundManager
HDRlib
Building Ogre V2 with CMake
Ogre 2.1 FAQ
Minimal Ogre Collision
Artifex Terra
OpenMB
Advanced Mogre Framework
MogreSocks
...more
Search
Find
Advanced
Search Help
Online Users
147 online users