OGRE3D portingIOS4.2 The tutorial is the end of this Article. Suppose you have installedIOS4.2 SDK, which must be downloaded firstOGRESource code package of 1.7.2OgreSource package of _src_v1-7-2.tar.bz2 and iphone dependent LibraryOgre iOSDependencies Source. dmg, releasedOGRE1.7.2 source code package/Ogre_ Src_v1-7-2 directory, and then release the source code package of the dependent library/Ogre_ Src_v1-7-2/iPhoneDependencies directory, and finally download and install the CMAKE installation package, so far, the preparation is complete.
Open cmakelists.txt under/ogre_src_v1-7-2, and
- "com.yourcompany.\${PRODUCT_NAME:rfc1034identifier}"
Change to the string corresponding to your device and save the file.
Open a terminal window and enter the following commands in sequence:
- cd /ogre_src_v1-7-2
- mkdir build
- cd build
- cmake -D OGRE_BUILD_PLATFORM_IPHONE=1 -G Xcode ..
- ../SDK/iPhone/fix_linker_paths.sh
- xcodebuild -configuration Debug-iphoneos
After about 20 minutes, the compilation was successful!
Connect your iPhone, iPod Touch, or iPad to your computer. Double-click it.
- /ogre_src_v1-7-2/build /OGRE.xcodeproj
Project files.
Select "Run"> "Run" from the menu. The xcode integrated development environment will install and Run the compiled result from the command line on the device.
If the iOS version of your device is lower than 4.2, a message is prompted and the device refuses to run.
Then you can find the/ogre_src_v1-7-2/build/bin/Debug/SampleBrowser file, right-click, show Package content
Double-click info. plist and change MinimumOSVersion 4.2 to a lower version, such as 4.0. Save the file.
Select Run> Run from the xcode integrated development environment menu. The OGRE demo will Run on your device.
Summary:OGRE3D portingIOS4.2 The content of the tutorial is complete. I hope this article will help you!