2011-02-06 19:44:11 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#* Written by Francesco Angelo Brisa, started January 2008.
|
|
|
|
#
|
2013-06-06 00:41:01 +00:00
|
|
|
# Copyright (C) 2013 Francesco Angelo Brisa
|
2011-05-19 18:20:53 +00:00
|
|
|
# email: fbrisa@gmail.com - fbrisa@yahoo.it
|
2011-02-06 19:44:11 +00:00
|
|
|
#
|
|
|
|
# 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/>.
|
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
VERSION="1.9-10"
|
2011-02-06 19:44:11 +00:00
|
|
|
|
|
|
|
#COMPILE GIT FGFS
|
|
|
|
|
|
|
|
#######################################################
|
|
|
|
# THANKS TO
|
|
|
|
#######################################################
|
|
|
|
# Special thanks to Alessandro Garosi for FGComGui and
|
|
|
|
# other patches
|
2012-11-01 12:28:51 +00:00
|
|
|
# Thanks to "Pat Callahan" for patches for fgrun compilation
|
2012-04-20 17:28:06 +00:00
|
|
|
# Thanks to "F-JJTH" for bug fixes and suggestions
|
2012-11-22 19:38:51 +00:00
|
|
|
# Thanks again to "F-JJTH" for OpenRTI and FGX
|
2013-06-06 00:41:01 +00:00
|
|
|
# Thanks to André, ( taureau89_9 ) for debian stable packages fixes
|
2011-02-06 19:44:11 +00:00
|
|
|
|
|
|
|
LOGFILE=compilation_log.txt
|
|
|
|
LOGSEP="***********************************"
|
|
|
|
|
|
|
|
WHATTOBUILD=
|
2013-06-06 00:41:01 +00:00
|
|
|
WHATTOBUILDALL=( PLIB OSG OPENRTI SIMGEAR FGFS DATA FGRUN FGCOM FGCOMGUI)
|
2011-02-06 19:44:11 +00:00
|
|
|
UPDATE=
|
|
|
|
STABLE=
|
|
|
|
|
|
|
|
APT_GET_UPDATE="y"
|
|
|
|
DOWNLOAD_PACKAGES="y"
|
|
|
|
|
|
|
|
COMPILE="y"
|
|
|
|
RECONFIGURE="y"
|
|
|
|
DOWNLOAD="y"
|
|
|
|
|
|
|
|
JOPTION=""
|
2011-05-19 18:20:53 +00:00
|
|
|
OOPTION=""
|
2011-02-06 19:44:11 +00:00
|
|
|
DEBUG=""
|
2011-05-19 18:20:53 +00:00
|
|
|
WITH_EVENT_INPUT=""
|
2012-11-22 19:38:51 +00:00
|
|
|
WITH_OPENRTI=""
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
while getopts "suhgeixvwc:p:a:d:r:j:O:" OPTION
|
2011-02-06 19:44:11 +00:00
|
|
|
do
|
|
|
|
case $OPTION in
|
|
|
|
s)
|
|
|
|
STABLE="STABLE"
|
|
|
|
;;
|
|
|
|
u)
|
|
|
|
UPDATE="UPDATE"
|
|
|
|
;;
|
|
|
|
h)
|
2013-06-06 00:41:01 +00:00
|
|
|
HELP="HELP"
|
2011-02-06 19:44:11 +00:00
|
|
|
;;
|
|
|
|
a)
|
|
|
|
APT_GET_UPDATE=$OPTARG
|
|
|
|
;;
|
|
|
|
c)
|
|
|
|
COMPILE=$OPTARG
|
|
|
|
;;
|
|
|
|
p)
|
|
|
|
DOWNLOAD_PACKAGES=$OPTARG
|
|
|
|
;;
|
|
|
|
d)
|
|
|
|
DOWNLOAD=$OPTARG
|
|
|
|
;;
|
|
|
|
r)
|
|
|
|
RECONFIGURE=$OPTARG
|
|
|
|
;;
|
|
|
|
j)
|
|
|
|
JOPTION=" -j"$OPTARG" "
|
|
|
|
;;
|
2011-05-19 18:20:53 +00:00
|
|
|
O)
|
|
|
|
OOPTION=" -O"$OPTARG" "
|
|
|
|
;;
|
2011-02-06 19:44:11 +00:00
|
|
|
g)
|
|
|
|
DEBUG="CXXFLAGS=-g"
|
|
|
|
;;
|
2011-05-19 18:20:53 +00:00
|
|
|
e)
|
|
|
|
WITH_EVENT_INPUT="--with-eventinput"
|
|
|
|
;;
|
2012-11-22 19:38:51 +00:00
|
|
|
i)
|
|
|
|
WITH_OPENRTI="-D ENABLE_RTI=ON"
|
|
|
|
;;
|
2013-06-06 00:41:01 +00:00
|
|
|
x)
|
|
|
|
set -x
|
|
|
|
;;
|
|
|
|
v)
|
|
|
|
set -v
|
|
|
|
;;
|
|
|
|
w)
|
|
|
|
VERBOSE_MAKEFILE="-D CMAKE_VERBOSE_MAKEFILE=ON"
|
|
|
|
;;
|
2011-02-06 19:44:11 +00:00
|
|
|
?)
|
2011-05-19 18:20:53 +00:00
|
|
|
echo "error"
|
2013-06-06 00:41:01 +00:00
|
|
|
HELP="HELP"
|
2011-02-06 19:44:11 +00:00
|
|
|
#exit
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
shift $(($OPTIND - 1))
|
|
|
|
#printf "Remaining arguments are: %s\n" "$*"
|
|
|
|
#printf "Num: %d\n" "$#"
|
|
|
|
|
|
|
|
if [ ! "$#" = "0" ]
|
|
|
|
then
|
2013-06-06 00:41:01 +00:00
|
|
|
for arg in $*
|
|
|
|
do
|
|
|
|
#echo "$arg"
|
|
|
|
if [ "${arg^^}" == "UPDATE" ]
|
|
|
|
then
|
|
|
|
UPDATE="UPDATE"
|
|
|
|
else
|
|
|
|
WHATTOBUILD=( "${WHATTOBUILD[@]}" "${arg^^}" )
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
else
|
|
|
|
WHATTOBUILD=( "${WHATTOBUILDALL[@]}" )
|
2011-02-06 19:44:11 +00:00
|
|
|
fi
|
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
if [[ "$(declare -p WHATTOBUILD)" =~ '['([0-9]+)']="ALL"' ]]
|
|
|
|
then
|
|
|
|
WHATTOBUILD=( "${WHATTOBUILDALL[@]}" )
|
|
|
|
fi
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
#printf "%s\n" "${WHATTOBUILD[@]}"
|
2011-02-06 19:44:11 +00:00
|
|
|
|
|
|
|
#######################################################
|
2011-08-18 19:17:54 +00:00
|
|
|
# Last stable revision: currently FlightGear 2.4.0 with 3.0.1
|
2012-11-20 18:40:35 +00:00
|
|
|
PLIB_STABLE_REVISION="2172"
|
2013-06-06 00:41:01 +00:00
|
|
|
OSG_STABLE_REVISION="http://svn.openscenegraph.org/osg/OpenSceneGraph/tags/OpenSceneGraph-3.0.1/"
|
2011-08-16 19:42:51 +00:00
|
|
|
|
|
|
|
# common stable branch for flightgear, simgear and fgdata
|
2012-08-23 18:49:07 +00:00
|
|
|
FGSG_STABLE_GIT_BRANCH="release/2.8.0"
|
2012-11-01 12:28:51 +00:00
|
|
|
FGRUN_STABLE_GIT_BRANCH="master"
|
2012-11-22 19:38:51 +00:00
|
|
|
OPENRTI_STABLE_GIT_BRANCH="release-0.3"
|
2011-08-16 19:42:51 +00:00
|
|
|
|
|
|
|
# unstable branch: next for sg/fg, master for fgdata
|
|
|
|
FGSG_UNSTABLE_GIT_BRANCH="next"
|
|
|
|
FGDATA_UNSTABLE_GIT_BRANCH="master"
|
2012-11-01 12:28:51 +00:00
|
|
|
FGRUN_UNSTABLE_GIT_BRANCH="master"
|
2012-11-22 19:38:51 +00:00
|
|
|
OPENRTI_UNSTABLE_GIT_BRANCH="master"
|
2011-08-16 19:42:51 +00:00
|
|
|
|
|
|
|
# stable GIT revision: release tag
|
2012-08-23 18:49:07 +00:00
|
|
|
SIMGEAR_STABLE_REVISION="version/2.8.0-final"
|
|
|
|
FGFS_STABLE_REVISION="version/2.8.0-final"
|
|
|
|
FGFS_DATA_STABLE_REVISION="version/2.8.0-final"
|
2012-11-22 19:38:51 +00:00
|
|
|
OPENRTI_STABLE_REVISION="OpenRTI-0.3.0"
|
2011-08-16 19:42:51 +00:00
|
|
|
|
2012-11-22 19:38:51 +00:00
|
|
|
# FGCOM
|
|
|
|
FGCOM_UNSTABLE_GIT_BRANCH="master"
|
2011-02-06 19:44:11 +00:00
|
|
|
FGCOMGUI_STABLE_REVISION="46"
|
|
|
|
|
2011-07-31 12:40:03 +00:00
|
|
|
# Current developer revision: latest FlightGear GIT (2.5.0) with OSG 3.0.1
|
2013-06-06 00:41:01 +00:00
|
|
|
OSG_UNSTABLE_REVISION="http://svn.openscenegraph.org/osg/OpenSceneGraph/tags/OpenSceneGraph-3.0.1/"
|
2011-02-06 19:54:15 +00:00
|
|
|
|
2011-02-06 19:44:11 +00:00
|
|
|
#######################################################
|
|
|
|
# set script to stop if an error occours
|
|
|
|
set -e
|
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
if [ "$HELP" = "HELP" ]
|
2011-02-06 19:44:11 +00:00
|
|
|
then
|
|
|
|
echo "$0 Version $VERSION"
|
|
|
|
echo "Usage:"
|
2012-11-22 19:38:51 +00:00
|
|
|
echo "./$0 [-u] [-h] [-s] [-e] [-i] [-g] [-a y|n] [-c y|n] [-p y|n] [-d y|n] [-r y|n] [ALL|PLIB|OSG|OPENRTI|SIMGEAR|FGFS|FGO|FGX|FGRUN|FGCOM|FGCOMGUI|ATLAS] [UPDATE]"
|
|
|
|
echo "* without options it recompiles: PLIB,OSG,OPENRTI,SIMGEAR,FGFS,FGRUN"
|
2011-02-06 19:44:11 +00:00
|
|
|
echo "* Using ALL compiles everything"
|
|
|
|
echo "* Adding UPDATE it does not rebuild all (faster but to use only after one successfull first compile)"
|
|
|
|
echo "Switches:"
|
|
|
|
echo "* -u such as using UPDATE"
|
|
|
|
echo "* -h show this help"
|
2011-05-19 18:20:53 +00:00
|
|
|
echo "* -e compile FlightGear with --with-eventinput option (experimental)"
|
2012-11-22 19:38:51 +00:00
|
|
|
echo "* -i compile SimGear and FlightGear with -D ENABLE_RTI=ON option (experimental)"
|
2011-02-06 19:44:11 +00:00
|
|
|
echo "* -g compile with debug info for gcc"
|
|
|
|
echo "* -a y|n y=do an apt-get update n=skip apt-get update default=y"
|
|
|
|
echo "* -p y|n y=download packages n=skip download packages default=y"
|
|
|
|
echo "* -c y|n y=compile programs n=do not compile programs default=y"
|
|
|
|
echo "* -d y|n y=fetch programs from internet (cvs, svn, etc...) n=do not fetch default=y"
|
2011-05-19 18:20:53 +00:00
|
|
|
echo "* -j X Add -jX to the make compilation default=None"
|
|
|
|
echo "* -O X Add -OX to the make compilation default=None"
|
2011-02-06 19:44:11 +00:00
|
|
|
echo "* -r y|n y=reconfigure programs before compiling them n=do not reconfigure default=y"
|
|
|
|
echo "* -s compile only last stable known versions default=y"
|
|
|
|
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
#######################################################
|
|
|
|
#######################################################
|
|
|
|
# Warning about compilation time and size
|
|
|
|
# Idea from Jester
|
|
|
|
echo "**************************************"
|
|
|
|
echo "* *"
|
|
|
|
echo "* Warning, the compilation process *"
|
2012-08-23 18:49:07 +00:00
|
|
|
echo "* is going to use 12 or more Gbytes *"
|
2011-02-06 19:44:11 +00:00
|
|
|
echo "* of space and at least a couple of *"
|
|
|
|
echo "* hours to download and build FG. *"
|
|
|
|
echo "* *"
|
|
|
|
echo "* Please, be patient ...... *"
|
|
|
|
echo "* *"
|
|
|
|
echo "**************************************"
|
|
|
|
|
|
|
|
#######################################################
|
|
|
|
#######################################################
|
|
|
|
# Debian 4.0rX (Etch) backports.org
|
|
|
|
# From D-HUND
|
|
|
|
|
|
|
|
ISSUE=$(cat /etc/issue)
|
|
|
|
|
|
|
|
# Uncomment following line to confirm backports.org is in sources.list:
|
|
|
|
#ISSUE=""
|
|
|
|
|
|
|
|
if [ "$ISSUE" = "Debian GNU/Linux 4.0 \n \l" ]; then
|
|
|
|
clear
|
|
|
|
echo "*****************************************************"
|
|
|
|
echo "* Note to users of Debian Etch (Stable 4.0rX) *"
|
|
|
|
echo "*****************************************************"
|
|
|
|
echo
|
|
|
|
echo "Since autumn 2008 it is not possible anymore to easily install fgfs"
|
|
|
|
echo "cvs by using standard repositry. Therefore it is necessary to have"
|
|
|
|
echo "backports.org in the apt sources.list to run this script."
|
|
|
|
echo
|
|
|
|
echo "If you're using synaptic you may follow these steps:"
|
|
|
|
echo " - Open synaptics menu 'Settings' --> 'Repositories'"
|
|
|
|
echo " - Click 'Add' and do"
|
|
|
|
echo " select 'Binaries (deb)'"
|
|
|
|
echo " enter Address: 'www.backports.org/backports.org/'"
|
|
|
|
echo " enter Distribution: 'etch-backports'"
|
|
|
|
echo " enter Section(s): 'main contrib non-free'"
|
|
|
|
echo " - Close Repositries window using 'OK'"
|
|
|
|
echo " - Click 'Reload' to update database."
|
|
|
|
echo
|
|
|
|
echo "If you have backports.org in your apt-repositries and want to get"
|
|
|
|
echo "rid of this message have a look at the script."
|
|
|
|
echo -n "[c] to continue or just [ENTER] to exit script: "
|
|
|
|
if [ "$(read GOON)" != "c" ]; then
|
|
|
|
echo "Script aborted!"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
#######################################################
|
|
|
|
#######################################################
|
|
|
|
|
|
|
|
echo $0 $* > $LOGFILE
|
|
|
|
|
|
|
|
echo "APT_GET_UPDATE=$APT_GET_UPDATE" >> $LOGFILE
|
|
|
|
echo "DOWNLOAD_PACKAGES=$DOWNLOAD_PACKAGES" >> $LOGFILE
|
|
|
|
echo "COMPILE=$COMPILE" >> $LOGFILE
|
|
|
|
echo "RECONFIGURE=$RECONFIGURE" >> $LOGFILE
|
|
|
|
echo "DOWNLOAD=$DOWNLOAD" >> $LOGFILE
|
|
|
|
echo "JOPTION=$JOPTION" >> $LOGFILE
|
2011-05-19 18:20:53 +00:00
|
|
|
echo "OOPTION=$OOPTION" >> $LOGFILE
|
2011-02-06 19:44:11 +00:00
|
|
|
echo "DEBUG=$DEBUG" >> $LOGFILE
|
|
|
|
|
|
|
|
echo "$LOGSEP" >> $LOGFILE
|
|
|
|
|
|
|
|
# discovering linux
|
|
|
|
if [ -e /etc/lsb-release ]
|
|
|
|
then
|
|
|
|
. /etc/lsb-release
|
|
|
|
fi
|
|
|
|
|
|
|
|
# default is hardy
|
2013-06-06 00:41:01 +00:00
|
|
|
DISTRO_PACKAGES="libopenal-dev libalut-dev libalut0 cvs subversion cmake make build-essential automake zlib1g-dev zlib1g libwxgtk2.8-0 libwxgtk2.8-dev fluid gawk gettext libxi-dev libxi6 libxmu-dev libxmu6 libboost-dev libasound2-dev libasound2 libpng12-dev libpng12-0 libjasper1 libjasper-dev libopenexr-dev libboost-serialization-dev git-core libhal-dev libqt4-dev scons python-tk python-imaging-tk libsvn-dev libglew1.5-dev libxft2 libxft-dev libxinerama1 libxinerama-dev"
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2012-11-27 21:09:03 +00:00
|
|
|
UBUNTU_PACKAGES="freeglut3-dev libjpeg62-dev libjpeg62 libapr1-dev libfltk1.3-dev libfltk1.3"
|
2013-06-06 00:41:01 +00:00
|
|
|
|
|
|
|
DEBIAN_PACKAGES_STABLE="freeglut3-dev libjpeg8-dev libjpeg8 libfltk1.1-dev libfltk1.1"
|
|
|
|
DEBIAN_PACKAGES_TESTING="freeglut3-dev libjpeg8-dev libjpeg8 libfltk1.3-dev libfltk1.3"
|
|
|
|
DEBIAN_PACKAGES_UNSTABLE="freeglut3-dev libjpeg8-dev libjpeg8 libfltk1.3-dev libfltk1.3"
|
2011-02-06 19:44:11 +00:00
|
|
|
|
|
|
|
# checking linux distro and version to differ needed packages
|
2012-11-27 21:09:03 +00:00
|
|
|
if [ "$DISTRIB_ID" = "Ubuntu" -o "$DISTRIB_ID" = "LinuxMint" ]
|
2011-02-06 19:44:11 +00:00
|
|
|
then
|
|
|
|
echo "$DISTRIB_ID $DISTRIB_RELEASE" >> $LOGFILE
|
2011-09-18 09:25:48 +00:00
|
|
|
DISTRO_PACKAGES="$DISTRO_PACKAGES $UBUNTU_PACKAGES"
|
2011-02-06 19:44:11 +00:00
|
|
|
else
|
|
|
|
echo "DEBIAN I SUPPOUSE" >> $LOGFILE
|
2013-06-06 00:41:01 +00:00
|
|
|
|
|
|
|
DEBIAN_PACKAGES=$DEBIAN_PACKAGES_STABLE
|
|
|
|
if [ ! "$(apt-cache search libfltk1.3)" = "" ]
|
|
|
|
then
|
|
|
|
#TESTING MAYBE
|
|
|
|
DEBIAN_PACKAGES=$DEBIAN_PACKAGES_TESTING
|
|
|
|
fi
|
|
|
|
|
2011-09-18 09:25:48 +00:00
|
|
|
DISTRO_PACKAGES="$DISTRO_PACKAGES $DEBIAN_PACKAGES"
|
2011-02-06 19:44:11 +00:00
|
|
|
fi
|
|
|
|
echo "$LOGSEP" >> $LOGFILE
|
|
|
|
|
|
|
|
if [ "$DOWNLOAD_PACKAGES" = "y" ]
|
|
|
|
then
|
|
|
|
echo -n "PACKAGE INSTALLATION ... " >> $LOGFILE
|
|
|
|
|
|
|
|
LIBOPENALPACKAGE=$(apt-cache search libopenal | grep "libopenal. " | sed s/\ .*//)
|
|
|
|
DISTRO_PACKAGES=$DISTRO_PACKAGES" "$LIBOPENALPACKAGE
|
|
|
|
|
|
|
|
# checking linux distro and version to differ needed packages
|
|
|
|
if [ "$DISTRIB_ID" = "Ubuntu" ]
|
|
|
|
then
|
|
|
|
|
|
|
|
if [ "$APT_GET_UPDATE" = "y" ]
|
|
|
|
then
|
|
|
|
echo "Asking your password to perform an apt-get update"
|
|
|
|
sudo apt-get update
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
echo "Asking your password to perform an apt-get install ... "
|
|
|
|
sudo apt-get install $DISTRO_PACKAGES
|
|
|
|
else
|
|
|
|
# WE ARE USING DEBIAN
|
|
|
|
|
|
|
|
if [ "$APT_GET_UPDATE" = "y" ]
|
|
|
|
then
|
|
|
|
echo "Asking root password to perform an apt-get update"
|
|
|
|
su -c "apt-get update"
|
|
|
|
fi
|
|
|
|
echo "Asking root password to perform an apt-get install ... "
|
|
|
|
su -c "apt-get install $DISTRO_PACKAGES"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo " OK" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
|
|
|
|
COMPILE_BASE_DIR=.
|
|
|
|
|
|
|
|
#cd into compile base directory
|
|
|
|
cd "$COMPILE_BASE_DIR"
|
|
|
|
|
|
|
|
#get absolute path
|
|
|
|
CBD=$(pwd)
|
|
|
|
|
|
|
|
LOGFILE=$CBD/$LOGFILE
|
|
|
|
|
|
|
|
echo "DIRECTORY= $CBD" >> $LOGFILE
|
|
|
|
echo "$LOGSEP" >> $LOGFILE
|
|
|
|
|
|
|
|
if [ ! -d install ]
|
|
|
|
then
|
|
|
|
mkdir install
|
|
|
|
fi
|
|
|
|
|
|
|
|
SUB_INSTALL_DIR=install
|
|
|
|
INSTALL_DIR=$CBD/$SUB_INSTALL_DIR
|
|
|
|
|
|
|
|
|
2012-04-18 08:38:22 +00:00
|
|
|
cd "$CBD"
|
|
|
|
mkdir -p build
|
|
|
|
|
2011-02-06 19:44:11 +00:00
|
|
|
#######################################################
|
|
|
|
# PLIB
|
|
|
|
#######################################################
|
|
|
|
PLIB_INSTALL_DIR=plib
|
|
|
|
INSTALL_DIR_PLIB=$INSTALL_DIR/$PLIB_INSTALL_DIR
|
|
|
|
|
|
|
|
cd "$CBD"
|
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
#svn co http://plib.svn.sourceforge.net/svnroot/plib/trunk/ plib
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
if [[ "$(declare -p WHATTOBUILD)" =~ '['([0-9]+)']="PLIB"' ]]
|
2011-02-06 19:44:11 +00:00
|
|
|
then
|
|
|
|
if [ ! "$UPDATE" = "UPDATE" ]
|
|
|
|
then
|
|
|
|
echo "****************************************" | tee -a $LOGFILE
|
|
|
|
echo "**************** PLIB ******************" | tee -a $LOGFILE
|
|
|
|
echo "****************************************" | tee -a $LOGFILE
|
|
|
|
|
|
|
|
echo "COMPILING PLIB" >> $LOGFILE
|
|
|
|
echo "INSTALL_DIR_PLIB=$INSTALL_DIR_PLIB" >> $LOGFILE
|
|
|
|
|
|
|
|
|
|
|
|
PLIB_STABLE_REVISION_=""
|
2012-11-20 18:40:35 +00:00
|
|
|
if [ "$STABLE" = "STABLE" ]
|
|
|
|
#if [ "STABLE" = "STABLE" ]
|
2011-02-06 19:44:11 +00:00
|
|
|
then
|
|
|
|
PLIB_STABLE_REVISION_=" -r $PLIB_STABLE_REVISION"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$DOWNLOAD" = "y" ]
|
|
|
|
then
|
|
|
|
if [ -d "plib/.svn" ]
|
|
|
|
then
|
|
|
|
echo -n "updating plib svn" >>$LOGFILE
|
|
|
|
cd plib
|
|
|
|
svn update $PLIB_STABLE_REVISION_
|
|
|
|
cd -
|
|
|
|
else
|
|
|
|
echo -n "DOWNLOADING FROM http://plib.svn.sourceforge.net ..." >> $LOGFILE
|
2013-06-06 00:41:01 +00:00
|
|
|
svn $PLIB_STABLE_REVISION_ co http://plib.svn.sourceforge.net/svnroot/plib/trunk/ plib
|
2012-11-20 18:40:35 +00:00
|
|
|
#cat plib/src/util/ul.h | sed s/"PLIB_TINY_VERSION 5"/"PLIB_TINY_VERSION 6"/g > ul.h-v1.8.6
|
|
|
|
#mv ul.h-v1.8.6 plib/src/util/ul.h
|
2011-02-06 19:44:11 +00:00
|
|
|
echo " OK" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
cd plib
|
|
|
|
|
|
|
|
if [ "$RECONFIGURE" = "y" ]
|
|
|
|
then
|
2012-04-18 08:38:22 +00:00
|
|
|
|
|
|
|
cd "$CBD"
|
|
|
|
mkdir -p build/plib
|
|
|
|
|
|
|
|
|
|
|
|
cd plib
|
|
|
|
|
2011-02-06 19:44:11 +00:00
|
|
|
echo "AUTOGEN plib" >> $LOGFILE
|
|
|
|
./autogen.sh 2>&1 | tee -a $LOGFILE
|
|
|
|
echo "CONFIGURING plib" >> $LOGFILE
|
2012-04-18 08:38:22 +00:00
|
|
|
cd "$CBD"/build/plib
|
2012-11-22 19:38:51 +00:00
|
|
|
../../plib/configure --disable-pw --disable-sl --disable-psl --disable-ssg --disable-ssgaux --prefix="$INSTALL_DIR_PLIB" --exec-prefix="$INSTALL_DIR_PLIB" 2>&1 | tee -a $LOGFILE
|
2011-02-06 19:44:11 +00:00
|
|
|
else
|
|
|
|
echo "NO RECONFIGURE FOR plib" >> $LOGFILE
|
|
|
|
fi
|
2012-04-18 08:38:22 +00:00
|
|
|
|
2011-02-06 19:44:11 +00:00
|
|
|
|
|
|
|
if [ "$COMPILE" = "y" ]
|
|
|
|
then
|
2012-04-18 08:38:22 +00:00
|
|
|
|
2011-02-06 19:44:11 +00:00
|
|
|
echo "MAKE plib" >> $LOGFILE
|
2011-05-19 18:20:53 +00:00
|
|
|
echo "make $JOPTION $OOPTION" >> $LOGFILE
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2012-04-18 08:38:22 +00:00
|
|
|
cd "$CBD"/build/plib
|
|
|
|
make $JOPTION $OOPTION 2>&1 | tee -a $LOGFILE
|
2011-02-06 19:44:11 +00:00
|
|
|
|
|
|
|
if [ ! -d $INSTALL_DIR_PLIB ]
|
|
|
|
then
|
|
|
|
mkdir -p "$INSTALL_DIR_PLIB"
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
echo "INSTALL plib" >> $LOGFILE
|
|
|
|
echo "make install" >> $LOGFILE
|
|
|
|
make install 2>&1 | tee -a $LOGFILE
|
|
|
|
fi
|
|
|
|
|
2012-04-18 08:38:22 +00:00
|
|
|
cd "$CBD"
|
2011-02-06 19:44:11 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
#######################################################
|
|
|
|
# OpenSceneGraph
|
|
|
|
#######################################################
|
|
|
|
OSG_INSTALL_DIR=OpenSceneGraph
|
|
|
|
INSTALL_DIR_OSG=$INSTALL_DIR/$OSG_INSTALL_DIR
|
|
|
|
cd "$CBD"
|
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
if [[ "$(declare -p WHATTOBUILD)" =~ '['([0-9]+)']="OSG"' ]]
|
2011-02-06 19:44:11 +00:00
|
|
|
then
|
|
|
|
echo "****************************************" | tee -a $LOGFILE
|
|
|
|
echo "**************** OSG *******************" | tee -a $LOGFILE
|
|
|
|
echo "****************************************" | tee -a $LOGFILE
|
|
|
|
|
2011-02-06 19:54:15 +00:00
|
|
|
OSG_SVN=$OSG_UNSTABLE_REVISION
|
2011-05-19 18:20:53 +00:00
|
|
|
if [ "$STABLE" = "STABLE" ]
|
2011-02-06 19:44:11 +00:00
|
|
|
then
|
|
|
|
OSG_SVN=$OSG_STABLE_REVISION
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$DOWNLOAD" = "y" ]
|
|
|
|
then
|
2011-02-06 19:54:15 +00:00
|
|
|
echo -n "SVN FROM $OSG_SVN ... " >> $LOGFILE
|
2011-02-06 19:44:11 +00:00
|
|
|
svn co "$OSG_SVN" OpenSceneGraph
|
|
|
|
echo " OK" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
cd OpenSceneGraph
|
|
|
|
|
|
|
|
if [ ! "$UPDATE" = "UPDATE" ]
|
|
|
|
then
|
|
|
|
if [ "$RECONFIGURE" = "y" ]
|
|
|
|
then
|
2012-04-18 08:38:22 +00:00
|
|
|
cd "$CBD"
|
|
|
|
mkdir -p build/osg
|
|
|
|
cd "$CBD"/build/osg
|
2011-02-06 19:44:11 +00:00
|
|
|
echo -n "RECONFIGURE OSG ... " >> $LOGFILE
|
2012-04-18 08:38:22 +00:00
|
|
|
rm -f ../../OpenSceneGraph/CMakeCache.txt
|
|
|
|
cmake ../../OpenSceneGraph/
|
2011-02-06 19:44:11 +00:00
|
|
|
echo " OK" >> $LOGFILE
|
|
|
|
|
2012-04-18 08:38:22 +00:00
|
|
|
|
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
cmake ${VERBOSE_MAKEFILE} -D CMAKE_BUILD_TYPE="Release" -D CMAKE_CXX_FLAGS="-O3 -D__STDC_CONSTANT_MACROS" -D CMAKE_C_FLAGS="-O3" -D CMAKE_INSTALL_PREFIX:PATH="$INSTALL_DIR_OSG" ../../OpenSceneGraph/ 2>&1 | tee -a $LOGFILE
|
2011-02-06 19:44:11 +00:00
|
|
|
|
|
|
|
echo "RECONFIGURE OSG DONE." >> $LOGFILE
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$COMPILE" = "y" ]
|
|
|
|
then
|
|
|
|
echo "COMPILING OSG" >> $LOGFILE
|
2012-04-18 08:38:22 +00:00
|
|
|
cd "$CBD"/build/osg
|
2011-05-19 18:20:53 +00:00
|
|
|
make $JOPTION $OOPTION 2>&1 | tee -a $LOGFILE
|
2011-02-06 19:44:11 +00:00
|
|
|
|
|
|
|
if [ ! -d $INSTALL_DIR_OSG ]
|
|
|
|
then
|
|
|
|
mkdir -p "$INSTALL_DIR_OSG"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "INSTALLING OSG" >> $LOGFILE
|
|
|
|
make install 2>&1 | tee -a $LOGFILE
|
|
|
|
fi
|
|
|
|
|
|
|
|
#FIX FOR 64 BIT COMPILATION
|
|
|
|
if [ -d "$INSTALL_DIR_OSG/lib64" ]
|
|
|
|
then
|
|
|
|
if [ -L "$INSTALL_DIR_OSG/lib" ]
|
|
|
|
then
|
|
|
|
echo "link already done"
|
|
|
|
else
|
|
|
|
ln -s "$INSTALL_DIR_OSG/lib64" "$INSTALL_DIR_OSG/lib"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd -
|
|
|
|
fi
|
|
|
|
|
2012-11-22 19:38:51 +00:00
|
|
|
#######################################################
|
|
|
|
# OPENRTI
|
|
|
|
#######################################################
|
|
|
|
OPENRTI_INSTALL_DIR=openrti
|
|
|
|
INSTALL_DIR_OPENRTI=$INSTALL_DIR/$OPENRTI_INSTALL_DIR
|
|
|
|
cd "$CBD"
|
|
|
|
|
|
|
|
if [ ! -d "openrti" ]
|
|
|
|
then
|
|
|
|
mkdir "openrti"
|
|
|
|
fi
|
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
if [[ "$(declare -p WHATTOBUILD)" =~ '['([0-9]+)']="OPENRTI"' ]]
|
2012-11-22 19:38:51 +00:00
|
|
|
then
|
|
|
|
echo "****************************************" | tee -a $LOGFILE
|
|
|
|
echo "**************** OPENRTI ***************" | tee -a $LOGFILE
|
|
|
|
echo "****************************************" | tee -a $LOGFILE
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$DOWNLOAD" = "y" ]
|
|
|
|
then
|
|
|
|
cd openrti
|
|
|
|
|
|
|
|
echo -n "git FROM git://gitorious.org/openrti/openrti.git ... " >> $LOGFILE
|
|
|
|
|
|
|
|
if [ -d "openrti" ]
|
|
|
|
then
|
|
|
|
echo "openrti exists already."
|
|
|
|
else
|
|
|
|
git clone git://gitorious.org/openrti/openrti.git
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd openrti
|
|
|
|
|
|
|
|
git fetch origin
|
|
|
|
if [ "$STABLE" = "STABLE" ]
|
|
|
|
then
|
|
|
|
# switch to stable branch
|
|
|
|
# create local stable branch, ignore errors if it exists
|
|
|
|
git branch -f $OPENRTI_STABLE_GIT_BRANCH origin/$OPENRTI_STABLE_GIT_BRANCH 2> /dev/null || true
|
|
|
|
# switch to stable branch. No error is reported if we're already on the branch.
|
|
|
|
git checkout -f $OPENRTI_STABLE_GIT_BRANCH
|
|
|
|
# get indicated stable version
|
|
|
|
git reset --hard $OPENRTI_STABLE_REVISION
|
|
|
|
else
|
|
|
|
# switch to unstable branch
|
|
|
|
# create local unstable branch, ignore errors if it exists
|
|
|
|
git branch -f $OPENRTI_UNSTABLE_GIT_BRANCH origin/$OPENRTI_UNSTABLE_GIT_BRANCH 2> /dev/null || true
|
|
|
|
# switch to unstable branch. No error is reported if we're already on the branch.
|
|
|
|
git checkout -f $OPENRTI_UNSTABLE_GIT_BRANCH
|
|
|
|
# pull latest version from the unstable branch
|
|
|
|
git pull
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo " OK" >> $LOGFILE
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd "openrti/openrti"
|
|
|
|
|
|
|
|
if [ ! "$UPDATE" = "UPDATE" ]
|
|
|
|
then
|
|
|
|
if [ "$RECONFIGURE" = "y" ]
|
|
|
|
then
|
|
|
|
|
|
|
|
cd "$CBD"
|
|
|
|
mkdir -p build/openrti
|
|
|
|
cd "$CBD"/build/openrti
|
|
|
|
echo -n "RECONFIGURE OPENRTI ... " >> $LOGFILE
|
|
|
|
rm -f ../../openrti/openrti/CMakeCache.txt
|
2013-06-06 00:41:01 +00:00
|
|
|
cmake ${VERBOSE_MAKEFILE} -D CMAKE_BUILD_TYPE="Release" -D CMAKE_CXX_FLAGS="-O3 -D__STDC_CONSTANT_MACROS" -D CMAKE_INSTALL_PREFIX:PATH="$INSTALL_DIR_OPENRTI" ../../openrti/openrti/ 2>&1 | tee -a $LOGFILE
|
2012-11-22 19:38:51 +00:00
|
|
|
echo " OK" >> $LOGFILE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$COMPILE" = "y" ]
|
|
|
|
then
|
|
|
|
|
|
|
|
|
|
|
|
cd "$CBD"/build/openrti
|
|
|
|
echo "MAKE OPENRTI" >> $LOGFILE
|
|
|
|
echo "make $JOPTION $OOPTION " >> $LOGFILE
|
|
|
|
make $JOPTION $OOPTION 2>&1 | tee -a $LOGFILE
|
|
|
|
|
|
|
|
echo "INSTALL OPENRTI" >> $LOGFILE
|
|
|
|
make install 2>&1 | tee -a $LOGFILE
|
|
|
|
fi
|
|
|
|
cd -
|
|
|
|
fi
|
|
|
|
|
2011-02-06 19:44:11 +00:00
|
|
|
#######################################################
|
|
|
|
# SIMGEAR
|
|
|
|
#######################################################
|
|
|
|
SIMGEAR_INSTALL_DIR=simgear
|
|
|
|
INSTALL_DIR_SIMGEAR=$INSTALL_DIR/$SIMGEAR_INSTALL_DIR
|
|
|
|
cd "$CBD"
|
|
|
|
|
|
|
|
if [ ! -d "simgear" ]
|
|
|
|
then
|
|
|
|
mkdir "simgear"
|
|
|
|
fi
|
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
if [[ "$(declare -p WHATTOBUILD)" =~ '['([0-9]+)']="SIMGEAR"' ]]
|
2011-02-06 19:44:11 +00:00
|
|
|
then
|
|
|
|
echo "****************************************" | tee -a $LOGFILE
|
|
|
|
echo "**************** SIMGEAR ***************" | tee -a $LOGFILE
|
|
|
|
echo "****************************************" | tee -a $LOGFILE
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$DOWNLOAD" = "y" ]
|
|
|
|
then
|
|
|
|
cd simgear
|
|
|
|
#echo -n "CVS FROM cvs.simgear.org:/var/cvs/SimGear-0.3 ... " >> $LOGFILE
|
|
|
|
#cvs -z5 -d :pserver:cvsguest:guest@cvs.simgear.org:/var/cvs/SimGear-0.3 login
|
|
|
|
#cvs -z5 -d :pserver:cvsguest@cvs.simgear.org:/var/cvs/SimGear-0.3 co source
|
|
|
|
|
|
|
|
|
|
|
|
echo -n "git FROM git://gitorious.org/fg/simgear.git ... " >> $LOGFILE
|
|
|
|
|
|
|
|
if [ -d "simgear" ]
|
|
|
|
then
|
|
|
|
echo "simgear exists already."
|
|
|
|
else
|
|
|
|
git clone git://gitorious.org/fg/simgear.git
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd simgear
|
|
|
|
|
2011-08-16 19:42:51 +00:00
|
|
|
git fetch origin
|
2011-02-06 19:44:11 +00:00
|
|
|
if [ "$STABLE" = "STABLE" ]
|
|
|
|
then
|
2011-08-16 19:42:51 +00:00
|
|
|
# switch to stable branch
|
|
|
|
# create local stable branch, ignore errors if it exists
|
2011-08-18 18:33:01 +00:00
|
|
|
git branch -f $FGSG_STABLE_GIT_BRANCH origin/$FGSG_STABLE_GIT_BRANCH 2> /dev/null || true
|
2011-08-16 19:42:51 +00:00
|
|
|
# switch to stable branch. No error is reported if we're already on the branch.
|
|
|
|
git checkout -f $FGSG_STABLE_GIT_BRANCH
|
|
|
|
# get indicated stable version
|
2011-02-06 19:44:11 +00:00
|
|
|
git reset --hard $SIMGEAR_STABLE_REVISION
|
2011-08-16 19:42:51 +00:00
|
|
|
else
|
|
|
|
# switch to unstable branch
|
|
|
|
# create local unstable branch, ignore errors if it exists
|
2011-08-18 18:33:01 +00:00
|
|
|
git branch -f $FGSG_UNSTABLE_GIT_BRANCH origin/$FGSG_UNSTABLE_GIT_BRANCH 2> /dev/null || true
|
2011-08-16 19:42:51 +00:00
|
|
|
# switch to unstable branch. No error is reported if we're already on the branch.
|
|
|
|
git checkout -f $FGSG_UNSTABLE_GIT_BRANCH
|
|
|
|
# pull latest version from the unstable branch
|
|
|
|
git pull
|
2011-02-06 19:44:11 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo " OK" >> $LOGFILE
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd "simgear/simgear"
|
|
|
|
|
|
|
|
if [ ! "$UPDATE" = "UPDATE" ]
|
|
|
|
then
|
|
|
|
if [ "$RECONFIGURE" = "y" ]
|
|
|
|
then
|
2011-09-27 19:00:02 +00:00
|
|
|
|
2012-04-18 08:38:22 +00:00
|
|
|
cd "$CBD"
|
|
|
|
mkdir -p build/simgear
|
|
|
|
cd "$CBD"/build/simgear
|
2011-09-27 19:00:02 +00:00
|
|
|
echo -n "RECONFIGURE SIMGEAR ... " >> $LOGFILE
|
2012-04-18 08:38:22 +00:00
|
|
|
rm -f ../../simgear/simgear/CMakeCache.txt
|
2013-06-06 00:41:01 +00:00
|
|
|
cmake ${VERBOSE_MAKEFILE} -D CMAKE_BUILD_TYPE="Release" $WITH_OPENRTI -D CMAKE_CXX_FLAGS="-O3 -D__STDC_CONSTANT_MACROS" -D CMAKE_C_FLAGS="-O3" -D CMAKE_INSTALL_PREFIX:PATH="$INSTALL_DIR_SIMGEAR" -D "CMAKE_PREFIX_PATH=$INSTALL_DIR_OSG;$INSTALL_DIR_OPENRTI" ../../simgear/simgear/ 2>&1 | tee -a $LOGFILE
|
2011-09-27 19:00:02 +00:00
|
|
|
echo " OK" >> $LOGFILE
|
|
|
|
|
|
|
|
|
2011-02-06 19:44:11 +00:00
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$COMPILE" = "y" ]
|
|
|
|
then
|
2012-04-18 08:38:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
cd "$CBD"/build/simgear
|
2011-02-06 19:44:11 +00:00
|
|
|
echo "MAKE SIMGEAR" >> $LOGFILE
|
2011-05-19 18:20:53 +00:00
|
|
|
echo "make $JOPTION $OOPTION " >> $LOGFILE
|
|
|
|
make $JOPTION $OOPTION 2>&1 | tee -a $LOGFILE
|
2011-02-06 19:44:11 +00:00
|
|
|
|
|
|
|
echo "INSTALL SIMGEAR" >> $LOGFILE
|
|
|
|
make install 2>&1 | tee -a $LOGFILE
|
|
|
|
fi
|
|
|
|
cd -
|
|
|
|
fi
|
|
|
|
|
|
|
|
#######################################################
|
|
|
|
# FGFS
|
|
|
|
#######################################################
|
|
|
|
FGFS_INSTALL_DIR=fgfs
|
|
|
|
INSTALL_DIR_FGFS=$INSTALL_DIR/$FGFS_INSTALL_DIR
|
|
|
|
cd "$CBD"
|
|
|
|
|
|
|
|
if [ ! -d "fgfs" ]
|
|
|
|
then
|
|
|
|
mkdir "fgfs"
|
|
|
|
fi
|
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
#if [ "$WHATTOBUILD" = "" -o "$WHATTOBUILD" = "FGFS" -o "$WHATTOBUILD" = "DATA" -o "$WHATTOBUILD" = "ALL" ]
|
|
|
|
if [[ "$(declare -p WHATTOBUILD)" =~ '['([0-9]+)']="FGFS"' || "$(declare -p WHATTOBUILD)" =~ '['([0-9]+)']="DATA"' ]]
|
2011-02-06 19:44:11 +00:00
|
|
|
then
|
|
|
|
|
|
|
|
echo "****************************************" | tee -a $LOGFILE
|
|
|
|
echo "**************** FGFS ******************" | tee -a $LOGFILE
|
|
|
|
echo "****************************************" | tee -a $LOGFILE
|
|
|
|
|
|
|
|
cd fgfs
|
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
if [[ "$(declare -p WHATTOBUILD)" =~ '['([0-9]+)']="FGFS"' ]]
|
2011-02-06 19:44:11 +00:00
|
|
|
then
|
|
|
|
if [ "$DOWNLOAD" = "y" ]
|
|
|
|
then
|
|
|
|
#echo -n "CVS FROM cvs.flightgear.org:/var/cvs/FlightGear-0.9 ... " >> $LOGFILE
|
|
|
|
#cvs -z5 -d :pserver:cvsguest:guest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 login
|
|
|
|
#cvs -z5 -d :pserver:cvsguest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 co source
|
|
|
|
|
|
|
|
echo -n "GIT FROM git://gitorious.org/fg/flightgear.git ... " >> $LOGFILE
|
|
|
|
|
|
|
|
|
|
|
|
if [ -d "flightgear" ]
|
|
|
|
then
|
|
|
|
echo "flightgear exists already."
|
|
|
|
else
|
|
|
|
git clone git://gitorious.org/fg/flightgear.git
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd flightgear
|
|
|
|
|
2011-08-16 19:42:51 +00:00
|
|
|
git fetch origin
|
2011-02-06 19:44:11 +00:00
|
|
|
if [ "$STABLE" = "STABLE" ]
|
|
|
|
then
|
2011-08-16 19:42:51 +00:00
|
|
|
# switch to stable branch
|
|
|
|
# create local stable branch, ignore errors if it exists
|
2011-08-18 18:33:01 +00:00
|
|
|
git branch -f $FGSG_STABLE_GIT_BRANCH origin/$FGSG_STABLE_GIT_BRANCH 2> /dev/null || true
|
2011-08-16 19:42:51 +00:00
|
|
|
# switch to stable branch. No error is reported if we're already on the branch.
|
|
|
|
git checkout -f $FGSG_STABLE_GIT_BRANCH
|
|
|
|
# get indicated stable version
|
2011-02-06 19:44:11 +00:00
|
|
|
git reset --hard $FGFS_STABLE_REVISION
|
2011-08-16 19:42:51 +00:00
|
|
|
else
|
|
|
|
# switch to unstable branch
|
|
|
|
# create local unstable branch, ignore errors if it exists
|
2011-08-18 18:33:01 +00:00
|
|
|
git branch -f $FGSG_UNSTABLE_GIT_BRANCH origin/$FGSG_UNSTABLE_GIT_BRANCH 2> /dev/null || true
|
2011-08-16 19:42:51 +00:00
|
|
|
# switch to unstable branch. No error is reported if we're already on the branch.
|
|
|
|
git checkout -f $FGSG_UNSTABLE_GIT_BRANCH
|
|
|
|
# pull latest version from the unstable branch
|
|
|
|
git pull
|
2011-02-06 19:44:11 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo " OK" >> $LOGFILE
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd flightgear
|
|
|
|
|
|
|
|
if [ ! "$UPDATE" = "UPDATE" ]
|
|
|
|
then
|
|
|
|
if [ "$RECONFIGURE" = "y" ]
|
|
|
|
then
|
2011-09-27 19:00:02 +00:00
|
|
|
#echo "AUTOGEN FGFS" >> $LOGFILE
|
|
|
|
#./autogen.sh 2>&1 | tee -a $LOGFILE
|
|
|
|
#echo "CONFIGURE FGFS" >> $LOGFILE
|
|
|
|
#echo ./configure "$DEBUG" $WITH_EVENT_INPUT --prefix=$INSTALL_DIR_FGFS --exec-prefix=$INSTALL_DIR_FGFS --with-osg="$INSTALL_DIR_OSG" --with-simgear="$INSTALL_DIR_SIMGEAR" --with-plib="$INSTALL_DIR_PLIB"
|
|
|
|
#./configure "$DEBUG" $WITH_EVENT_INPUT --prefix=$INSTALL_DIR_FGFS --exec-prefix=$INSTALL_DIR_FGFS --with-osg="$INSTALL_DIR_OSG" --with-simgear="$INSTALL_DIR_SIMGEAR" --with-plib="$INSTALL_DIR_PLIB" 2>&1 | tee -a $LOGFILE
|
|
|
|
|
2012-04-18 08:38:22 +00:00
|
|
|
|
|
|
|
cd "$CBD"
|
|
|
|
mkdir -p build/fgfs
|
|
|
|
cd "$CBD"/build/fgfs
|
|
|
|
|
|
|
|
|
2011-09-27 19:00:02 +00:00
|
|
|
echo -n "RECONFIGURE FGFS ... " >> $LOGFILE
|
2012-04-18 08:38:22 +00:00
|
|
|
rm -f ../../fgfs/flightgear/CMakeCache.txt
|
2012-01-22 18:19:02 +00:00
|
|
|
|
|
|
|
# REMOVING BAD LINES IN CMakeLists.txt
|
|
|
|
#echo "REMOVING BAD LINES IN CMakeLists.txt"
|
|
|
|
#cat utils/fgadmin/src/CMakeLists.txt | sed /X11_Xft_LIB/d | sed /X11_Xinerama_LIB/d > utils/fgadmin/src/CMakeLists_without_err.txt
|
|
|
|
#cp -f utils/fgadmin/src/CMakeLists_without_err.txt utils/fgadmin/src/CMakeLists.txt
|
|
|
|
|
2011-09-27 19:00:02 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
cmake ${VERBOSE_MAKEFILE} -D CMAKE_BUILD_TYPE="Release" $WITH_OPENRTI -D "WITH_FGPANEL=OFF" -D CMAKE_CXX_FLAGS="-O3 -D__STDC_CONSTANT_MACROS" -D CMAKE_C_FLAGS="-O3" -D CMAKE_INSTALL_PREFIX:PATH="$INSTALL_DIR_FGFS" -D "CMAKE_PREFIX_PATH=$INSTALL_DIR_OSG;$INSTALL_DIR_PLIB;$INSTALL_DIR_SIMGEAR;$INSTALL_DIR_OPENRTI" ../../fgfs/flightgear 2>&1 | tee -a $LOGFILE
|
2011-09-27 19:00:02 +00:00
|
|
|
|
|
|
|
echo " OK" >> $LOGFILE
|
2011-02-06 19:44:11 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$COMPILE" = "y" ]
|
|
|
|
then
|
2012-04-18 08:38:22 +00:00
|
|
|
cd "$CBD"
|
|
|
|
mkdir -p build/fgfs
|
|
|
|
cd "$CBD"/build/fgfs
|
|
|
|
|
2011-02-06 19:44:11 +00:00
|
|
|
echo "MAKE FGFS" >> $LOGFILE
|
2011-05-19 18:20:53 +00:00
|
|
|
echo "make $JOPTION $OOPTION" >> $LOGFILE
|
|
|
|
make $JOPTION $OOPTION 2>&1 | tee -a $LOGFILE
|
2011-02-06 19:44:11 +00:00
|
|
|
|
|
|
|
echo "INSTALL FGFS" >> $LOGFILE
|
|
|
|
make install 2>&1 | tee -a $LOGFILE
|
|
|
|
fi
|
|
|
|
cd ..
|
|
|
|
fi
|
|
|
|
cd ..
|
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
if [[ "$(declare -p WHATTOBUILD)" =~ '['([0-9]+)']="DATA"' ]]
|
2011-02-06 19:44:11 +00:00
|
|
|
then
|
|
|
|
if [ ! "$UPDATE" = "UPDATE" ]
|
|
|
|
then
|
|
|
|
if [ "$DOWNLOAD" = "y" ]
|
|
|
|
then
|
|
|
|
EXDIR=$(pwd)
|
|
|
|
cd $INSTALL_DIR_FGFS
|
|
|
|
echo -n "GIT DATA FROM git://gitorious.org/fg/fgdata.git ... " >> $LOGFILE
|
|
|
|
|
|
|
|
if [ -d "fgdata" ]
|
2011-08-16 19:42:51 +00:00
|
|
|
then
|
|
|
|
echo "fgdata exists already."
|
|
|
|
else
|
|
|
|
# no repository yet - need to clone a fresh one
|
2012-01-03 21:04:42 +00:00
|
|
|
git clone git://gitorious.org/fg/fgdata.git fgdata
|
2011-08-16 19:42:51 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
cd fgdata
|
|
|
|
|
|
|
|
git fetch origin
|
|
|
|
if [ "$STABLE" = "STABLE" ]
|
|
|
|
then
|
|
|
|
# switch to stable branch
|
|
|
|
# create local stable branch, ignore errors if it exists
|
2011-08-18 18:33:01 +00:00
|
|
|
git branch -f $FGSG_STABLE_GIT_BRANCH origin/$FGSG_STABLE_GIT_BRANCH 2> /dev/null || true
|
2011-08-16 19:42:51 +00:00
|
|
|
# switch to stable branch. No error is reported if we're already on the branch.
|
|
|
|
git checkout -f $FGSG_STABLE_GIT_BRANCH
|
|
|
|
# get indicated stable version
|
|
|
|
git reset --hard $FGFS_DATA_STABLE_REVISION
|
|
|
|
else
|
|
|
|
# switch to unstable branch
|
|
|
|
# create local unstable branch, ignore errors if it exists
|
2011-08-18 18:33:01 +00:00
|
|
|
git branch -f $FGDATA_UNSTABLE_GIT_BRANCH origin/$FGDATA_UNSTABLE_GIT_BRANCH 2> /dev/null || true
|
2011-08-16 19:42:51 +00:00
|
|
|
# switch to unstable branch. No error is reported if we're already on the branch.
|
|
|
|
git checkout -f $FGDATA_UNSTABLE_GIT_BRANCH
|
|
|
|
# pull latest version from the unstable branch
|
|
|
|
git pull
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd ..
|
2011-02-06 19:44:11 +00:00
|
|
|
|
|
|
|
echo " OK" >> $LOGFILE
|
|
|
|
cd "$EXDIR"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2012-04-20 17:28:06 +00:00
|
|
|
cd "$CBD"
|
2012-01-03 21:04:42 +00:00
|
|
|
|
|
|
|
# IF SEPARATED FOLDER FOR AIRCRAFTS
|
|
|
|
# --fg-aircraft=\$PWD/../aircrafts
|
2011-02-06 19:44:11 +00:00
|
|
|
cat > run_fgfs.sh << ENDOFALL
|
|
|
|
#!/bin/sh
|
|
|
|
cd \$(dirname \$0)
|
|
|
|
cd $SUB_INSTALL_DIR/$FGFS_INSTALL_DIR/bin
|
2012-11-22 19:38:51 +00:00
|
|
|
export LD_LIBRARY_PATH=../../$PLIB_INSTALL_DIR/lib:../../$OSG_INSTALL_DIR/lib:../../$SIMGEAR_INSTALL_DIR/lib:../../$OPENRTI_INSTALL_DIR/lib
|
2011-02-06 19:44:11 +00:00
|
|
|
./fgfs --fg-root=\$PWD/../fgdata/ \$@
|
|
|
|
ENDOFALL
|
|
|
|
chmod 755 run_fgfs.sh
|
|
|
|
|
|
|
|
cat > run_fgfs_debug.sh << ENDOFALL2
|
|
|
|
#!/bin/sh
|
|
|
|
cd \$(dirname \$0)
|
|
|
|
P1=\$PWD
|
|
|
|
cd $SUB_INSTALL_DIR/$FGFS_INSTALL_DIR/bin
|
2012-11-22 19:38:51 +00:00
|
|
|
export LD_LIBRARY_PATH=../../$PLIB_INSTALL_DIR/lib:../../$OSG_INSTALL_DIR/lib:../../$SIMGEAR_INSTALL_DIR/lib:../../$OPENRTI_INSTALL_DIR/lib
|
2011-02-06 19:44:11 +00:00
|
|
|
gdb --directory="\$P1"/fgfs/source/src/ --args fgfs --fg-root=\$PWD/../fgdata/ \$@
|
|
|
|
ENDOFALL2
|
|
|
|
chmod 755 run_fgfs_debug.sh
|
|
|
|
|
|
|
|
SCRIPT=run_terrasync.sh
|
|
|
|
echo "#!/bin/sh" > $SCRIPT
|
|
|
|
echo "cd \$(dirname \$0)" >> $SCRIPT
|
|
|
|
echo "cd $SUB_INSTALL_DIR/$FGFS_INSTALL_DIR/bin" >> $SCRIPT
|
|
|
|
echo "export LD_LIBRARY_PATH=../../$PLIB_INSTALL_DIR/lib:../../$OSG_INSTALL_DIR/lib:../../$SIMGEAR_INSTALL_DIR/lib" >> $SCRIPT
|
|
|
|
echo "./terrasync \$@" >> $SCRIPT
|
|
|
|
chmod 755 $SCRIPT
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
2011-08-24 18:34:30 +00:00
|
|
|
#######################################################
|
|
|
|
# FGO!
|
|
|
|
#######################################################
|
|
|
|
FGO_INSTALL_DIR=fgo
|
|
|
|
INSTALL_DIR_FGO=$INSTALL_DIR/$FGO_INSTALL_DIR
|
|
|
|
cd "$CBD"
|
2013-06-06 00:41:01 +00:00
|
|
|
if [[ "$(declare -p WHATTOBUILD)" =~ '['([0-9]+)']="FGO"' ]]
|
2011-08-24 18:34:30 +00:00
|
|
|
then
|
|
|
|
echo "****************************************" | tee -a $LOGFILE
|
|
|
|
echo "***************** FGO ******************" | tee -a $LOGFILE
|
|
|
|
echo "****************************************" | tee -a $LOGFILE
|
|
|
|
|
|
|
|
if [ "$DOWNLOAD" = "y" ]
|
|
|
|
then
|
|
|
|
wget http://sites.google.com/site/erobosprojects/flightgear/add-ons/fgo/download/fgo-1-3-1.tar.gz?attredirects=0 -O fgo-1-3-1.tar.gz
|
|
|
|
cd install
|
|
|
|
tar zxvf ../fgo-1-3-1.tar.gz
|
|
|
|
|
|
|
|
cat fgo/src/gui.py | sed s/"self.process = subprocess.Popen".*/"self.process = subprocess.Popen(self.options, cwd=self.FG_working_dir,env=os.environ)"/g > fgo/src/gui.py-new
|
|
|
|
mv fgo/src/gui.py-new fgo/src/gui.py
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
SCRIPT=run_fgo.sh
|
|
|
|
echo "#!/bin/sh" > $SCRIPT
|
|
|
|
echo "cd \$(dirname \$0)" >> $SCRIPT
|
|
|
|
echo "cd $SUB_INSTALL_DIR" >> $SCRIPT
|
|
|
|
echo "p=\$(pwd)" >> $SCRIPT
|
|
|
|
echo "cd $FGO_INSTALL_DIR" >> $SCRIPT
|
|
|
|
echo "export LD_LIBRARY_PATH=\$p/plib/lib:\$p/OpenSceneGraph/lib:\$p/simgear/lib" >> $SCRIPT
|
|
|
|
echo "python fgo" >> $SCRIPT
|
|
|
|
chmod 755 $SCRIPT
|
|
|
|
|
|
|
|
fi
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2012-11-22 19:38:51 +00:00
|
|
|
#######################################################
|
|
|
|
# FGx
|
|
|
|
#######################################################
|
|
|
|
FGX_INSTALL_DIR=fgx
|
|
|
|
INSTALL_DIR_FGX=$INSTALL_DIR/$FGX_INSTALL_DIR
|
|
|
|
cd "$CBD"
|
2013-06-06 00:41:01 +00:00
|
|
|
if [[ "$(declare -p WHATTOBUILD)" =~ '['([0-9]+)']="FGX"' ]]
|
2012-11-22 19:38:51 +00:00
|
|
|
then
|
|
|
|
echo "****************************************" | tee -a $LOGFILE
|
|
|
|
echo "***************** FGX ******************" | tee -a $LOGFILE
|
|
|
|
echo "****************************************" | tee -a $LOGFILE
|
|
|
|
|
|
|
|
if [ "$DOWNLOAD" = "y" ]
|
|
|
|
then
|
|
|
|
|
|
|
|
echo -n "git clone git://gitorious.org/fgx/fgx.git ... " >> $LOGFILE
|
|
|
|
|
|
|
|
if [ -d "fgx" ]
|
|
|
|
then
|
|
|
|
echo "fgx exists already."
|
|
|
|
else
|
|
|
|
git clone git://gitorious.org/fgx/fgx.git fgx
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo " OK" >> $LOGFILE
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd fgx/
|
|
|
|
|
|
|
|
git branch -f $FGX_STABLE_GIT_BRANCH origin/$FGX_STABLE_GIT_BRANCH 2> /dev/null || true
|
|
|
|
git checkout -f $FGX_STABLE_GIT_BRANCH
|
|
|
|
git pull
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
cd fgx/src/
|
|
|
|
|
|
|
|
#Patch in order to pre-setting paths
|
|
|
|
cd resources/default/
|
|
|
|
cp x_default.ini x_default.ini.orig
|
|
|
|
cat x_default.ini | sed s/\\/usr\\/bin\\/fgfs/INSTALL_DIR_FGXMY_SLASH_HERE..MY_SLASH_HEREfgfsMY_SLASH_HEREbinMY_SLASH_HEREfgfs/g > tmp1
|
|
|
|
cat tmp1 | sed s/\\/usr\\/share\\/flightgear/INSTALL_DIR_FGXMY_SLASH_HERE..MY_SLASH_HEREfgfsMY_SLASH_HEREfgdata/g > tmp2
|
|
|
|
cat tmp2 | sed s/\\/usr\\/bin\\/terrasync/INSTALL_DIR_FGXMY_SLASH_HERE..MY_SLASH_HEREfgfsMY_SLASH_HEREbinMY_SLASH_HEREterrasync/g > tmp3
|
|
|
|
cat tmp3 | sed s/\\/usr\\/bin\\/fgcom/INSTALL_DIR_FGXMY_SLASH_HERE..MY_SLASH_HEREfgcomMY_SLASH_HEREbinMY_SLASH_HEREfgcom/g > tmp4
|
|
|
|
cat tmp4 | sed s/\\/usr\\/bin\\/js_demo/INSTALL_DIR_FGXMY_SLASH_HERE..MY_SLASH_HEREfgfsMY_SLASH_HEREbinMY_SLASH_HEREjs_demo/g > tmp5
|
|
|
|
|
|
|
|
INSTALL_DIR_FGX_NO_SLASHS=$(echo "$INSTALL_DIR_FGX" | sed -e 's/\//MY_SLASH_HERE/g')
|
|
|
|
cat tmp5 | sed s/INSTALL_DIR_FGX/"$INSTALL_DIR_FGX_NO_SLASHS"/g > tmp
|
|
|
|
cat tmp | sed s/MY_SLASH_HERE/\\//g > x_default.ini
|
|
|
|
rm tmp*
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! "$UPDATE" = "UPDATE" ]
|
|
|
|
then
|
|
|
|
if [ "$RECONFIGURE" = "y" ]
|
|
|
|
then
|
|
|
|
|
|
|
|
echo -n "RECONFIGURE FGX ... " >> $LOGFILE
|
|
|
|
|
|
|
|
mkdir -p $INSTALL_DIR_FGX
|
|
|
|
cd $INSTALL_DIR_FGX
|
|
|
|
|
|
|
|
qmake ../../fgx/src
|
|
|
|
|
|
|
|
echo " OK" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$COMPILE" = "y" ]
|
|
|
|
then
|
|
|
|
cd $INSTALL_DIR_FGX
|
|
|
|
echo "MAKE AND INSTALL FGX" >> $LOGFILE
|
|
|
|
echo "make $JOPTION $OOPTION " >> $LOGFILE
|
|
|
|
make $JOPTION $OOPTION | tee -a $LOGFILE
|
|
|
|
cd ..
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd "$CBD"
|
|
|
|
|
|
|
|
SCRIPT=run_fgx.sh
|
|
|
|
echo "#!/bin/sh" > $SCRIPT
|
|
|
|
echo "cd \$(dirname \$0)" >> $SCRIPT
|
|
|
|
echo "cd $SUB_INSTALL_DIR" >> $SCRIPT
|
|
|
|
echo "p=\$(pwd)" >> $SCRIPT
|
|
|
|
echo "cd $FGX_INSTALL_DIR" >> $SCRIPT
|
|
|
|
echo "export LD_LIBRARY_PATH=\$p/plib/lib:\$p/OpenSceneGraph/lib:\$p/simgear/lib" >> $SCRIPT
|
|
|
|
echo "./fgx" >> $SCRIPT
|
|
|
|
chmod 755 $SCRIPT
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
2011-02-06 19:44:11 +00:00
|
|
|
#######################################################
|
|
|
|
# FGRUN
|
|
|
|
#######################################################
|
|
|
|
FGRUN_INSTALL_DIR=fgrun
|
|
|
|
INSTALL_DIR_FGRUN=$INSTALL_DIR/$FGRUN_INSTALL_DIR
|
|
|
|
cd "$CBD"
|
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
if [[ "$(declare -p WHATTOBUILD)" =~ '['([0-9]+)']="FGRUN"' ]]
|
2011-02-06 19:44:11 +00:00
|
|
|
then
|
|
|
|
echo "****************************************" | tee -a $LOGFILE
|
|
|
|
echo "**************** FGRUN *****************" | tee -a $LOGFILE
|
|
|
|
echo "****************************************" | tee -a $LOGFILE
|
|
|
|
|
|
|
|
|
2012-11-01 12:28:51 +00:00
|
|
|
if [ "$DOWNLOAD" = "y" ]
|
2011-02-06 19:44:11 +00:00
|
|
|
then
|
2012-11-01 12:28:51 +00:00
|
|
|
#echo -n "CVS FROM cvs.flightgear.org:/var/cvs/FlightGear-0.9 ... " >> $LOGFILE
|
|
|
|
#cvs -z5 -d :pserver:cvsguest:guest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 login
|
|
|
|
#cvs -z5 -d :pserver:cvsguest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 co source
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2012-11-01 12:28:51 +00:00
|
|
|
echo -n "GIT FROM git://gitorious.org/fg/fgrun.git ... " >> $LOGFILE
|
|
|
|
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2012-11-01 12:28:51 +00:00
|
|
|
if [ -d "fgrun" ]
|
|
|
|
then
|
|
|
|
echo "fgrun exists already."
|
|
|
|
else
|
|
|
|
git clone git://gitorious.org/fg/fgrun.git fgrun
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd fgrun
|
|
|
|
|
|
|
|
git fetch origin
|
|
|
|
if [ "$STABLE" = "STABLE" ]
|
|
|
|
then
|
|
|
|
# switch to stable branch
|
|
|
|
# create local stable branch, ignore errors if it exists
|
|
|
|
ls
|
|
|
|
git branch -f $FGRUN_STABLE_GIT_BRANCH origin/$FGRUN_STABLE_GIT_BRANCH 2> /dev/null || true
|
|
|
|
# switch to stable branch. No error is reported if we're already on the branch.
|
|
|
|
git checkout -f $FGRUN_STABLE_GIT_BRANCH
|
|
|
|
# get indicated stable version
|
|
|
|
git reset --hard $FGRUN_STABLE_GIT_BRANCH
|
|
|
|
else
|
|
|
|
# switch to unstable branch
|
|
|
|
# create local unstable branch, ignore errors if it exists
|
|
|
|
git branch -f $FGRUN_UNSTABLE_GIT_BRANCH origin/$FGRUN_UNSTABLE_GIT_BRANCH 2> /dev/null || true
|
|
|
|
# switch to unstable branch. No error is reported if we're already on the branch.
|
|
|
|
git checkout -f $FGRUN_UNSTABLE_GIT_BRANCH
|
|
|
|
# pull latest version from the unstable branch
|
|
|
|
git pull
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo " OK" >> $LOGFILE
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd fgrun
|
2011-02-06 19:44:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
if [ ! "$UPDATE" = "UPDATE" ]
|
|
|
|
then
|
|
|
|
if [ "$RECONFIGURE" = "y" ]
|
|
|
|
then
|
2012-04-18 08:38:22 +00:00
|
|
|
cd "$CBD"
|
|
|
|
mkdir -p build/fgrun
|
|
|
|
cd "$CBD"/build/fgrun
|
|
|
|
|
2012-04-12 17:58:37 +00:00
|
|
|
echo -n "RECONFIGURE FGRUN ... " >> $LOGFILE
|
2012-11-01 12:28:51 +00:00
|
|
|
rm -f ../../fgrun/CMakeCache.txt
|
2012-04-12 17:58:37 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
cmake ${VERBOSE_MAKEFILE} -D CMAKE_BUILD_TYPE="Release" -D CMAKE_CXX_FLAGS="-O3 -D__STDC_CONSTANT_MACROS" -D CMAKE_C_FLAGS="-O3" -D CMAKE_INSTALL_PREFIX:PATH="$INSTALL_DIR_FGRUN" -D "CMAKE_PREFIX_PATH=$INSTALL_DIR_OSG;$INSTALL_DIR_PLIB;$INSTALL_DIR_SIMGEAR" ../../fgrun/ 2>&1 | tee -a $LOGFILE
|
2012-04-12 17:58:37 +00:00
|
|
|
|
|
|
|
echo " OK" >> $LOGFILE
|
2011-02-06 19:44:11 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$COMPILE" = "y" ]
|
|
|
|
then
|
2012-04-18 08:38:22 +00:00
|
|
|
cd "$CBD"/build/fgrun
|
|
|
|
|
2011-02-06 19:44:11 +00:00
|
|
|
echo "MAKE FGRUN" >> $LOGFILE
|
2011-05-19 18:20:53 +00:00
|
|
|
echo "make $JOPTION $OOPTION" >> $LOGFILE
|
|
|
|
make $JOPTION $OOPTION 2>1 | tee -a $LOGFILE
|
2011-02-06 19:44:11 +00:00
|
|
|
|
|
|
|
echo "INSTALL FGRUN" >> $LOGFILE
|
|
|
|
make install 2>&1 | tee -a $LOGFILE
|
|
|
|
fi
|
2012-04-18 08:38:22 +00:00
|
|
|
|
|
|
|
cd "$CBD"
|
2011-02-06 19:44:11 +00:00
|
|
|
|
|
|
|
SCRIPT=run_fgrun.sh
|
|
|
|
echo "#!/bin/sh" > $SCRIPT
|
|
|
|
echo "cd \$(dirname \$0)" >> $SCRIPT
|
|
|
|
echo "cd $SUB_INSTALL_DIR/$FGRUN_INSTALL_DIR/bin" >> $SCRIPT
|
|
|
|
echo "export LD_LIBRARY_PATH=../../$PLIB_INSTALL_DIR/lib:../../$OSG_INSTALL_DIR/lib:../../$SIMGEAR_INSTALL_DIR/lib" >> $SCRIPT
|
2012-01-03 21:04:42 +00:00
|
|
|
#echo "export FG_AIRCRAFTS=\$PWD/../../$FGFS_INSTALL_DIR/aircrafts" >> $SCRIPT
|
|
|
|
echo "./fgrun --fg-exe=\$PWD/../../$FGFS_INSTALL_DIR/bin/fgfs --fg-root=\$PWD/../../$FGFS_INSTALL_DIR/fgdata \$@" >> $SCRIPT
|
2011-02-06 19:44:11 +00:00
|
|
|
chmod 755 $SCRIPT
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
#######################################################
|
|
|
|
# FGCOM
|
|
|
|
#######################################################
|
|
|
|
FGCOM_INSTALL_DIR=fgcom
|
|
|
|
INSTALL_DIR_FGCOM=$INSTALL_DIR/$FGCOM_INSTALL_DIR
|
|
|
|
cd "$CBD"
|
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
if [[ "$(declare -p WHATTOBUILD)" =~ '['([0-9]+)']="FGCOM"' ]]
|
2011-02-06 19:44:11 +00:00
|
|
|
then
|
|
|
|
echo "****************************************" | tee -a $LOGFILE
|
|
|
|
echo "**************** FGCOM *****************" | tee -a $LOGFILE
|
|
|
|
echo "****************************************" | tee -a $LOGFILE
|
|
|
|
|
|
|
|
|
|
|
|
#svn checkout svn://svn.dfn.de:/fgcom/trunk fgcom
|
|
|
|
if [ "$DOWNLOAD" = "y" ]
|
|
|
|
then
|
|
|
|
|
|
|
|
FGCOM_STABLE_REVISION_=""
|
|
|
|
if [ "$STABLE" = "STABLE" ]
|
|
|
|
then
|
|
|
|
FGCOM_STABLE_REVISION_=" -r $FGCOM_STABLE_REVISION"
|
|
|
|
fi
|
|
|
|
|
2012-11-22 19:38:51 +00:00
|
|
|
echo -n "git://gitorious.org/fg/fgcom.git ... " >> $LOGFILE
|
|
|
|
|
|
|
|
if [ -d "fgcom" ]
|
|
|
|
then
|
|
|
|
echo "fgcom exists already."
|
|
|
|
else
|
|
|
|
git clone git://gitorious.org/fg/fgcom.git
|
|
|
|
fi
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2012-11-22 19:38:51 +00:00
|
|
|
cd fgcom
|
|
|
|
git fetch origin
|
|
|
|
if [ "$STABLE" = "STABLE" ]
|
|
|
|
then
|
|
|
|
# switch to stable branch
|
|
|
|
# create local stable branch, ignore errors if it exists
|
|
|
|
git branch -f $FGCOM_STABLE_FGOM_BRANCH origin/$FGCOM_STABLE_FGCOM_BRANCH 2> /dev/null || true
|
|
|
|
# switch to stable branch. No error is reported if we're already on the branch.
|
|
|
|
git checkout -f $FGCOM_STABLE_FGCOM_BRANCH
|
|
|
|
# get indicated stable version
|
|
|
|
git reset --hard $FGCOM_STABLE_REVISION
|
|
|
|
else
|
|
|
|
# switch to unstable branch
|
|
|
|
# create local unstable branch, ignore errors if it exists
|
|
|
|
git branch -f $FGCOM_UNSTABLE_GIT_BRANCH origin/$FGCOM_UNSTABLE_GIT_BRANCH 2> /dev/null || true
|
|
|
|
# switch to unstable branch. No error is reported if we're already on the branch.
|
|
|
|
git checkout -f $FGCOM_UNSTABLE_GIT_BRANCH
|
|
|
|
# pull latest version from the unstable branch
|
|
|
|
git pull
|
|
|
|
fi
|
|
|
|
|
2011-02-06 19:44:11 +00:00
|
|
|
echo " OK" >> $LOGFILE
|
2012-11-22 19:38:51 +00:00
|
|
|
cd ..
|
2013-06-06 00:41:01 +00:00
|
|
|
|
2011-02-06 19:44:11 +00:00
|
|
|
#patch for new netdb.h version.
|
|
|
|
cat fgcom/iaxclient/lib/libiax2/src/iax.c | sed s/hp-\>h_addr,/hp-\>h_addr_list[0],/g > fgcom/iaxclient/lib/libiax2/src/iax_ok.c
|
|
|
|
mv fgcom/iaxclient/lib/libiax2/src/iax_ok.c fgcom/iaxclient/lib/libiax2/src/iax.c
|
|
|
|
fi
|
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
cd "$CBD"
|
|
|
|
if [ -d "fgcom" ]
|
2011-02-06 19:44:11 +00:00
|
|
|
then
|
2013-06-06 00:41:01 +00:00
|
|
|
if [ "$RECONFIGURE" = "y" ]
|
|
|
|
then
|
|
|
|
cd "$CBD"
|
|
|
|
mkdir -p build/fgcom
|
2012-11-22 19:38:51 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
cd "$CBD"/build/fgcom
|
|
|
|
echo -n "RECONFIGURE FGCOM ... " >> $LOGFILE
|
|
|
|
rm -f CMakeCache.txt
|
|
|
|
cmake ${VERBOSE_MAKEFILE} -D CMAKE_BUILD_TYPE="Release" -D "CMAKE_PREFIX_PATH=$INSTALL_DIR_PLIB;$INSTALL_DIR_SIMGEAR" -D "CMAKE_INSTALL_PREFIX:PATH=$INSTALL_DIR_FGCOM" "$CBD"/fgcom 2>&1 | tee -a $LOGFILE
|
2012-11-22 19:38:51 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
echo " OK" >> $LOGFILE
|
2012-11-22 19:38:51 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
cd "$CBD"/fgcom/src/
|
2012-11-22 19:38:51 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
cp Makefile Makefile.original
|
|
|
|
cat Makefile | sed s/\\//MY_SLASH_HERE/g > Makefile_NOSLASHES
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
# 1
|
|
|
|
INSTALL_DIR_PLIB_NO_SLASHES=$(echo "$INSTALL_DIR_PLIB" | sed -e 's/\//MY_SLASH_HERE/g')
|
|
|
|
cat Makefile_NOSLASHES | sed s/PLIB_PREFIX\ *:=\ *MY_SLASH_HEREusrMY_SLASH_HERElocalMY_SLASH_HEREsrcMY_SLASH_HEREfgfs-builderMY_SLASH_HEREinstall/PLIB_PREFIX\ :=\ $INSTALL_DIR_PLIB_NO_SLASHES/g > Makefile_temp
|
|
|
|
mv -f Makefile_temp Makefile_NOSLASHES
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
#2
|
|
|
|
CXXFLAGS=$(cat Makefile_NOSLASHES | grep ^CXXFLAGS | head -n 1)
|
|
|
|
CXXFLAGS2=$CXXFLAGS" -I $INSTALL_DIR_SIMGEAR/include -I $INSTALL_DIR_OSG/include"
|
|
|
|
CXXFLAGS3=$(echo $CXXFLAGS2 | sed s/\\//MY_SLASH_HERE/g)
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
cat Makefile_NOSLASHES | sed s/^CXXFLAGS\ *:=.*/"$CXXFLAGS3"/g > Makefile_temp
|
|
|
|
mv -f Makefile_temp Makefile_NOSLASHES
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
#3
|
|
|
|
LDFLAGS=$(cat Makefile_NOSLASHES | grep ^LDFLAGS | head -n 1)
|
|
|
|
LDFLAGS2=$LDFLAGS" -L $INSTALL_DIR_SIMGEAR/lib"
|
|
|
|
LDFLAGS3=$(echo $LDFLAGS2 | sed s/\\//MY_SLASH_HERE/g)
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
cat Makefile_NOSLASHES | sed s/^LDFLAGS.*/"$LDFLAGS3"/g > Makefile_temp
|
|
|
|
mv -f Makefile_temp Makefile_NOSLASHES
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
#4
|
|
|
|
INSTALL_DIR_FGCOM_NO_SLASHS=$(echo "$INSTALL_DIR_FGCOM" | sed -e 's/\//MY_SLASH_HERE/g')
|
|
|
|
INSTALL_BIN_FGCOM_NO_SLASHS="$INSTALL_DIR_FGCOM_NO_SLASHS""MY_SLASH_HEREbin"
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
cat Makefile_NOSLASHES | sed s/INSTALL_BIN\ *:=\ *MY_SLASH_HEREusrMY_SLASH_HERElocalMY_SLASH_HEREbin/INSTALL_BIN\ :=\ $INSTALL_BIN_FGCOM_NO_SLASHS/g > Makefile_temp
|
|
|
|
mv -f Makefile_temp Makefile_NOSLASHES
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
cat Makefile_NOSLASHES | sed s/INSTALL_DIR\ *:=\ *MY_SLASH_HEREusrMY_SLASH_HERElocal/INSTALL_DIR\ :=\ $INSTALL_DIR_FGCOM_NO_SLASHS/g > Makefile_temp
|
|
|
|
mv -f Makefile_temp Makefile_NOSLASHES
|
2011-02-06 19:44:11 +00:00
|
|
|
|
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
#last
|
|
|
|
cat Makefile_NOSLASHES | sed s/MY_SLASH_HERE/\\//g > Makefile
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
fi
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
cd "$CBD"/build/fgcom
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
mkdir -p "$INSTALL_DIR_FGCOM"/bin
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
if [ "$COMPILE" = "y" ]
|
|
|
|
then
|
|
|
|
echo "MAKE FGCOM" >> $LOGFILE
|
|
|
|
echo "cmake --build . --config Release" >> $LOGFILE
|
|
|
|
cmake --build . --config Release 2>&1 | tee -a $LOGFILE
|
2012-11-22 19:38:51 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
echo "INSTALL FGCOM" >> $LOGFILE
|
|
|
|
cmake ${VERBOSE_MAKEFILE} -DBUILD_TYPE=Release -P cmake_install.cmake 2>&1 | tee -a $LOGFILE
|
|
|
|
fi
|
|
|
|
cd "$CBD"
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
echo "#!/bin/sh" > run_fgcom.sh
|
|
|
|
echo "cd \$(dirname \$0)" >> run_fgcom.sh
|
|
|
|
echo "cd $SUB_INSTALL_DIR/$FGCOM_INSTALL_DIR/bin" >> run_fgcom.sh
|
|
|
|
echo "export LD_LIBRARY_PATH=../../$PLIB_INSTALL_DIR/lib:../../$OSG_INSTALL_DIR/lib:../../$SIMGEAR_INSTALL_DIR/lib" >> run_fgcom.sh
|
|
|
|
echo "./fgcom -Sfgcom.flightgear.org.uk \$@" >> run_fgcom.sh
|
|
|
|
chmod 755 run_fgcom.sh
|
|
|
|
fi
|
2011-02-06 19:44:11 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
#######################################################
|
|
|
|
# FGCOMGUI
|
|
|
|
#######################################################
|
|
|
|
FGCOMGUI_INSTALL_DIR=fgcomgui
|
|
|
|
INSTALL_DIR_FGCOMGUI=$INSTALL_DIR/$FGCOMGUI_INSTALL_DIR
|
|
|
|
cd "$CBD"
|
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
if [[ "$(declare -p WHATTOBUILD)" =~ '['([0-9]+)']="FGCOMGUI"' ]]
|
2011-02-06 19:44:11 +00:00
|
|
|
then
|
|
|
|
echo "****************************************" | tee -a $LOGFILE
|
|
|
|
echo "*************** FGCOMGUI ***************" | tee -a $LOGFILE
|
|
|
|
echo "****************************************" | tee -a $LOGFILE
|
|
|
|
|
|
|
|
|
|
|
|
#svn checkout svn://svn.dfn.de:/fgcom/trunk fgcom
|
|
|
|
if [ "$DOWNLOAD" = "y" ]
|
|
|
|
then
|
|
|
|
FGCOMGUI_STABLE_REVISION_=""
|
|
|
|
if [ "$STABLE" = "STABLE" ]
|
|
|
|
then
|
|
|
|
FGCOMGUI_STABLE_REVISION_=" -r $FGCOMGUI_STABLE_REVISION"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo -n "SVN FROM https://fgcomgui.googlecode.com/svn/trunk ... " >> $LOGFILE
|
|
|
|
svn $FGCOMGUI_STABLE_REVISION_ co https://fgcomgui.googlecode.com/svn/trunk fgcomgui
|
|
|
|
echo " OK" >> $LOGFILE
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
if [ -d "fgcomgui" ]
|
2011-02-06 19:44:11 +00:00
|
|
|
then
|
2013-06-06 00:41:01 +00:00
|
|
|
cd fgcomgui/
|
|
|
|
|
|
|
|
mkdir -p "$INSTALL_DIR_FGCOMGUI"
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
if [ "$COMPILE" = "y" ]
|
|
|
|
then
|
|
|
|
echo "SCONS FGCOMGUI" >> $LOGFILE
|
|
|
|
echo "scons prefix=\"$INSTALL_DIR_FGCOMGUI\" $JOPTION" >> $LOGFILE
|
|
|
|
scons prefix="$INSTALL_DIR_FGCOMGUI" $JOPTION 2>&1 | tee -a $LOGFILE
|
|
|
|
echo "INSTALL FGCOM" >> $LOGFILE
|
|
|
|
scons install 2>&1 | tee -a $LOGFILE
|
|
|
|
fi
|
|
|
|
cd "$CBD"
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
echo "#!/bin/sh" > run_fgcomgui.sh
|
|
|
|
echo "cd \$(dirname \$0)" >> run_fgcomgui.sh
|
|
|
|
echo "cd $SUB_INSTALL_DIR/$FGCOMGUI_INSTALL_DIR/bin" >> run_fgcomgui.sh
|
|
|
|
echo "export LD_LIBRARY_PATH=../../$PLIB_INSTALL_DIR/lib:../../$OSG_INSTALL_DIR/lib:../../$SIMGEAR_INSTALL_DIR/lib" >> run_fgcomgui.sh
|
|
|
|
echo "export PATH=../../fgcom/bin/:$PATH" >> run_fgcomgui.sh
|
|
|
|
echo "./fgcomgui \$@" >> run_fgcomgui.sh
|
|
|
|
chmod 755 run_fgcomgui.sh
|
|
|
|
fi
|
2011-02-06 19:44:11 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
#######################################################
|
|
|
|
# ATLAS
|
|
|
|
#######################################################
|
|
|
|
ATLAS_INSTALL_DIR=atlas
|
|
|
|
INSTALL_DIR_ATLAS=$INSTALL_DIR/$ATLAS_INSTALL_DIR
|
|
|
|
cd "$CBD"
|
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
if [[ "$(declare -p WHATTOBUILD)" =~ '['([0-9]+)']="ATLAS"' ]]
|
2011-02-06 19:44:11 +00:00
|
|
|
then
|
|
|
|
echo "****************************************" | tee -a $LOGFILE
|
|
|
|
echo "**************** ATLAS *****************" | tee -a $LOGFILE
|
|
|
|
echo "****************************************" | tee -a $LOGFILE
|
|
|
|
|
|
|
|
if [ "$DOWNLOAD" = "y" ]
|
|
|
|
then
|
|
|
|
echo -n "CSV FROM atlas.cvs.sourceforge.net:/cvsroot/atlas ... " >> $LOGFILE
|
|
|
|
cvs -z3 -d:pserver:anonymous@atlas.cvs.sourceforge.net:/cvsroot/atlas co Atlas
|
|
|
|
echo " OK" >> $LOGFILE
|
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
echo "fixing old function name \".get_gbs_center2(\" in Subbucket.cxx"
|
|
|
|
cd Atlas/src
|
|
|
|
cp Subbucket.cxx Subbucket.cxx.original
|
|
|
|
cat Subbucket.cxx.original | sed s/\.get_gbs_center2\(/\.get_gbs_center\(/g > Subbucket.cxx
|
|
|
|
cd "$CBD"
|
2011-02-06 19:44:11 +00:00
|
|
|
fi
|
2013-06-06 00:41:01 +00:00
|
|
|
|
|
|
|
if [ -d "Atlas" ]
|
2011-02-06 19:44:11 +00:00
|
|
|
then
|
2013-06-06 00:41:01 +00:00
|
|
|
cd Atlas
|
|
|
|
|
|
|
|
if [ ! "$UPDATE" = "UPDATE" ]
|
2011-02-06 19:44:11 +00:00
|
|
|
then
|
2013-06-06 00:41:01 +00:00
|
|
|
if [ "$RECONFIGURE" = "y" ]
|
|
|
|
then
|
2012-04-18 08:38:22 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
cd "$CBD"
|
|
|
|
mkdir -p build/atlas
|
2012-04-18 08:38:22 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
cd Atlas
|
|
|
|
echo "AUTOGEN ATLAS" >> $LOGFILE
|
|
|
|
./autogen.sh 2>&1 | tee -a $LOGFILE
|
|
|
|
echo "CONFIGURE ATLAS" >> $LOGFILE
|
|
|
|
cd "$CBD"/build/atlas
|
|
|
|
../../Atlas/configure --prefix=$INSTALL_DIR_ATLAS --exec-prefix=$INSTALL_DIR_ATLAS --with-plib=$INSTALL_DIR_PLIB --with-simgear="$INSTALL_DIR_SIMGEAR" --with-fgbase="$INSTALL_DIR_FGFS/fgdata" CXXFLAGS="$CXXFLAGS -I$CBD/OpenSceneGraph/include" 2>&1 | tee -a $LOGFILE
|
|
|
|
make clean
|
|
|
|
fi
|
2011-02-06 19:44:11 +00:00
|
|
|
fi
|
2013-06-06 00:41:01 +00:00
|
|
|
if [ "$COMPILE" = "y" ]
|
|
|
|
then
|
|
|
|
echo "MAKE ATLAS" >> $LOGFILE
|
|
|
|
echo "make $JOPTION $OOPTION" >> $LOGFILE
|
2012-04-18 08:38:22 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
cd "$CBD"/build/atlas
|
|
|
|
make $JOPTION $OOPTION 2>&1 | tee -a $LOGFILE
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
echo "INSTALL ATLAS" >> $LOGFILE
|
|
|
|
make install 2>&1 | tee -a $LOGFILE
|
|
|
|
fi
|
|
|
|
cd "$CBD"
|
2011-02-06 19:44:11 +00:00
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
echo "#!/bin/sh" > run_atlas.sh
|
|
|
|
echo "cd \$(dirname \$0)" >> run_atlas.sh
|
|
|
|
echo "cd $SUB_INSTALL_DIR/$ATLAS_INSTALL_DIR/bin" >> run_atlas.sh
|
|
|
|
echo "export LD_LIBRARY_PATH=../../$PLIB_INSTALL_DIR/lib:../../$OSG_INSTALL_DIR/lib:../../$SIMGEAR_INSTALL_DIR/lib" >> run_atlas.sh
|
|
|
|
echo "./Atlas --fg-root=\$PWD/../../$FGFS_INSTALL_DIR/fgdata \$@" >> run_atlas.sh
|
|
|
|
chmod 755 run_atlas.sh
|
|
|
|
fi
|
2011-02-06 19:44:11 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo "To start fgfs, run the run_fgfs.sh file"
|
|
|
|
echo "To start terrasync, run the run_terrasync.sh file"
|
|
|
|
echo "To start fgrun, run the run_fgrun.sh file"
|
|
|
|
echo "To start fgcom, run the run_fgcom.sh file"
|
|
|
|
echo "To start fgcom GUI, run the run_fgcomgui.sh file"
|
|
|
|
echo "To start atlas, run the run_atlas.sh file"
|
|
|
|
|
2013-06-06 00:41:01 +00:00
|
|
|
if [ "$HELP" = "HELP" ]
|
2011-02-06 19:44:11 +00:00
|
|
|
then
|
|
|
|
echo ""
|
|
|
|
else
|
|
|
|
echo "Usage: $0 -h"
|
|
|
|
echo "for help"
|
|
|
|
fi
|