# Juhised kõneleva pea prototüübi kompileerimiseks ja käivitamiseks
# Mõeldud Debiani-põhiste Linuxite jaoks (Debian Wheezy, Ubuntu 14.04)


# Sõltuvuste paigaldamine

apt-get install build-essential automake libtool cmake cmake-gui mercurial libfreetype6-dev libfreeimage-dev libzzip-dev libxrandr-dev libxaw7-dev freeglut3-dev libgl1-mesa-dev libglu1-mesa-dev libois-dev libboost-thread-dev libexpat1 libexpat1-dev libvorbis-dev libopenal-dev pkg-config

# 64bit süsteemis
dpkg --add-architecture i386
apt-get update
apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386

# kataloog, kus asub tonu kõneleva pea lähtekood
cd ~/av

# ogre õige versiooni allalaadimine
hg clone http://bitbucket.org/sinbad/ogre/ -u v1-9
cd ogre
cmake-gui

 * Where is the source code: ~/av/ogre
 * Where to build the binaries: ~/av/ogre/build

 -- vajutada Configure
 * Tulemusse tekivad punase taustavärviga read

 * Specify the generator for this project: Unix Makefiles

 -- vajutada Configure
 * Tulemuses ei ole enam punase taustavärviga ridu

 -- vajutada Generate

cd build
make
# installs to:
# /usr/local/share/
# /usr/local/lib/OGRE
# /usr/local/lib/OGRE/cmake
# /usr/local/include/
sudo make install

cd ~/av
# cegui õige versiooni allalaadimine
hg clone https://bitbucket.org/cegui/cegui -u v0-8-4
cd cegui
cmake-gui
 * Where is the source code: ~/av/cegui
 * Where to build the binaries: ~/av/cegui/build

 -- vajutada Configure
 * Tulemusse tekivad punase taustavärviga read

 * Specify the generator for this project: Unix Makefiles

 -- vajutada Configure
 * Tulemuses ei ole enam punase taustavärviga ridu

 -- vajutada Generate

cd build
make
sudo make install

cd ~/av

tar zxf tonu.tgz
cd tonu-src
cd OgreOggSound-v1.26
cmake-gui
 * Where is the source code: ~/av/tonu-src/OgreOggSound-v1.26
 * Where to build the binaries: ~/av/tonu-src/OgreOggSound-v1.26/build

 -- vajutada Configure
 * Tulemusse tekivad punase taustavärviga read

 * Specify the generator for this project: Unix Makefiles

 -- vajutada Configure
 * Tulemuses ei ole enam punase taustavärviga ridu

 -- vajutada Generate

cd build
make
sudo make install
# /usr/local/include/OgreOggSound
# /usr/local/lib/libOgreOggSound.so

sudo cp /usr/local/lib/libOgreOggSound.so /usr/local/lib/OGRE/OgreOggSound.so.1.9.0
sudo ln -s /usr/local/lib/OGRE/OgreOggSound.so.1.9.0 /usr/local/lib/OGRE/OgreOggSound.so


cd ~/av/tonu-src/Tonu
sudo cp cmake_helpers/*.* /usr/local/lib/OGRE/cmake/
cmake-gui
 * Where is the source code: ~/av/tonu-src/Tonu
 * Where to build the binaries: ~/av/tonu-src/Tonu/build

 -- vajutada Configure
 * Tulemusse tekivad punase taustavärviga read

 * Specify the generator for this project: Unix Makefiles

 -- vajutada Configure
 * Tulemuses ei ole enam punase taustavärviga ridu

 -- vajutada Generate

cd build
make
make install

# rakenduse käivitamine
cd dist/bin
./TonuApp


# nvidia kaartide jaoks
https://wiki.debian.org/NvidiaGraphicsDrivers