History: Setting Up An Application - Mac OSX
Preview of version: 27
|
Introduction
When it comes to creating and compiling your own applications or the Ogre Tutorial Framework on OSX, you have the choice of using CMake or XCode templates to generate your initial XCode project. If you are planning on developing using XCode, the XCode templates are a quick way to get up and running. A full description of the steps for using the XCode templates can be found here: http://www.ogre3d.org/tikiwiki/tiki-index.php?page_ref_id=2019If you would like to use CMake to create your projects, keep reading. Step 01.00 Create an OGRE application using Xcode-3.2.x and the OGRE Tutorial Framework.
Step 01.01: Create a project folder.
Extract the contents of the TutorialFramework.rar file to a new project folder, e.g. OGRETutorialFramework. Step 01.02: Create a CMakeLists.txt file with the following contents:
CMakeLists.txt Copy to clipboard
Step 01.03: Modify the template CMakeLists.txt as follows:
Specify the OGRE project nameCopy to clipboard
Specify the OGRE source installation Copy to clipboard
Step 01.04: Use CMake to create the Xcode project.
Run CMake using the command line configuration utility. You may need to set the OGRE_HOME environment variable first if you get the Could not locate OGRE errorCopy to clipboard
Update the CMake settings Copy to clipboard
Press c to configure, and then press q to quit. Step 01.05: Use Xcode to build the OGRE project.
Launch XCode using the newly generated OGRETutorialFramework.xcodeproj file.Edit the project settings, by clicking on menu option Project > Project Settings and modifying the following entries: Copy to clipboard
Click on menu option Build > Build to build the project. This will build the OGRETutorialFramework application executable in the OGRETutorialFramework/build/RelWithDebInfo folder. Step 01.06: Copy the OGRE resource and plugin configuration files to the application folder.
Copy the resouces.cfg and plugins.cfg files to the your OGRE application folder, which in this case, would be OGRETutorialFramework/build/RelWithDebInforesources.cfg Copy to clipboard
plugins.cfg Copy to clipboard
Ensure that you update the location of the plugins in the plugin.cfg file. Step 01.07: Run the OGRE application.
Type the following commands into a terminal to run the applicationCopy to clipboard
Step 02.00: Resolve issues that you may encounter when attempting to run the OGRE application.
Issue 01: Duplicate libjpeg.dylib in you $DYLD_LIBRARY_PATH.
If you get issues relating to duplicate libjpeg.dylib installed in /usr/local/lib, then make sure that you remove any references to that path in the $DYLD_LIBRARY_PATH environment variable, defined in your .profile.This is probably because OGRE links to libJPEG.dylib, plus case-preserving but case-insensitive makes it see them as the same library (when DYLD env vars are messed with). Copy to clipboard
Instead define the $DYLD_FALLBACK_LIBRARY_PATH environment variable Copy to clipboard
Issue 02: OGRE EXCEPTION(6:FileNotFoundException): 'resources.cfg' file not found!
Ensure that the resouces.cfg file generated from the ORGRE build process, located in build/bin is put in the same location as your application executable. Issue 03: OpenGL rendering subsystem and OGRE plugins not getting loaded.
Ensure that the plugins.cfg file is located in the same folder as your application executable. Also ensure that you specify the location of the OGRE plugins, in the pluging.cfg file as follows: Issue 04: Window doesn't seem to get focus.
If the application window is unable to get focus, the parameters in the configuration dialog cannot be changed, and the application will not receive mouse and keyboard input events. Add the following line to the CMakeList.txt file to create a bundle for the application:Copy to clipboard
|