%prevogre%
Table of contents
Introduction
This is a brief, but detailed guide to use the OGRE SDK and the OGRE SDK AppWizard.
Remember: You don't need anything but Visual C++, the OGRE SDK and the AppWizard.
If you are using Visual Studio C++ Express Edition, see Installing An SDK - Shoggoth.
And you don't need to configure any project options. The wizard takes care of that.
If you run into problems using the wizard, please visit Ogre AppWizard on Google.code or the Ogre AppWizards Forum
Get It
Get the OGRE SDK for your compiler : Here
Get the OGRE SDK AppWizard for your compiler : Here
Make sure that the AppWizard matches your version of the OGRE SDK!
Install It
OGRE SDK
Very important!
Do not install this into a directory name with spaces in it, like "My Documents" or the like. You are only asking for trouble.
Choose a sensible no-spaces-in-it name, like C:\OgreSDK.
Install the OGRE SDK.
After installation, we are checking that everything is alright. We want the OGRE_HOME environment variable present, and we want it to point to where the OgreSDK is installed.
It happens by default, but we are checking anyway.
Right-Click the "My Computer" icon, go to the Advanced tab and click on the Environment Variables button.
You should see an OGRE_HOME environment variable pointing to your newly installed OGRE SDK.
OGRE AppWizard
OK. Now unzip the OGRE AppWizard to somewhere safe.
Windows 95/98/2000/Me/XP
Jump into the folder, and find the installation script:
Double-click on it.
Hopefully it is successful:
Forget about this directory! You don't need to see it again, nor use it.
Just leave it where it is, alright?
You will create new projects from Visual Studio, not from here.
Windows Vista / Windows Seven
Under Vista, you'll need to run a Command Prompt as administrator.
You can do this by going to Start Menu/All Programs/Accessories, then right-clicking on Command Prompt and selecting Run as administrator.
Once the console windows open, navigate to the folder where the script is located, then type its name (eg.: VC8_setup), followed by Enter.
Once the confirmation window has popped, the setup should be finished. Leave the files where they are.
Use it
Now, it is time to fire up Visual Studio.
Create a New Project
Create a new project:
Locate the OGRE SDK Application Icon, and don't forget to give your project a name and a place to stay!
Again, you are advised to choose a no-spaces-in-it-path.
Follow the Wizard
Click OK and watch the first page of the OGRE SDK Application Wizard:
Go to the next page - make sure that the post-build copy is checked:
(If you are using the source, make sure the location is set to "'OGRE_SRC' environment variable" and that that environment variable is defined.)
Click on "Finish" - and watch your new project:
Build your Project
Now, open the main source file of the project (Test1.cpp in our case) and remove (or comment) the "SET_TERM_HANDLER" line (should be line 39). This line isn't needed anymore.
You are now ready to build your project.
Build your project:
Watch the output window for success:
Notice that the exe is copied to the OgreSDK/bin/debug directory.
Run it
Go to your OgreSDK/bin/debug directory and find your creation:
Run it goddamnit!
FAQ
Upon executing, I receive the following error
If you run into problems running this, look at this guide:
Visual Studio Debugging Settings - Shoggoth
OGRE EXCEPTION(7:InternalErrorException):Could not load dynamic libary .\Plugin_PCZSceneManager.dll. System Error: The specified module could not be found.
in DynLib::load at ..\src\OgreDynLib.cpp (line 80)
Try deleting the following two entries from the Plugins.cfg file:
PCZSceneManager.dll
OctreeZone.dll
The setup doesn't run when I double-click the '.js' setup file.
try adding this to the js extension under run. (In 'Folder Options' in File Explorer.)
C:\WINDOWS\System32\WScript.exe "%1" %*
(If this don't work you must specify the target script language with the flag //E:jscript like
C:\WINDOWS\System32\wscript.exe //E:jscript "%1" %* )
or from the run box
C:\WINDOWS\System32\WScript.exe locationofsetupjs
(If this don't work you must specify the target script language with the flag //E:jscript like
C:\WINDOWS\System32\WScript.exe //E:jscript locationofsetupjs )
Note: If WScript fails, try using CScript)