How to install Flightgear on LMDE

Archived topics about LMDE 1 and LMDE 2
Locked
User avatar
filozofio
Level 2
Level 2
Posts: 55
Joined: Thu Apr 14, 2011 2:31 am

How to install Flightgear on LMDE

Post by filozofio »

I am using package LMDE package 8 and the installation refers to Flightgear version 3.0

Flightgear is not complete in the repositories. Therefore, I recommend to build it. The information was taken from this website: http://wiki.flightgear.org/Building_FlightGear_-_Debian, but I had to do some adaptations.

1. Presupositions

Make sure you have this packages in your system (some of them are in LMDE by default):

automake cmake g++ gcc git make sed subversion freeglut3-dev libboost-dev libcurl4-openssl-dev libdbus-1-dev libfltk1.3-dev libgtkglext1-dev libjpeg8-dev libopenal-dev librsvg2-dev libxml2-dev libasound2-dev

Your can do it with the synaptic program or just doing in a terminal:

Code: Select all

sudo apte-get install automake cmake g++ gcc git make sed subversion freeglut3-dev libboost-dev libcurl4-openssl-dev  libdbus-1-dev libfltk1.3-dev  libgtkglext1-dev  libjpeg8-dev libopenal-dev librsvg2-dev  libxml2-dev libasound2-dev 
And the missing packages will be installed.

2. Assign directories

In a terminal, do:

Code: Select all

export FG_INSTALL_DIR=$HOME/FG30 && mkdir $FG_INSTALL_DIR

Code: Select all

export FG_SRC_DIR=$HOME/FG30/src && mkdir $FG_SRC_DIR
Instead of /FG30 and FG30/src you can write other directories of your likeness.

Don't leave the terminal.

3. Building

In the terminal, give these orders, to build plib:

Code: Select all

cd $FG_SRC_DIR

Code: Select all

svn co https://svn.code.sf.net/p/plib/code/trunk plib.svn

Code: Select all

cd plib.svn

Code: Select all

sed s/PLIB_TINY_VERSION\ \ 5/PLIB_TINY_VERSION\ \ 6/ -i src/util/ul.h

Code: Select all

./autogen.sh

Code: Select all

./configure --prefix=$FG_INSTALL_DIR

Code: Select all

make -j2 install
In the terminal, give these orders, to build OpenSceneGraph (beware that after the cmke order, you will be asked to introduce the code in the following line):

Code: Select all

cd $FG_SRC_DIR

Code: Select all

svn co http://svn.openscenegraph.org/osg/OpenSceneGraph/tags/OpenSceneGraph-3.2.0

Code: Select all

mkdir build-osg; cd build-osg

Code: Select all

cmake -D CMAKE_BUILD_TYPE="Release" -D LIB_POSTFIX="" \
      -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/OpenSceneGraph-3.2.0

Code: Select all

make -j2 install
In the terminal, give these orders to build simgear:

Code: Select all

cd $FG_SRC_DIR

Code: Select all

git clone git://mapserver.flightgear.org/simgear simgear.git

Code: Select all

cd simgear.git

Code: Select all

git checkout -b 3.0 origin/release/3.0.0

Code: Select all

mkdir $FG_SRC_DIR/build-sg; cd $FG_SRC_DIR/build-sg

Code: Select all

cmake -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/simgear.git

Code: Select all

make -j2 install

In the terminal, give these orders to build Flightgear 3.0:

Code: Select all

cd $FG_SRC_DIR

Code: Select all

git clone git://mapserver.flightgear.org/flightgear flightgear.git

Code: Select all

cd flightgear.git

Code: Select all

git checkout -b 3.0 origin/release/3.0.0

Code: Select all

mkdir $FG_SRC_DIR/build-fg; cd $FG_SRC_DIR/build-fg

Code: Select all

cmake -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/flightgear.git

Code: Select all

make -j2 install
4. Downloading the data

The instructions at the Flightgear wiki page about downloading the data file did not work properly. Therefore, I went to this page:

http://www.flightgear.wo0t.de/Shared/

and manually downloaded the FlightGear-data-3.0.0.tar.bz file into my /FG30 directory.

Afterwords, I just extracted the file inside the /FG30 directory, and they build a new directory, called /FG30/fgdata

There is a little bug there. I had to go to the file called version, inside the /FG30/fgdata directory, and write 3.0.1 instead of 3.0.0. The reason is that the fg program, after copiled, asked for that version, although it was not already published when i did this.

5. Testing

To test the installation, you can do in the terminal:

Code: Select all

export LD_LIBRARY_PATH=$FG_INSTALL_DIR/lib/:$LD_LIBRARY_PATH

Code: Select all

$FG_INSTALL_DIR/bin/fgfs --fg-root=$FG_INSTALL_DIR/fgdata
6. Permanent script

You can do a permanent script to run the program. With gedit I created a file name fg_start with this contents:

Code: Select all

#!/bin/sh
cd $(dirname $0)
cd /home/username/FG30/bin
export LD_LIBRARY_PATH=/home/username/FG30/lib:
./fgfs --fg-root=/home/username/FG30/fgdata/ $@
Just remember to write your user name instead of "username", and use the right directories.

Afterwards, save the file, and in the file navigator (nemo), you can right click it, go to properties and then to permissions, to make it executable.

Then you only have to run it to start flightgear. Usually you will have to go to go to a terminal, and then:

Code: Select all

cd /FG30

Code: Select all

./fg_start
The graphic program fgo is in the LMDE repositories, and you can use it to start Flightgear. Remember to use the new file fg_start as the executable in fgo.

7. Uninstall

At the beginning you simply created a /FG30 directory in your home directory. Uninstall is simply: just delete the directory you created.

Flightgear creates a .fgfs directory in your home directory. To see it in nemo, just click Ctrl-h. In new versions of Flightgear, this directory grows a lot, because it keeps the downloaded scenarios. For uninstall flightgear, you should delete this directory too.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Monsta
Level 10
Level 10
Posts: 3071
Joined: Fri Aug 19, 2011 3:46 am

Re: How to install Flightgear on LMDE

Post by Monsta »

The usual flaw of 99% of "make install" howtos: no uninstall instructions and no mentioning of the fact that your package manager knows nothing about things installed via "make install". :)
User avatar
filozofio
Level 2
Level 2
Posts: 55
Joined: Thu Apr 14, 2011 2:31 am

Re: How to install Flightgear on LMDE

Post by filozofio »

To uninstall, simply delate the folder created in your home directory. That is all.
Thank you for your kindness.
Locked

Return to “LMDE Archive”