\f0\b\fs36 \cf0 Instruction on how to build, install and use OSG on Mac OS X\
\pard\pardeftab720\sa200\ql\qnatural
\fs28 \cf0 Requirements\
\pard\pardeftab720\sa260\ql\qnatural
\f1\b0\fs26 \cf0 You must have Apple's Development tools installed. You also need the the X11 development package installed. (It comes with Apple's Development Tools but depending on version you may need to explicitly mark a check box to install them.) 3rd party package systems like Fink or DarwinPorts are not required.\
\pard\pardeftab720\sa200\ql\qnatural
\f0\b\fs28 \cf0 Instructions\
\pard\pardeftab720\sa200\ql\qnatural
\fs20 \cf0 Step 1 - Uninstall old Versions\
\pard\pardeftab720\sa260\ql\qnatural
\f1\b0\fs26 \cf0 If you have an old version of OSG previously, installed, you should probably remove it first. (This is true of all platforms and build systems, not just Xcode and OS X.)\
\pard\pardeftab720\sa200\ql\qnatural
\f0\b\fs20 \cf0 Step 2 - Find the Xcode projects\
\pard\pardeftab720\sa260\ql\qnatural
\f1\b0\fs26 \cf0 The Xcode projects are now part of the official OSG distribution so everything should be already laid out for you. Xcode 2.1+ projects have the .xcodeproj extension. Prior Xcode projects have the .xcode extension.\
\f1\b0\fs26 \cf0 Now use Xcode to build each of the projects. You may want to set the build style to Deployment depending on what you are doing. The OpenSceneGraph project gives you multiple targets to select from so you may build everything, or just pieces you want.\
The binaries will be written to the Xcode build subdirectory (following standard Xcode behavior).\
To "Install" the Frameworks, you may move the Frameworks to a standard location.\uc0\u8232 ~/Library/Frameworks (for a single user)\u8232 /Library/Frameworks (for system wide installation)\u8232 /Network/Library/Frameworks (for those who understand when this should be used)\u8232 Or you may place them inside your application bundle e.g.\u8232 YourApp.app/Contents/Frameworks\u8232 Simply drag and drop the frameworks to the desired location.\u8232 \u8232 Similarly, to "Install" the Plugins, move the .so files to\u8232 ~/Library/Application Support/OpenSceneGraph/PlugIns\u8232 /Library/Application Support/OpenSceneGraph/PlugIns\u8232 /Network/Library/Application Support/OpenSceneGraph/PlugIns\u8232 Or you may place the ones you need inside your application bundle e.g.\u8232 YourApp.app/Contents/PlugIns\
\pard\pardeftab720\sa200\ql\qnatural
\f0\b\fs20 \cf0 Step 4 - There's no Step 4\
\pard\pardeftab720\sa260\ql\qnatural
\f1\b0\fs26 \cf0 That's it! Just remember to link using -framework instead of -l, e.g. \uc0\u8232
\f3\fs24 \cf0 Also be aware that if using the 10.4 Universal SDK, you may have to explicitly set the Framework search paths (its an option/field in the build settings for your Target) due to the way Apple modifies the standard search paths when using an SDK.\
\f1\b0\fs26 \cf0 There is a serious bug that appears sometimes when you build OpenThreads/OSG from scratch. When you run the examples, they will crash on load. If you encounter this problem, the workaround seems to be to delete just the OpenThreads framework after everything is built. Then rebuild just the OpenThreads framework. Bug reports have been filed with Apple, but the root cause remains to be a mystery. (We have some guesses, but nothing substantial.) So far the problem has not materialized yet for Xcode 2.2, so the problem may finally be resolved.\
Currently frameworks, plugins, and executables that have non-standard dependencies such as osgTerrain are not built. There is a target called GDALdependentStuff which will build all the GDAL dependent stuff. You must have the GDAL framework installed for this to work. This target is not built by default so you must select it manually. \
By OS X conventions, resources (data files like images, models, fonts, etc) should be placed in your application bundles Contents/Resources directory. This behavior is not in the osg sources so we have patched the source to do so. You must apply our patch until osg accepts and includes this modification in the official source.\
Many examples require command line parameters. This makes double clicking useless. For those examples, you must run them on the command line. You may use Terminal instead of X11 if you wish.\uc0\u8232 Example:\u8232
\f1\fs26 \cf0 These values work under Xcode 2.2 with autovectorization and -O3 so in theory, there should be some leeway if you use smaller build options. However, we encountered some strangeness under Xcode 2.0/gcc 4.0 where the binaries were even larger, but using -Os. This did not happen under the OSG 0.9.9 release. But we're hopeful that under Xcode 1.5/gcc 3.3, these addresses will just work.\