[[TracNav(TracNav/TOC_install)]] = Gentoo Linux = ''Last checked: 01. Dec. 2007 by [wiki:NicolasSchlumberger nico] with 2007.0 profile on amd64''[[br]] ''Last checked: 02. Nov. 2007 by [wiki:NicolasSchlumberger nico] with 2007.0 profile on x86''[[br]] This Tutorial assumes that you are using x86. If you are using amd64 just substitute the keyword. === Prerequisites === Orxonox uses Ogre with CEGUI for rendering, OIS for input handling, eNet for network support Boost for threading and cMake as build-system. You will have to install these packages. Every needed package is in portage. Add USE-Flags: {{{ # echo "dev-games/cegui devil expat" >> /etc/portage/package.use # echo "dev-games/ogre cegui devil lua threads" >> /etc/portage/package.use }}} Some packages are unstable, for portage to use them do: {{{ # echo "dev-games/ogre-1.4.5 ~x86" >> /etc/portage/package.keywords # echo "dev-games/ois-1.0 ~x86" >> /etc/portage/package.keywords }}} Then, emerge the packages. CEGUI and Boost are dependencies of Ogre, so they will not be installed explicitly. TCL is also mandatory. {{{ # emerge cmake ogre ois tcl # CFLAGS="-fPIC" emerge enet }}} eNet needs to be compiled with -fPIC to be included as shared library ([wiki:NicolasSchlumberger nico]: Dec '07). === Getting the Source Code === If you have not done so already, you need to install Subversion on your system. To do this, make sure that you have '''ssl''' included in your '''make.conf''' file:, which is normally located at '''/etc/make.conf''': {{{ ... USE="..., ssl, ..." ... }}} Now emerge subversion: {{{ # emerge subversion }}} Now get a copy of the code by checking out the trunk via anonymous subversion login. This will download the latest stable version to the directory ''trunk''. If you have trouble using SVN, go [wiki:SVN here]. {{{ $ svn co http://svn.orxonox.net/orxonox/trunk trunk }}} You won't be able to contribute your own code (check in) with the anonymous subversion repository. You have to ask us for a username/password combination. If you already have an account, check the code out like this: {{{ $ svn co https://svn.orxonox.net/orxonox/trunk trunk }}} You will then be asked for the username and password, that you got from us. Furthermore, you will need to check out the media repository. This repository contains all the graphics, fonts and sounds for Orxonox. To check it out, do: {{{ $ svn co https://svn.orxonox.net/data/Media media }}} Now make sure, you have set the correct path to you media directory === Compiling === Just cd to the trunk directory, then execute configure and make: {{{ $ cd orxonox-trunk $ cmake . ... $ make ... $ ./run }}} === Development with KDevelop === If you would like to use KDevelop for coding, see [wiki:CMake#UsingCMakewithKDevelop this] page for further information. ---- [[OutdatedPage]] 1. Get the ebuild: source:/trunk/scripts/gentoo#HEAD (download newest ebuild) 1. Change to root user {{{ wraith root # su - }}} 1. Copy the ebuild to /usr/portage/games-action/orxonox (and create new directory) 1. {{{ wraith root # cd /usr/portage/games/action/orxonox wraith root # ebuild orxonox-*.ebuild digest wraith root # emerge orxonox }}} From now on you should be able to play Orxonox, and if you have subversion installed and a login, you will also be able to develop. === Installing the Libraries === Install the following libraries: * SDL main, media-libs/libsdl, web: http://www.libsdl.org/ * SDL_image, media-libs/sdl-image, web: http://www.libsdl.org/SDL_image * SDL_(true type fonts), media-libs/sdl-ttf, web: http://www.libsdl.org/SDL_ttf * SDL_net, media-libs/sdl-net, web http://www.libsdl.org/SDL_net * Glew library * OpenAl library * libvorbis Here are the commands to enter: {{{ wraith root # emerge media-libs/libsdl ... wraith root # emerge media-libs/sdl-image ... wraith root # emerge media-libs/sdl-ttf ... wraith root # emerge media-libs/sdl-net ... wraith root # emerge glew ... wraith root # emerge openal ... wraith root # emerge libvorbis ... wraith root # emerge qt }}} Or one big one-liner: {{{ wraith root # emerge libsdl sdl-image sdl-ttf sdl-net glew openal libvorbis qt }}} ==== LUA Scripting language ==== Lua is used for scripting in Orxonox, and it will be pulled in while comfiguring. There is also the possibility to use system wide lua installation (aka. emerged package). At the time of this writing, Orxonox is only compatible with lua-5.0.x. Any other version might cause some undesired effects like not being able to compile. [12/2/2007] Gentoo is now ready to compile and then run Orxonox.[[br]] === Getting the Source Code === First of all you have to install subversion on your system: Make sure, that you have '''ssl''' included in your ''make.conf'' file:[[br]] '''/etc/make.conf''' {{{ ... USE="..., ssl, ..." ... }}} now emerge subversion {{{ wraith user # emerge subversion }}} Check out the source via anonymous subversion login. This will download the whole project to the directory orxonox-dir. {{{ wraith user # svn co http://svn.orxonox.net/orxonox orxonox-dir }}} You won't be able to commit your own code (check in) with the anonymous subversion repository. You have to ask us for a username/password combination. If you already have an account, check it out like this: {{{ wraith user # svn co https://svn.orxonox.net/orxonox orxonox-dir }}} You will be asked for your username and password, that you got from us. === Compiling === Just change into the trunk directory, then execute configure and make.... {{{ wraith user # cd ./orxonox/trunk/ wraith user # ./autogen.sh wraith user # ./configure ... wraith user # make ... wraith user # cd src wraith user # ./orxonox }}} === Profiling === If you want to profile Orxonox (measure its performance) you will probably want to view the statistics in a special program like kprof. On Gentoo systems you can just emerge it: {{{ wraith root # emerge kprof }}} Orxonox runs much much slower with profiling enabled. {{{ wraith user # cd ./orxonox/trunk/ wraith user # ./configure --enable-profile ... wraith user # make ... wraith user # cd src wraith user # ./orxonox }}} Orxonox now runs very slow and writes its profiling stats to a file called gmon.out. Remember that _only_ the functionalities you use while profiling will be profiled (since the profile log is written while the program is been executed). [[br]] After you exit the Orxonox, you can parse the output file and then be able to open it in kprof: {{{ wraith user # gprof -b ./orxonox > text.out wraith user # kprof -f text.out }}} For more documentation see the [wiki:DevelopmentResources development resources].