Here's a quick guide I wrote up for installing OGRE on Ubuntu. I hope it's useful.
1 Installing OGRE
1.0 Install Dependencies
Execute the following in a terminal window:
Code:
sudo apt-get install build-essential autoconf libtool libdevil-dev libfreeimage-dev libfreetype6-dev libglew1.5-dev libxaw7-dev libxrandr-dev libxt-dev libxxf86vm-dev libzzip-dev
In case you're curious, the dependencies are as follows:
Bootstrap: autoconf libtool
Make: build-essential
Ogre: libdevil-dev libfreeimage-dev libfreetype6-dev libglew1.5-dev libxaw7-dev libxrandr-dev libxt-dev libxxf86vm-dev libzzip-dev
1.1 Install OIS
Go to OIS's download's page: http://sourceforge.net/project/showf...roup_id=149835 and download the latest release. Decompress the file, open a terminal window, and cd to the decompressed folder. Then, in a rather particular order, type:
Code:
./bootstrap
./configure
make
sudo make install
1.2 Obtain the OGRE Source
Download the "Ogre x.x.x Source for Linux / OSX" from http://www.ogre3d.org/download/source where x.x.x is the current distribution number.
1.3 Create a Permanent Location
Unlike most source distributions, you can't simply build, install and dispose. The OGRE directory will need to be situated in a place you won't mind having it forever. Personally, I have everything in ~/.ogre, but you can choose your own. If you pick something else, just remember to substitute the location of your permanent folder whenever I say ~/.ogre.
1.4 Unpack and Relocate
Unpack the OGRE source using whatever means you choose, and move it to your undislosed permanent location, (~/.ogre).
1.5 Configure
Open a terminal window and cd to the OGRE source directory, (~/.ogre/ogre). Now execute the following in the terminal:
Now enter and execute the following:
If configuration fails after telling you to get nVidia's Cg library, then see the next step.
1.6 Install nVidia Cg libraries
Note: Do not perform this step if configuration runs successfully.
Download the "Linux x86" (32-bit) or Linux x86-64" (64-bit) tar files from http://developer.nvidia.com/object/c...html#downloads . Decompress the file to wherever you want, and copy all the files to their appropriate folders on your system.
After placing the files, you need to reconfigure Ogre:
1.7 Make
Once configuration has finished, run the following:
Note that this can take a REALLY long time. On my dual core 2Ghz it took nearly an hour. If you want to speed this up, you can run make in multithreaded mode using the following command:
where x is twice the number of cores your computer has.
WARNING: Do not execute 'make -j', this will run make with an unlimited number of concurrent threads and will overload and freeze your OS within a couple seconds. This is called a makebomb.
1.8 Install
Now that everything has (hopefully) been built correctly, you're finally ready to install OGRE. Cross your fingers and type:
1.9 Update Dynamic Linker
Now that you've installed everything in its proper place, you need to tell the linker to update it's chaches. Run:
2 Installing CEGUI [OPTIONAL]
2.0 Install Dependencies
Open a terminal window and type:
Code:
sudo apt-get install libpcre++-dev libpng12-dev libjpeg62-dev libmng-dev libwxgtk2.8-dev
Again, if you're curious, here're the dependencies:
CEGUI: libpcre++-dev
SILLY: libpng12-dev libjpeg62-dev libmng-dev
Layout Editor: libwxgtk2.8-dev
Imageset Editor:
2.1 Download and Relocate
Download the current source release of CEGUI, SILLY Image Loading Library, CEGUI Layout Editor, and CEGUI Imageset Editor. Unzip all the packages and move CEGUI-x.x.x, CEImagesetEditor-x.x.x and CELayoutEditor-x.x.x to your permanent location, (~/.ogre).
2.2 Install SILLY
Open a terminal window and cd to the SILLY directory. No execute the following commands, one after another.
Code:
./configure
make
sudo make install
You are now free to dispose of the SILLY source directory.
2.3 Install CEGUI
Now cd to the CEGUI directory, (~/.ogre/CEGUI-x.x.x) and run the following commands:
Code:
./bootstrap
./configure
make
sudo make install
sudo ldconfig
This build also takes a while, so if you want to use multithreading you can replace 'make' with 'make -j x' like last time.
2.4 Install CEGUI Layout Editor
Open a terminal window, cd to the CEGUI Layout Editor directory, (~/.ogre/CELayoutEditor-x.x.x), and enter:
Code:
./configure
make
sudo make install
To run CEGUI Layout Editor, use 'CELayoutEditor'. You can make a launcher for it or add it to your main menu at your leisure.
The first time you start it, CELE requires you to give it the location of the default datafiles.
2.5 Install CEGUI Imageset Editor
To be done...
3 Installing QuickGUI [OPTIONAL]
3.0 Install Dependencies
Open a terminal window and type:
Code:
sudo apt-get install cmake
This is pretty self explanatory and is only for building the library. QuickGUI's only other dependency is Ogre.
3.1 Download and Relocate
Obtain QuickGUI from the latest release thread here: http://www.ogre3d.org/addonforums/viewforum.php?f=13 . Extract the source and move it to your Ogre folder, (~/.ogre).
3.2 Configure
You may either use Code::Blocks or CMake to build the QuickGUI library. If you are using Code::Blocks, the process is rather self-explanatory.
Note: Code::Blocks only builds the library, but does not install it. You will have to manually move the dynamic library file (~/.ogre/QuickGUI/bin/libQuickGUI.so) to /usr/local/lib or wherever else you want to put it.
If, however, you decided to use CMake, cd to the QuickGUI source directory, (~/.ogre/QuickGUI) and type:
Note: if you want to alter the default build options, you can type 'ccmake .' rather than 'cmake .'
3.3 Build and Install
Now that CMake has generated the Makefiles for you, you can simply run:
Code:
make
sudo make install
sudo ldconfig
4 Installing Bullet
4.0 Install Dependencies
Use apt-get to install dependencies:
Code:
sudo apt-get install freeglut3-dev
4.1 Obtain Source
Download the Bullet source code from here: http://code.google.com/p/bullet/downloads/list . You don't need to keep the Bullet source, so feel free to install it right from your desktop.
4.2 Make
Open a terminal to the Bullet source directory and type:
Code:
./autogen.sh
./configure
make -j 4
4.3 Install
As of the time of this writing, the install-sh script included with Bullet has incompatible line endings. Download another version from here: http://www.fastcgi.com/devkit/install-sh and replace the one in the Bullet folder. Then you can run:
Code:
sudo make install
sudo ldconfig
5 Creating an OGRE Project
Note: I will be using Code::Blocks for these instructions, although they will probably be easily adaptable to other IDEs as well.
5.1 Create an Empty project
Open Code::Blocks and select File->New->Project. Choose an Empty Project, (the Ogre Project is broken on Linux), click Go, and choose a location. Leave all the options on the next page default and click Finish.
5.2 Add Linked Libraries
In Project->Build Options select the "Linker Settings" tab and add "OgreMain" and "GL" to the "Link Libraries" box.
Note: Also add "OIS" for OIS, "CEGUI" for CEGUI, "QuickGUI" for QuickGUI depending on which of these additional libraries you will be using. If you are using Bullet, it is absolutely essential that you include "bulletmath", "bulletcollision", and "bulletdynamics" in exactly that order.
5.3 Setting up your plugins.cfg File
Create a file named "plugins.cfg" in the directory your project's executable will reside in. At the very minimum, this should include the following:
Code:
PluginFolder=/usr/local/lib/OGRE
Plugin=RenderSystem_GL.so
Plugin=Plugin_OctreeSceneManager.so
5.4 Using the Example Application [OPTIONAL]
If you are doing the tutorials or otherwise basing your project on the Example Application framework included with the OGRE source, you must copy the Samples/Media, and the Samples/Common/include/* from your OGRE source directory, (~/.ogre/ogre), to your project directory and your project include directory respectively. Finally, you should also copy Samples/Common/bin/resources.cfg file to your project's build directory and replace all '../../'s with the appropriate path to your media directory. Also remember to add
Code:
#include "ExampleApplication.h"
to your main Ogre file, and you should hopefully be good to go.
Once you have all this done, you should finally be able to follow the generic instructions on the Wiki. I hope somebody finds these instructions helpful. The whole installation process was hellishly time consuming and frustrating for me, and I hope this makes that slightly better.
-Calder
Bookmarks