Version 1.9.12 see release notes on
http://wiki.flightgear.org/Scripted_Compilation_on_Linux_Debian/Ubuntu
This commit is contained in:
parent
1e183ed9de
commit
75f1a35520
1 changed files with 211 additions and 71 deletions
|
@ -17,7 +17,7 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
VERSION="1.9-10"
|
VERSION="1.9-12"
|
||||||
|
|
||||||
#COMPILE GIT FGFS
|
#COMPILE GIT FGFS
|
||||||
|
|
||||||
|
@ -31,6 +31,17 @@ VERSION="1.9-10"
|
||||||
# Thanks again to "F-JJTH" for OpenRTI and FGX
|
# Thanks again to "F-JJTH" for OpenRTI and FGX
|
||||||
# Thanks to André, ( taureau89_9 ) for debian stable packages fixes
|
# Thanks to André, ( taureau89_9 ) for debian stable packages fixes
|
||||||
|
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
# Script Section: Script and Option Initialization
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
echo $0 $* >rebuild
|
||||||
|
chmod +x rebuild
|
||||||
|
|
||||||
|
|
||||||
|
function SET_WINDOW_TITLE(){
|
||||||
|
echo -ne "\033]0;Build Flightgear: - ${CBD} - $1\007"
|
||||||
|
}
|
||||||
|
|
||||||
LOGFILE=compilation_log.txt
|
LOGFILE=compilation_log.txt
|
||||||
LOGSEP="***********************************"
|
LOGSEP="***********************************"
|
||||||
|
|
||||||
|
@ -51,14 +62,37 @@ OOPTION=""
|
||||||
DEBUG=""
|
DEBUG=""
|
||||||
WITH_EVENT_INPUT=""
|
WITH_EVENT_INPUT=""
|
||||||
WITH_OPENRTI=""
|
WITH_OPENRTI=""
|
||||||
|
FG_SG_BRANCH="next"
|
||||||
|
FG_SG_REVISION="HEAD"
|
||||||
|
OSG_VERSION="3.0.1"
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
# Script Section: Option Interpretation
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
SET_WINDOW_TITLE "Script and Option Initialization"
|
||||||
|
|
||||||
while getopts "suhgeixvwc:p:a:d:r:j:O:" OPTION
|
while getopts "suhgeixvwc:p:a:d:r:j:O:B:R:G:" OPTION
|
||||||
do
|
do
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
s)
|
s)
|
||||||
STABLE="STABLE"
|
STABLE="STABLE"
|
||||||
|
FG_SG_BRANCH="2.10.0"
|
||||||
|
FG_SG_REVISION="HEAD"
|
||||||
;;
|
;;
|
||||||
u)
|
B)
|
||||||
|
FG_SG_BRANCH=$OPTARG
|
||||||
|
;;
|
||||||
|
R)
|
||||||
|
FG_SG_REVISION=$OPTARG
|
||||||
|
;;
|
||||||
|
G)
|
||||||
|
OSG_VERSION=${OPTARG^^} #3.0.1, 3.0.1d 3.1.9 3.1.9d, next nextd, etc
|
||||||
|
OSG_DEBUG_OR_RELEASE='Release'
|
||||||
|
if [[ ${OSG_VERSION%d} != ${OSG_VERSION} ]]
|
||||||
|
then
|
||||||
|
OSG_DEBUG_OR_RELEASE='Debug'
|
||||||
|
OSG_VERSION= ${OSG_VERSION%d}
|
||||||
|
fi
|
||||||
|
;; u)
|
||||||
UPDATE="UPDATE"
|
UPDATE="UPDATE"
|
||||||
;;
|
;;
|
||||||
h)
|
h)
|
||||||
|
@ -110,6 +144,14 @@ do
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
# Script Section: Build Argument Interpretation
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
SET_WINDOW_TITLE "Option Interpretation"
|
||||||
|
|
||||||
|
|
||||||
shift $(($OPTIND - 1))
|
shift $(($OPTIND - 1))
|
||||||
#printf "Remaining arguments are: %s\n" "$*"
|
#printf "Remaining arguments are: %s\n" "$*"
|
||||||
#printf "Num: %d\n" "$#"
|
#printf "Num: %d\n" "$#"
|
||||||
|
@ -137,39 +179,60 @@ fi
|
||||||
|
|
||||||
#printf "%s\n" "${WHATTOBUILD[@]}"
|
#printf "%s\n" "${WHATTOBUILD[@]}"
|
||||||
|
|
||||||
#######################################################
|
# ---------------------------------------------------------
|
||||||
# Last stable revision: currently FlightGear 2.4.0 with 3.0.1
|
# Script Section: Set Source Archive Version Variables
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
|
||||||
|
# Last stable revision: currently FlightGear 2.10.0 with 3.0.1
|
||||||
PLIB_STABLE_REVISION="2172"
|
PLIB_STABLE_REVISION="2172"
|
||||||
OSG_STABLE_REVISION="http://svn.openscenegraph.org/osg/OpenSceneGraph/tags/OpenSceneGraph-3.0.1/"
|
OSG_SVN="http://svn.openscenegraph.org/osg/OpenSceneGraph/tags/OpenSceneGraph-${OSG_VERSION}/"
|
||||||
|
|
||||||
# common stable branch for flightgear, simgear and fgdata
|
declare -A OPENRTI_MAP
|
||||||
FGSG_STABLE_GIT_BRANCH="release/2.8.0"
|
declare -A FGSG_MAP
|
||||||
FGRUN_STABLE_GIT_BRANCH="master"
|
FGSG_MAP=( [next]="next HEAD 2.99.9" \
|
||||||
OPENRTI_STABLE_GIT_BRANCH="release-0.3"
|
[master]="master HEAD 2.12.0" \
|
||||||
|
[2.12.0]="release/2.12.0 HEAD 2.12.0" \
|
||||||
|
[2.10.0]="release/2.10.0 HEAD 2.10.0" \
|
||||||
|
[2.8.0]="release/2.8.0 version/2.8.0-final 2.8.0" )
|
||||||
|
|
||||||
# unstable branch: next for sg/fg, master for fgdata
|
OPENRTI_MAP=( [next]="master HEAD" \
|
||||||
FGSG_UNSTABLE_GIT_BRANCH="next"
|
[master]="master HEAD" \
|
||||||
FGDATA_UNSTABLE_GIT_BRANCH="master"
|
[2.12.0]="master HEAD" \
|
||||||
FGRUN_UNSTABLE_GIT_BRANCH="master"
|
[2.10.0]="master HEAD" \
|
||||||
OPENRTI_UNSTABLE_GIT_BRANCH="master"
|
[2.8.0]="release-0.3 OpenRTI-0.3.0" )
|
||||||
|
|
||||||
# stable GIT revision: release tag
|
FG_SG_VERSION=${FG_SG_BRANCH##*/}
|
||||||
SIMGEAR_STABLE_REVISION="version/2.8.0-final"
|
|
||||||
FGFS_STABLE_REVISION="version/2.8.0-final"
|
MAP_ITEM=( ${FGSG_MAP[${FG_SG_VERSION}]} )
|
||||||
FGFS_DATA_STABLE_REVISION="version/2.8.0-final"
|
FG_SG_BRANCH=${MAP_ITEM[0]}
|
||||||
OPENRTI_STABLE_REVISION="OpenRTI-0.3.0"
|
FG_SG_REVISION=${MAP_ITEM[1]}
|
||||||
|
FGDATA_BRANCH=${MAP_ITEM[0]}
|
||||||
|
FGDATA_REVISION=${MAP_ITEM[1]}
|
||||||
|
FGDATA_VERSION=${MAP_ITEM[2]}
|
||||||
|
|
||||||
|
MAP_ITEM=( ${OPENRTI_MAP[${FG_SG_VERSION}]} )
|
||||||
|
OPENRTI_BRANCH=${MAP_ITEM[0]}
|
||||||
|
OPENRTI_REVISION=${MAP_ITEM[1]}
|
||||||
|
|
||||||
# FGCOM
|
# FGCOM
|
||||||
FGCOM_UNSTABLE_GIT_BRANCH="master"
|
FGCOM_BRANCH="master"
|
||||||
FGCOMGUI_STABLE_REVISION="46"
|
FGCOMGUI_STABLE_REVISION="46"
|
||||||
|
|
||||||
# Current developer revision: latest FlightGear GIT (2.5.0) with OSG 3.0.1
|
#OpenRadar
|
||||||
OSG_UNSTABLE_REVISION="http://svn.openscenegraph.org/osg/OpenSceneGraph/tags/OpenSceneGraph-3.0.1/"
|
OR_STABLE_RELEASE="http://wagnerw.de/OpenRadar.zip"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
# Script Section: set script to stop if an error occours
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
|
||||||
#######################################################
|
|
||||||
# set script to stop if an error occours
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
# Script Section: Display Script Help
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
|
||||||
if [ "$HELP" = "HELP" ]
|
if [ "$HELP" = "HELP" ]
|
||||||
then
|
then
|
||||||
echo "$0 Version $VERSION"
|
echo "$0 Version $VERSION"
|
||||||
|
@ -192,12 +255,17 @@ then
|
||||||
echo "* -O X Add -OX to the make compilation default=None"
|
echo "* -O X Add -OX to the make compilation default=None"
|
||||||
echo "* -r y|n y=reconfigure programs before compiling them n=do not reconfigure default=y"
|
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"
|
echo "* -s compile only last stable known versions default=y"
|
||||||
|
echo "* -w cmake verbose option"
|
||||||
|
echo "* -x set -x bash option"
|
||||||
|
echo "* -v set -v bash option"
|
||||||
|
echo "* -B branch"
|
||||||
|
echo "* -R revision"
|
||||||
|
echo "* -G osg version"
|
||||||
|
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#######################################################
|
# --------------------------------------------
|
||||||
#######################################################
|
|
||||||
# Warning about compilation time and size
|
# Warning about compilation time and size
|
||||||
# Idea from Jester
|
# Idea from Jester
|
||||||
echo "**************************************"
|
echo "**************************************"
|
||||||
|
@ -211,8 +279,12 @@ echo "* Please, be patient ...... *"
|
||||||
echo "* *"
|
echo "* *"
|
||||||
echo "**************************************"
|
echo "**************************************"
|
||||||
|
|
||||||
#######################################################
|
|
||||||
#######################################################
|
# ---------------------------------------------------------
|
||||||
|
# Script Section: Debian Backports
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
# Debian 4.0rX (Etch) backports.org
|
# Debian 4.0rX (Etch) backports.org
|
||||||
# From D-HUND
|
# From D-HUND
|
||||||
|
|
||||||
|
@ -249,9 +321,12 @@ if [ "$ISSUE" = "Debian GNU/Linux 4.0 \n \l" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
#######################################################
|
|
||||||
#######################################################
|
|
||||||
|
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
# Script Section: Display Options Chosen
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
echo $0 $* > $LOGFILE
|
echo $0 $* > $LOGFILE
|
||||||
|
|
||||||
echo "APT_GET_UPDATE=$APT_GET_UPDATE" >> $LOGFILE
|
echo "APT_GET_UPDATE=$APT_GET_UPDATE" >> $LOGFILE
|
||||||
|
@ -264,8 +339,10 @@ echo "OOPTION=$OOPTION" >> $LOGFILE
|
||||||
echo "DEBUG=$DEBUG" >> $LOGFILE
|
echo "DEBUG=$DEBUG" >> $LOGFILE
|
||||||
|
|
||||||
echo "$LOGSEP" >> $LOGFILE
|
echo "$LOGSEP" >> $LOGFILE
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
# Script Section: Determine Linux Distribution
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
|
||||||
# discovering linux
|
|
||||||
if [ -e /etc/lsb-release ]
|
if [ -e /etc/lsb-release ]
|
||||||
then
|
then
|
||||||
. /etc/lsb-release
|
. /etc/lsb-release
|
||||||
|
@ -299,6 +376,12 @@ else
|
||||||
fi
|
fi
|
||||||
echo "$LOGSEP" >> $LOGFILE
|
echo "$LOGSEP" >> $LOGFILE
|
||||||
|
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
# Script Section: Install Prerequisite Development Packages
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
SET_WINDOW_TITLE "Install Prerequisite Development Packages"
|
||||||
|
|
||||||
|
|
||||||
if [ "$DOWNLOAD_PACKAGES" = "y" ]
|
if [ "$DOWNLOAD_PACKAGES" = "y" ]
|
||||||
then
|
then
|
||||||
echo -n "PACKAGE INSTALLATION ... " >> $LOGFILE
|
echo -n "PACKAGE INSTALLATION ... " >> $LOGFILE
|
||||||
|
@ -334,6 +417,12 @@ then
|
||||||
echo " OK" >> $LOGFILE
|
echo " OK" >> $LOGFILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------------------------------
|
||||||
|
# Script Section: Create Required Build and install Directories
|
||||||
|
# -------------------------------------------------------------
|
||||||
|
SET_WINDOW_TITLE "Create Required Build and install Directories"
|
||||||
|
|
||||||
COMPILE_BASE_DIR=.
|
COMPILE_BASE_DIR=.
|
||||||
|
|
||||||
#cd into compile base directory
|
#cd into compile base directory
|
||||||
|
@ -347,10 +436,7 @@ LOGFILE=$CBD/$LOGFILE
|
||||||
echo "DIRECTORY= $CBD" >> $LOGFILE
|
echo "DIRECTORY= $CBD" >> $LOGFILE
|
||||||
echo "$LOGSEP" >> $LOGFILE
|
echo "$LOGSEP" >> $LOGFILE
|
||||||
|
|
||||||
if [ ! -d install ]
|
mkdir -p install
|
||||||
then
|
|
||||||
mkdir install
|
|
||||||
fi
|
|
||||||
|
|
||||||
SUB_INSTALL_DIR=install
|
SUB_INSTALL_DIR=install
|
||||||
INSTALL_DIR=$CBD/$SUB_INSTALL_DIR
|
INSTALL_DIR=$CBD/$SUB_INSTALL_DIR
|
||||||
|
@ -359,6 +445,11 @@ INSTALL_DIR=$CBD/$SUB_INSTALL_DIR
|
||||||
cd "$CBD"
|
cd "$CBD"
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
|
|
||||||
|
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
# Script Section: Build Components
|
||||||
|
# ---------------------------------------------------------
|
||||||
|
|
||||||
#######################################################
|
#######################################################
|
||||||
# PLIB
|
# PLIB
|
||||||
#######################################################
|
#######################################################
|
||||||
|
@ -376,6 +467,7 @@ then
|
||||||
echo "****************************************" | tee -a $LOGFILE
|
echo "****************************************" | tee -a $LOGFILE
|
||||||
echo "**************** PLIB ******************" | tee -a $LOGFILE
|
echo "**************** PLIB ******************" | tee -a $LOGFILE
|
||||||
echo "****************************************" | tee -a $LOGFILE
|
echo "****************************************" | tee -a $LOGFILE
|
||||||
|
SET_WINDOW_TITLE "Building PLIB"
|
||||||
|
|
||||||
echo "COMPILING PLIB" >> $LOGFILE
|
echo "COMPILING PLIB" >> $LOGFILE
|
||||||
echo "INSTALL_DIR_PLIB=$INSTALL_DIR_PLIB" >> $LOGFILE
|
echo "INSTALL_DIR_PLIB=$INSTALL_DIR_PLIB" >> $LOGFILE
|
||||||
|
@ -452,6 +544,7 @@ fi
|
||||||
#######################################################
|
#######################################################
|
||||||
# OpenSceneGraph
|
# OpenSceneGraph
|
||||||
#######################################################
|
#######################################################
|
||||||
|
SET_WINDOW_TITLE "Building OpenSceneGraph"
|
||||||
OSG_INSTALL_DIR=OpenSceneGraph
|
OSG_INSTALL_DIR=OpenSceneGraph
|
||||||
INSTALL_DIR_OSG=$INSTALL_DIR/$OSG_INSTALL_DIR
|
INSTALL_DIR_OSG=$INSTALL_DIR/$OSG_INSTALL_DIR
|
||||||
cd "$CBD"
|
cd "$CBD"
|
||||||
|
@ -462,13 +555,6 @@ then
|
||||||
echo "**************** OSG *******************" | tee -a $LOGFILE
|
echo "**************** OSG *******************" | tee -a $LOGFILE
|
||||||
echo "****************************************" | tee -a $LOGFILE
|
echo "****************************************" | tee -a $LOGFILE
|
||||||
|
|
||||||
OSG_SVN=$OSG_UNSTABLE_REVISION
|
|
||||||
if [ "$STABLE" = "STABLE" ]
|
|
||||||
then
|
|
||||||
OSG_SVN=$OSG_STABLE_REVISION
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if [ "$DOWNLOAD" = "y" ]
|
if [ "$DOWNLOAD" = "y" ]
|
||||||
then
|
then
|
||||||
echo -n "SVN FROM $OSG_SVN ... " >> $LOGFILE
|
echo -n "SVN FROM $OSG_SVN ... " >> $LOGFILE
|
||||||
|
@ -530,6 +616,7 @@ fi
|
||||||
#######################################################
|
#######################################################
|
||||||
# OPENRTI
|
# OPENRTI
|
||||||
#######################################################
|
#######################################################
|
||||||
|
SET_WINDOW_TITLE "Building OPENRTI"
|
||||||
OPENRTI_INSTALL_DIR=openrti
|
OPENRTI_INSTALL_DIR=openrti
|
||||||
INSTALL_DIR_OPENRTI=$INSTALL_DIR/$OPENRTI_INSTALL_DIR
|
INSTALL_DIR_OPENRTI=$INSTALL_DIR/$OPENRTI_INSTALL_DIR
|
||||||
cd "$CBD"
|
cd "$CBD"
|
||||||
|
@ -566,17 +653,17 @@ then
|
||||||
then
|
then
|
||||||
# switch to stable branch
|
# switch to stable branch
|
||||||
# create local stable branch, ignore errors if it exists
|
# 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
|
git branch -f $OPENRTI_BRANCH origin/$OPENRTI_BRANCH 2> /dev/null || true
|
||||||
# switch to stable branch. No error is reported if we're already on the branch.
|
# switch to stable branch. No error is reported if we're already on the branch.
|
||||||
git checkout -f $OPENRTI_STABLE_GIT_BRANCH
|
git checkout -f $OPENRTI_BRANCH
|
||||||
# get indicated stable version
|
# get indicated stable version
|
||||||
git reset --hard $OPENRTI_STABLE_REVISION
|
git reset --hard $OPENRTI_REVISION
|
||||||
else
|
else
|
||||||
# switch to unstable branch
|
# switch to unstable branch
|
||||||
# create local unstable branch, ignore errors if it exists
|
# 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
|
git branch -f $OPENRTI_BRANCH origin/$OPENRTI_BRANCH 2> /dev/null || true
|
||||||
# switch to unstable branch. No error is reported if we're already on the branch.
|
# switch to unstable branch. No error is reported if we're already on the branch.
|
||||||
git checkout -f $OPENRTI_UNSTABLE_GIT_BRANCH
|
git checkout -f $OPENRTI_BRANCH
|
||||||
# pull latest version from the unstable branch
|
# pull latest version from the unstable branch
|
||||||
git pull
|
git pull
|
||||||
fi
|
fi
|
||||||
|
@ -626,6 +713,7 @@ fi
|
||||||
#######################################################
|
#######################################################
|
||||||
# SIMGEAR
|
# SIMGEAR
|
||||||
#######################################################
|
#######################################################
|
||||||
|
SET_WINDOW_TITLE "Building Simgear"
|
||||||
SIMGEAR_INSTALL_DIR=simgear
|
SIMGEAR_INSTALL_DIR=simgear
|
||||||
INSTALL_DIR_SIMGEAR=$INSTALL_DIR/$SIMGEAR_INSTALL_DIR
|
INSTALL_DIR_SIMGEAR=$INSTALL_DIR/$SIMGEAR_INSTALL_DIR
|
||||||
cd "$CBD"
|
cd "$CBD"
|
||||||
|
@ -666,17 +754,17 @@ then
|
||||||
then
|
then
|
||||||
# switch to stable branch
|
# switch to stable branch
|
||||||
# create local stable branch, ignore errors if it exists
|
# create local stable branch, ignore errors if it exists
|
||||||
git branch -f $FGSG_STABLE_GIT_BRANCH origin/$FGSG_STABLE_GIT_BRANCH 2> /dev/null || true
|
git branch -f $FGSG_BRANCH origin/$FGSG_BRANCH 2> /dev/null || true
|
||||||
# switch to stable branch. No error is reported if we're already on the branch.
|
# switch to stable branch. No error is reported if we're already on the branch.
|
||||||
git checkout -f $FGSG_STABLE_GIT_BRANCH
|
git checkout -f $FGSG_BRANCH
|
||||||
# get indicated stable version
|
# get indicated stable version
|
||||||
git reset --hard $SIMGEAR_STABLE_REVISION
|
git reset --hard $SIMGEAR_STABLE_REVISION
|
||||||
else
|
else
|
||||||
# switch to unstable branch
|
# switch to unstable branch
|
||||||
# create local unstable branch, ignore errors if it exists
|
# create local unstable branch, ignore errors if it exists
|
||||||
git branch -f $FGSG_UNSTABLE_GIT_BRANCH origin/$FGSG_UNSTABLE_GIT_BRANCH 2> /dev/null || true
|
git branch -f $FGSG_BRANCH origin/$FGSG_BRANCH 2> /dev/null || true
|
||||||
# switch to unstable branch. No error is reported if we're already on the branch.
|
# switch to unstable branch. No error is reported if we're already on the branch.
|
||||||
git checkout -f $FGSG_UNSTABLE_GIT_BRANCH
|
git checkout -f $FGSG_BRANCH
|
||||||
# pull latest version from the unstable branch
|
# pull latest version from the unstable branch
|
||||||
git pull
|
git pull
|
||||||
fi
|
fi
|
||||||
|
@ -726,6 +814,7 @@ fi
|
||||||
#######################################################
|
#######################################################
|
||||||
# FGFS
|
# FGFS
|
||||||
#######################################################
|
#######################################################
|
||||||
|
SET_WINDOW_TITLE "Building Flightgear"
|
||||||
FGFS_INSTALL_DIR=fgfs
|
FGFS_INSTALL_DIR=fgfs
|
||||||
INSTALL_DIR_FGFS=$INSTALL_DIR/$FGFS_INSTALL_DIR
|
INSTALL_DIR_FGFS=$INSTALL_DIR/$FGFS_INSTALL_DIR
|
||||||
cd "$CBD"
|
cd "$CBD"
|
||||||
|
@ -770,17 +859,17 @@ then
|
||||||
then
|
then
|
||||||
# switch to stable branch
|
# switch to stable branch
|
||||||
# create local stable branch, ignore errors if it exists
|
# create local stable branch, ignore errors if it exists
|
||||||
git branch -f $FGSG_STABLE_GIT_BRANCH origin/$FGSG_STABLE_GIT_BRANCH 2> /dev/null || true
|
git branch -f $FGSG_BRANCH origin/$FGSG_BRANCH 2> /dev/null || true
|
||||||
# switch to stable branch. No error is reported if we're already on the branch.
|
# switch to stable branch. No error is reported if we're already on the branch.
|
||||||
git checkout -f $FGSG_STABLE_GIT_BRANCH
|
git checkout -f $FGSG_BRANCH
|
||||||
# get indicated stable version
|
# get indicated stable version
|
||||||
git reset --hard $FGFS_STABLE_REVISION
|
git reset --hard $FGFS_STABLE_REVISION
|
||||||
else
|
else
|
||||||
# switch to unstable branch
|
# switch to unstable branch
|
||||||
# create local unstable branch, ignore errors if it exists
|
# create local unstable branch, ignore errors if it exists
|
||||||
git branch -f $FGSG_UNSTABLE_GIT_BRANCH origin/$FGSG_UNSTABLE_GIT_BRANCH 2> /dev/null || true
|
git branch -f $FGSG_BRANCH origin/$FGSG_BRANCH 2> /dev/null || true
|
||||||
# switch to unstable branch. No error is reported if we're already on the branch.
|
# switch to unstable branch. No error is reported if we're already on the branch.
|
||||||
git checkout -f $FGSG_UNSTABLE_GIT_BRANCH
|
git checkout -f $FGSG_BRANCH
|
||||||
# pull latest version from the unstable branch
|
# pull latest version from the unstable branch
|
||||||
git pull
|
git pull
|
||||||
fi
|
fi
|
||||||
|
@ -847,6 +936,20 @@ then
|
||||||
then
|
then
|
||||||
if [ "$DOWNLOAD" = "y" ]
|
if [ "$DOWNLOAD" = "y" ]
|
||||||
then
|
then
|
||||||
|
SET_WINDOW_TITLE " FGDATA"
|
||||||
|
if [[ -e ../fgdata_${FGDATA_VERSION} ]]
|
||||||
|
then
|
||||||
|
FGDATA_DIR=../fgdata_${FGDATA_VERSION}
|
||||||
|
fi
|
||||||
|
if [[ -e ../../fgdata_${FGDATA_VERSION} ]]
|
||||||
|
then
|
||||||
|
FGDATA_DIR=../../fgdata_${FGDATA_VERSION}
|
||||||
|
fi
|
||||||
|
if [[ ! -e $INSTALL_DIR_FGFS/fgdata && -e ${FGDATA_DIR} ]]
|
||||||
|
then
|
||||||
|
ln -s ${FGDATA_DIR} $INSTALL_DIR_FGFS/fgdata
|
||||||
|
ls -lah $INSTALL_DIR_FGFS/fgdata
|
||||||
|
fi
|
||||||
EXDIR=$(pwd)
|
EXDIR=$(pwd)
|
||||||
cd $INSTALL_DIR_FGFS
|
cd $INSTALL_DIR_FGFS
|
||||||
echo -n "GIT DATA FROM git://gitorious.org/fg/fgdata.git ... " >> $LOGFILE
|
echo -n "GIT DATA FROM git://gitorious.org/fg/fgdata.git ... " >> $LOGFILE
|
||||||
|
@ -866,17 +969,17 @@ then
|
||||||
then
|
then
|
||||||
# switch to stable branch
|
# switch to stable branch
|
||||||
# create local stable branch, ignore errors if it exists
|
# create local stable branch, ignore errors if it exists
|
||||||
git branch -f $FGSG_STABLE_GIT_BRANCH origin/$FGSG_STABLE_GIT_BRANCH 2> /dev/null || true
|
git branch -f $FGSG_BRANCH origin/$FGSG_BRANCH 2> /dev/null || true
|
||||||
# switch to stable branch. No error is reported if we're already on the branch.
|
# switch to stable branch. No error is reported if we're already on the branch.
|
||||||
git checkout -f $FGSG_STABLE_GIT_BRANCH
|
git checkout -f $FGSG_BRANCH
|
||||||
# get indicated stable version
|
# get indicated stable version
|
||||||
git reset --hard $FGFS_DATA_STABLE_REVISION
|
git reset --hard $FGSG_BRANCH
|
||||||
else
|
else
|
||||||
# switch to unstable branch
|
# switch to unstable branch
|
||||||
# create local unstable branch, ignore errors if it exists
|
# create local unstable branch, ignore errors if it exists
|
||||||
git branch -f $FGDATA_UNSTABLE_GIT_BRANCH origin/$FGDATA_UNSTABLE_GIT_BRANCH 2> /dev/null || true
|
git branch -f $FGSG_BRANCH origin/$FGSG_BRANCH 2> /dev/null || true
|
||||||
# switch to unstable branch. No error is reported if we're already on the branch.
|
# switch to unstable branch. No error is reported if we're already on the branch.
|
||||||
git checkout -f $FGDATA_UNSTABLE_GIT_BRANCH
|
git checkout -f $FGSG_BRANCH
|
||||||
# pull latest version from the unstable branch
|
# pull latest version from the unstable branch
|
||||||
git pull
|
git pull
|
||||||
fi
|
fi
|
||||||
|
@ -925,6 +1028,7 @@ fi
|
||||||
#######################################################
|
#######################################################
|
||||||
# FGO!
|
# FGO!
|
||||||
#######################################################
|
#######################################################
|
||||||
|
SET_WINDOW_TITLE "Building FGO"
|
||||||
FGO_INSTALL_DIR=fgo
|
FGO_INSTALL_DIR=fgo
|
||||||
INSTALL_DIR_FGO=$INSTALL_DIR/$FGO_INSTALL_DIR
|
INSTALL_DIR_FGO=$INSTALL_DIR/$FGO_INSTALL_DIR
|
||||||
cd "$CBD"
|
cd "$CBD"
|
||||||
|
@ -961,6 +1065,7 @@ fi
|
||||||
#######################################################
|
#######################################################
|
||||||
# FGx
|
# FGx
|
||||||
#######################################################
|
#######################################################
|
||||||
|
SET_WINDOW_TITLE "Building FGX"
|
||||||
FGX_INSTALL_DIR=fgx
|
FGX_INSTALL_DIR=fgx
|
||||||
INSTALL_DIR_FGX=$INSTALL_DIR/$FGX_INSTALL_DIR
|
INSTALL_DIR_FGX=$INSTALL_DIR/$FGX_INSTALL_DIR
|
||||||
cd "$CBD"
|
cd "$CBD"
|
||||||
|
@ -988,8 +1093,8 @@ then
|
||||||
|
|
||||||
cd fgx/
|
cd fgx/
|
||||||
|
|
||||||
git branch -f $FGX_STABLE_GIT_BRANCH origin/$FGX_STABLE_GIT_BRANCH 2> /dev/null || true
|
git branch -f $FGX_BRANCH origin/$FGX_BRANCH 2> /dev/null || true
|
||||||
git checkout -f $FGX_STABLE_GIT_BRANCH
|
git checkout -f $FGX_BRANCH
|
||||||
git pull
|
git pull
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
@ -1055,6 +1160,7 @@ fi
|
||||||
#######################################################
|
#######################################################
|
||||||
# FGRUN
|
# FGRUN
|
||||||
#######################################################
|
#######################################################
|
||||||
|
SET_WINDOW_TITLE "Building FGRUN"
|
||||||
FGRUN_INSTALL_DIR=fgrun
|
FGRUN_INSTALL_DIR=fgrun
|
||||||
INSTALL_DIR_FGRUN=$INSTALL_DIR/$FGRUN_INSTALL_DIR
|
INSTALL_DIR_FGRUN=$INSTALL_DIR/$FGRUN_INSTALL_DIR
|
||||||
cd "$CBD"
|
cd "$CBD"
|
||||||
|
@ -1090,17 +1196,17 @@ then
|
||||||
# switch to stable branch
|
# switch to stable branch
|
||||||
# create local stable branch, ignore errors if it exists
|
# create local stable branch, ignore errors if it exists
|
||||||
ls
|
ls
|
||||||
git branch -f $FGRUN_STABLE_GIT_BRANCH origin/$FGRUN_STABLE_GIT_BRANCH 2> /dev/null || true
|
git branch -f $FGRUN_BRANCH origin/$FGRUN_BRANCH 2> /dev/null || true
|
||||||
# switch to stable branch. No error is reported if we're already on the branch.
|
# switch to stable branch. No error is reported if we're already on the branch.
|
||||||
git checkout -f $FGRUN_STABLE_GIT_BRANCH
|
git checkout -f $FGRUN_BRANCH
|
||||||
# get indicated stable version
|
# get indicated stable version
|
||||||
git reset --hard $FGRUN_STABLE_GIT_BRANCH
|
git reset --hard $FGRUN_BRANCH
|
||||||
else
|
else
|
||||||
# switch to unstable branch
|
# switch to unstable branch
|
||||||
# create local unstable branch, ignore errors if it exists
|
# 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
|
git branch -f $FGRUN_BRANCH origin/$FGRUN_BRANCH 2> /dev/null || true
|
||||||
# switch to unstable branch. No error is reported if we're already on the branch.
|
# switch to unstable branch. No error is reported if we're already on the branch.
|
||||||
git checkout -f $FGRUN_UNSTABLE_GIT_BRANCH
|
git checkout -f $FGRUN_BRANCH
|
||||||
# pull latest version from the unstable branch
|
# pull latest version from the unstable branch
|
||||||
git pull
|
git pull
|
||||||
fi
|
fi
|
||||||
|
@ -1160,6 +1266,7 @@ fi
|
||||||
#######################################################
|
#######################################################
|
||||||
# FGCOM
|
# FGCOM
|
||||||
#######################################################
|
#######################################################
|
||||||
|
SET_WINDOW_TITLE "Building FGCOM"
|
||||||
FGCOM_INSTALL_DIR=fgcom
|
FGCOM_INSTALL_DIR=fgcom
|
||||||
INSTALL_DIR_FGCOM=$INSTALL_DIR/$FGCOM_INSTALL_DIR
|
INSTALL_DIR_FGCOM=$INSTALL_DIR/$FGCOM_INSTALL_DIR
|
||||||
cd "$CBD"
|
cd "$CBD"
|
||||||
|
@ -1204,9 +1311,9 @@ then
|
||||||
else
|
else
|
||||||
# switch to unstable branch
|
# switch to unstable branch
|
||||||
# create local unstable branch, ignore errors if it exists
|
# 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
|
git branch -f $FGCOM_BRANCH origin/$FGCOM_BRANCH 2> /dev/null || true
|
||||||
# switch to unstable branch. No error is reported if we're already on the branch.
|
# switch to unstable branch. No error is reported if we're already on the branch.
|
||||||
git checkout -f $FGCOM_UNSTABLE_GIT_BRANCH
|
git checkout -f $FGCOM_BRANCH
|
||||||
# pull latest version from the unstable branch
|
# pull latest version from the unstable branch
|
||||||
git pull
|
git pull
|
||||||
fi
|
fi
|
||||||
|
@ -1303,6 +1410,7 @@ fi
|
||||||
#######################################################
|
#######################################################
|
||||||
# FGCOMGUI
|
# FGCOMGUI
|
||||||
#######################################################
|
#######################################################
|
||||||
|
SET_WINDOW_TITLE "Building FGCOMGUI"
|
||||||
FGCOMGUI_INSTALL_DIR=fgcomgui
|
FGCOMGUI_INSTALL_DIR=fgcomgui
|
||||||
INSTALL_DIR_FGCOMGUI=$INSTALL_DIR/$FGCOMGUI_INSTALL_DIR
|
INSTALL_DIR_FGCOMGUI=$INSTALL_DIR/$FGCOMGUI_INSTALL_DIR
|
||||||
cd "$CBD"
|
cd "$CBD"
|
||||||
|
@ -1355,10 +1463,41 @@ then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#######################################################
|
||||||
|
# OPENRADAR
|
||||||
|
#######################################################
|
||||||
|
SET_WINDOW_TITLE "Building OPENRADAR"
|
||||||
|
OR_INSTALL_DIR=openradar
|
||||||
|
INSTALL_DIR_OR=$INSTALL_DIR/$OR_INSTALL_DIR
|
||||||
|
cd "$CBD"
|
||||||
|
|
||||||
|
if [[ "$(declare -p WHATTOBUILD)" =~ '['([0-9]+)']="OPENRADAR"' ]]
|
||||||
|
then
|
||||||
|
echo "****************************************"
|
||||||
|
echo "************** OPENRADAR ***************"
|
||||||
|
echo "****************************************"
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$DOWNLOAD" = "y" ]
|
||||||
|
then
|
||||||
|
wget $OR_STABLE_RELEASE -O OpenRadar.zip
|
||||||
|
cd install
|
||||||
|
unzip ../OpenRadar.zip
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "#!/bin/sh" > run_openradar.sh
|
||||||
|
echo "cd \$(dirname \$0)" >> run_openradar.sh
|
||||||
|
echo "cd install/OpenRadar" >> run_openradar.sh
|
||||||
|
echo "java -jar OpenRadar.jar" >> run_openradar.sh
|
||||||
|
chmod 755 run_openradar.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
#######################################################
|
#######################################################
|
||||||
# ATLAS
|
# ATLAS
|
||||||
#######################################################
|
#######################################################
|
||||||
|
SET_WINDOW_TITLE "Building ATLAS"
|
||||||
ATLAS_INSTALL_DIR=atlas
|
ATLAS_INSTALL_DIR=atlas
|
||||||
INSTALL_DIR_ATLAS=$INSTALL_DIR/$ATLAS_INSTALL_DIR
|
INSTALL_DIR_ATLAS=$INSTALL_DIR/$ATLAS_INSTALL_DIR
|
||||||
cd "$CBD"
|
cd "$CBD"
|
||||||
|
@ -1424,6 +1563,7 @@ then
|
||||||
chmod 755 run_atlas.sh
|
chmod 755 run_atlas.sh
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
SET_WINDOW_TITLE "Finished Building"
|
||||||
|
|
||||||
echo "To start fgfs, run the run_fgfs.sh file"
|
echo "To start fgfs, run the run_fgfs.sh file"
|
||||||
echo "To start terrasync, run the run_terrasync.sh file"
|
echo "To start terrasync, run the run_terrasync.sh file"
|
||||||
|
|
Loading…
Add table
Reference in a new issue