Welcome to a place with no windows or door. Freedom...

Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Monday, February 22, 2010

How to install ogre 1.7, cegui 0.7.1, ode 0.11.1 on Ubuntu Karmic

Table of content
  1. Installing Compiler And Configuration Tools
  2. Ogre Dependencies
  3. Ogre Optional Packages
  4. Install Ogre
  5. Cegui Dependencies
  6. Cegui Optional Packages
  7. Installing Silly
  8. Install Cegui
  9. Installing Celayereditor
  10. Installing Ceimageeditor
  11. Installing Ode
  12. Using ogre, cegui, ode with code::blocks
  13. Uninstalling Compiler And Configuration Tools
  14. Uninstalling Ogre Dependencies
  15. Uninstalling Ogre Optional Packages
  16. Uninstalling Ogre
  17. Uninstalling Cegui dependencies
  18. Uninstalling Cegui Optional Packages
  19. Uninstalling Silly
  20. Uninstalling Cegui
  21. Uninstalling Celayouteditor
  22. Uninstalling Ceimageseteditor
  23. Uninstalling Ode
  24. Credits
1. Installing Compiler And Configuration Tools

sudo apt-get install build-essential automake libtool cmake-gui

2. Ogre Dependencies

sudo apt-get install libois-dev libfreeimage-dev libfreetype6-dev libzzip-dev libxaw7-dev libglew1.5-dev libxrandr-dev

3. Ogre Optional Packages

sudo apt-get install doxygen graphviz nvidia-cg-toolkit libboost-thread-dev libcppunit-dev

4. Install Ogre
You can get the latest source from here.Now create two folders. One will hold the source codes. The other one will hold the configured source code of Ogrea, ready to be compiled. I have it set up like this:
/home/username/dev
/home/username/dev/ogre_build
Extract the source to the "dev" folder. You should have:
/home/username/dev/ogre
Now open a terminal and run cmake-gui.
where is the source code: /home/username/dev/ogre
where to build the binaries: /home/username/dev/ogre_build
Once you have selected the folder click configure. In the new window that appears leave the setting at default. It should look like this:
unix makefiles
use default native compilers
Once you are done with that window just click finish. Now check this options to make fallowing the tutorials easier.
ogre_install_samples
ogre_install_samples_source
Once you're done click configure again then on generate. Now you can close the window. Go back to the terminal and enter this:
cd /home/username/dev/ogre_build
make
sudo make install
sudo ldconfig
Note: you can use make -j 4 on duo-core processor to speed up the process.
Note: if you installed doxygen and graphviz you can make doc to generate html documentation.

5. Cegui Dependencies

sudo apt-get install libpcre++-dev libwxgtk2.8-dev libjpeg62-dev

6. Cegui Optional Packages

sudo apt-get install doxygen graphviz

7. Installing Silly
Dependence needed by the editors. Get the latest source from here. Extract it to "dev" folder so it look like this:
/home/username/dev/silly-0.1.0
Now open a terminal and do:
cd /home/username/dev/silly-0.1.0
./configure
make
sudo make install

8. Install Cegui
Get the latest source here. Extract it to the "dev" folder so it look like this:
/home/username/dev/cgui-0.7.1
Now open a terminal and do:
cd /home/username/dev/cgui-0.7.1
./bootstrap
./configure
make
sudo make install
sudo ldconfig
note: if you installed doxygen and graphviz you can make html to generate html documentation.

9. Installing Celayereditor
Get the latest source from here. Extract it to the "dev" folder so it look like this:
/home/username/dev/celayouteditor-0.7.1
Now open a terminal and do:
cd /home/username/dev/celayouteditor-0.7.1
./configure
make
sudo make install
Now you have to select the datafiles folder from the source folder when the editor start for the first time.
/home/username/dev/celayouteditor-0.7.1/datafiles
Now you will need to copy to file to datafiles/fonts folder from the datafiles/font folder of cegui source. you need to copy this two file:
/home/username/dev/cegui-0.7.1/datafiles/dejavusans.ttf
/home/kamil/dev/cegui-0.7.1/datafiles/dejavusans-10.font
to
/home/username/dev/celayouteditor-0.7.1/datafiles/fonts

10. Installing Ceimageeditor
Get the latest source from here. Extract it to "dev" folder so it look like this:
/home/username/dev/ceimageseteditor-0.7.1
Now open a terminal and do:
cd /home/username/dev/ceimageseteditor-0.7.1
./configure
make
sudo make install

11. Installing Ode
Get the latest source from here. Extract it to "dev" folder so it look like this:
/home/username/dev/ode-0.11.1
Now open a terminal and go to that source folder like so:
cd /home/username/dev/ode-0.11.1
./configure
make
sudo make install

12. Using ogre, cegui, ode with code::blocks
To install code::blocks, open a terminal and run:
sudo apt-get install codeblocks
Start code::blocks and make a new ogre project. Now go to Project > Build options and make sure you select the you project name. In Compiler setting > Other options you should have something like this:
`pkg-config --cflags OGRE`
`pkg-config --cflags CEGUI`
`pkg-config --cflags OIS`
`pkg-config --cflags ode`
`pkg-config --cflags CEGUI-OGRE`
-fexceptions
In linker settings > link libraries you should have:
GL
In linker settings > Other linker options you should have:
`pkg-config --libs OGRE`
`pkg-config --libs CEGUI`
`pkg-config --libs OIS`
`pkg-config --libs ode`
`pkg-config --libs CEGUI-OGRE`
In Search directories > Compiler you should have:
/usr/local/share/OGRE/samples/Common/include
/usr/local/include/CEGUI/RendererModules/Ogre
Now you should be all set to start the tutorials.

13. Uninstalling Compiler And Configuration Tools

sudo apt-get remove build-essential automake libtool cmake-gui

14. Uninstalling Ogre Dependencies

sudo apt-get remove libois-dev libfreeimage-dev libfreetype6-dev libzzip-dev libxaw7-dev libglew1.5-dev libxrandr-dev

15. Uninstalling Ogre Optional Packages

sudo apt-get remove doxygen graphviz nvidia-cg-toolkit libboost-thread-dev libcppunit-dev

16. Uninstalling Ogre
There isn't a way to uninstall ogre with make other then manually remove the file.At lest not that I found anyway.

17. Uninstalling Cegui dependencies

sudo apt-get remove libpcre++-dev libwxgtk2.8-dev libjpeg62-dev

18. Uninstalling Cegui Optional Packages

sudo apt-get remove doxygen graphviz

19. Uninstalling Silly
Open a terminal and run:
cd /home/username/dev/SILLY-0.1.0
sudo make uninstall

20. Uninstalling Cegui
Open a terminal and run:
cd /home/username/dev/CEGUI-0.7.1
sudo make uninstall

21. Uninstalling Celayouteditor
Open a terminal and run:
cd /home/username/dev/CELayoutEditor-0.7.1
sudo make uninstall

22. Uninstalling Ceimageseteditor
Open a terminal and run:
cd /home/username/dev/CEImagesetEditor-0.7.1
sudo make uninstall

23. Uninstalling Ode
open a terminal and run:
cd /home/username/dev/ode-0.11.1
sudo make uninstall

24. Credits

Thanks to caldercoalson for his tutorial
http://ubuntuforums.org/showthread.php?t=1144592

A blog with a Ogre tutorial
http://xiolog.blogspot.com/2010/01/compilation-and-installation-of-ogre.html

Another Ogre tutorial
http://www.cipherhive.org/?page_id=34
Other resource
http://www.ogre3d.org/tikiwiki/Prerequisites?tikiversion=Linux

Tuesday, May 27, 2008

Fixed Freezing problem

I think I've fix my freezing problem in ubuntu 8.04. Just edit the file:

gksudo gedit /boot/grub/menu.lst

Then paste the three following commends at the end of the line starting with kernel:

highres=off nohz=off irqpoll

so it will look like this:

title Ubuntu 8.04, kernel 2.6.24-17-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-17-generic root=UUID=d85c8efa-bfd7-4d9b-8dc9-6acd26b7adba ro quiet splash highres=off nohz=off irqpoll
initrd /boot/initrd.img-2.6.24-17-generic
quiet

Sunday, May 4, 2008

Slight complications

Again with the aid of my assistant, I'll (we'll) write another post.

After searching for a way to have Hardy Heron be lighter, I found one of two ways to do it. One way is to install normally and try to cut away as much as you can, within the limitations of the package dependencies (The package that everything depends on is Ubuntu-desktop). The other way is to install a command line system and build it up from there.
I tried the first way a couple of times, but got frustrated with it because I couldn't remove everything that I wanted to, due to the dependencies. The second way proved to be more challenging, because my limited knowledge prevented me from connecting to a secure wireless network. Although it's not impossible, it's quite challenging; instead I connected myself to the Internet through the Ethernet port of my LG P1 laptop.
First, I acquired the IP address from the router with sudo dhclient [interface], where [interface] is the name of your ethernet interface. To find your ethernet interface, use lshw -C network to see all of your interfaces. After you have acquired your IP address, use sudo ifconfig [interface] up to enable your ethernet interface.

From there, you use sudo apt -get install xorg to install the x server, which handles the graphical display. Next, you can install the login manager (optional), which is the gdm package for GNOME. Then install a file manager and window manager. I tried to use gnome-core, which already has both file and window manager. This is the barebone installation, with only the bare necessities. Not the lightest, but I find it comfortable.

After struggling to have everything working again as normal, I have given up and installed the heavier version again. Because my laptop restarts on Hardy for some reason, I decided to install 7.10 (Gutsy).

One thing that never worked from the beginning, in any distribution of Ubuntu, are my speakers. But my sounds work through headphones. To fix that, I created /etc/modprobe.d/snd-hda-intel and inside I put options snd-hda-intel model=lg. After restarting, my speakers worked.