Ubuntu scenery tools
Jump to navigation
Jump to search
Description
The following script allows you to install either Taxidraw and FlightGear Scenery Designer in a single directory of an Ubuntu 7.10 distro taking care of all dependencies.
Necessary packages are installed via the apt-get system, libraries not included in the repositories are downloaded and compiled on the fly.
Download
You can download the script here: File:Download and compile-fgsd.sh
Instructions
to run it, just save it in a directory called for example: ~/fg_tools then execute it (No need to be execute it as root).
Programs execution
Eventually you will get both taxidraw and fgfs in the folders:
~/fg_tools/install/TaxiDraw
~/fg_tools/install/fgsd
to use them just run the generated scripts:
sh ~/fg_tools/run_taxi.sh
or
sh ~/fg_tools/run_scenery.sh
The Script
#!/bin/bash #* Written by Francesco Angelo Brisa, started January 2008. # # Copyright (C) 2008 Francesco Angelo Brisa - http://brisa.homelinux.net # email: francesco@brisa.homelinux.net - fbrisa@yahoo.it # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. sudo apt-get install libglut3-dev libopenal-dev libalut-dev plib1.8.4-dev libalut0 libopenal0a libfltk1.1-dev libfltk1.1 cvs subversion cmake make build-essential automake zlib1g-dev zlib1g libjpeg62-dev libjpeg62 gawk libcurl4-openssl-dev curl libpng12-dev libpng12-0 libzzip-dev libzzip-0-13 libshp-dev libshp1 libgif4 libgif-dev libcgal-dev libcgal2 libwxbase2.6-dev libwxgtk2.6-0 libwxgtk2.6-dev libwxgtk2.6-0 libwxbase2.6-dev libwxbase2.6-0 COMPILE_BASE_DIR=. ####################################################### #cd into compile base directory cd "$COMPILE_BASE_DIR" #get absolute path CBD=$(pwd) if [ ! -d install ] then mkdir install fi INSTALL_DIR=$CBD/install ####################################################### # OpenSceneGraph ####################################################### INSTALL_DIR_OSG=$INSTALL_DIR/OpenSceneGraph cd "$CBD" svn co http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.2.0 OpenSceneGraph #svn checkout http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph cd OpenSceneGraph cmake -D CMAKE_BUILD_TYPE="Release" -D CMAKE_CXX_FLAGS="-O3" -D CMAKE_C_FLAGS="-O3" -D CMAKE_INSTALL_PREFIX:PATH="$INSTALL_DIR_OSG" . make if [ ! -d $INSTALL_DIR_OSG ] then mkdir -p "$INSTALL_DIR_OSG" fi make install cd - ####################################################### # SIMGEAR ####################################################### INSTALL_DIR_SIMGEAR=$INSTALL_DIR/simgear cd "$CBD" if [ ! -d "simgear" ] then mkdir "simgear" fi cd simgear cvs -d :pserver:cvsguest:guest@cvs.simgear.org:/var/cvs/SimGear-0.3 login cvs -d :pserver:cvsguest@cvs.simgear.org:/var/cvs/SimGear-0.3 co source cd - cd "simgear/source" ./autogen.sh ./configure --prefix="$INSTALL_DIR_SIMGEAR" --exec-prefix="$INSTALL_DIR_SIMGEAR" --with-osg="$INSTALL_DIR_OSG" --with-jpeg-factory make make install cd - ####################################################### # FGSD ####################################################### INSTALL_DIR_FLU=$INSTALL_DIR/FLU INSTALL_DIR_FGSD=$INSTALL_DIR/fgsd cd "$CBD" # GETTING FLU wget -c http://www.osc.edu/~jbryan/FLU/FLU_2.14.tar.gz tar zxvf FLU_2.14.tar.gz cd FLU_2.14/ # FIXING gcc problem cat FLU/Flu_Tree_Browser.h | sed s/"bool Flu_Tree_Browser ::"/bool/ > FLU/Flu_Tree_Browser.h-ok mv FLU/Flu_Tree_Browser.h-ok FLU/Flu_Tree_Browser.h ./configure --L=/usr/lib --I=/usr/include --disable-examples --prefix=$INSTALL_DIR_FLU make make install cd .. svn co http://fgsd.svn.sourceforge.net/svnroot/fgsd fgsd cd fgsd/trunk/fgsd ./autogen.sh ./configure --prefix=$INSTALL_DIR_FGSD --exec-prefix=$INSTALL_DIR_FGSD --with-simgear="$INSTALL_DIR_SIMGEAR" --with-fltk="$INSTALL_DIR_FLU" CXXFLAGS="$CXXFLAGS -I$CBD/OpenSceneGraph/include" make make install cd - echo "#!/bin/sh" > run_scenery.sh echo "cd $INSTALL_DIR_FGSD/bin" >> run_scenery.sh echo "export LD_LIBRARY_PATH=$INSTALL_DIR_OSG/lib:$INSTALL_DIR_SIMGEAR/lib:$INSTALL_DIR_FLU/lib" >> run_scenery.sh echo "./fgsd" >> run_scenery.sh chmod 755 run_scenery.sh ####################################################### # TAXIDRAW ####################################################### INSTALL_DIR_TAXI=$INSTALL_DIR/TaxiDraw cd "$CBD" cvs -d :pserver:anonymous:guest@taxidraw.cvs.sourceforge.net:/cvsroot/taxidraw login cvs -z3 -d :pserver:anonymous@taxidraw.cvs.sourceforge.net:/cvsroot/taxidraw co TaxiDraw cd TaxiDraw ./autogen.sh ./configure --prefix=$INSTALL_DIR_TAXI --exec-prefix=$INSTALL_DIR_TAXI --with-wx-config=/usr/lib/wx/config/gtk2-unicode-release-2.6 make make install cd - echo "#!/bin/sh" > run_taxi.sh echo "cd $INSTALL_DIR_TAXI/bin && ./taxidraw" >> run_taxi.sh chmod 755 run_taxi.sh echo "To start Scenery Designer, run the run_scenery.sh file" echo "To start TaxiDraw, run the run_taxi.sh file"