2012-06-25 21:14:58 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if [ "$WORKSPACE" == "" ]; then
|
|
|
|
echo "ERROR: Missing WORKSPACE environment variable."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# remove old and create fresh build directories
|
|
|
|
rm -rf sgBuild
|
|
|
|
rm -rf fgBuild
|
|
|
|
mkdir -p sgBuild
|
|
|
|
mkdir -p fgBuild
|
|
|
|
mkdir -p output
|
|
|
|
rm -rf output/*
|
|
|
|
rm -rf $WORKSPACE/dist/include/simgear $WORKSPACE/dist/libSim* $WORKSPACE/dist/libsg*.a
|
|
|
|
|
2015-11-15 08:11:25 +08:00
|
|
|
PATH=$PATH:$QTPATH
|
|
|
|
echo "Build path is: $PATH"
|
|
|
|
|
2012-06-25 21:14:58 +08:00
|
|
|
###############################################################################
|
|
|
|
echo "Starting on SimGear"
|
|
|
|
pushd sgBuild
|
2017-03-01 00:25:58 +08:00
|
|
|
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DCMAKE_BUILD_TYPE=RelWithDebInfo ../simgear
|
2012-06-25 21:14:58 +08:00
|
|
|
|
|
|
|
# compile
|
2015-12-09 02:55:37 +08:00
|
|
|
make
|
2012-06-25 21:14:58 +08:00
|
|
|
|
|
|
|
if [ $? -ne '0' ]; then
|
|
|
|
echo "make simgear failed"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2015-12-09 02:40:02 +08:00
|
|
|
make install
|
|
|
|
|
|
|
|
|
2012-06-25 21:14:58 +08:00
|
|
|
popd
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
echo "Starting on FlightGear"
|
|
|
|
pushd fgBuild
|
2017-03-01 00:25:58 +08:00
|
|
|
|
|
|
|
if [ $FG_IS_RELEASE == '1' ]; then
|
|
|
|
FGBUILDTYPE=Release
|
|
|
|
else
|
|
|
|
FGBUILDTYPE=Nightly
|
|
|
|
fi
|
|
|
|
|
2019-05-24 20:55:59 +08:00
|
|
|
cmake -DFG_BUILD_TYPE=$FGBUILDTYPE -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DENABLE_SWIFT:BOOL=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo ../flightgear
|
2012-06-25 21:14:58 +08:00
|
|
|
|
2015-12-09 02:55:37 +08:00
|
|
|
make
|
2012-06-25 21:14:58 +08:00
|
|
|
|
|
|
|
if [ $? -ne '0' ]; then
|
|
|
|
echo "make flightgear failed"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2015-12-09 02:40:02 +08:00
|
|
|
make install
|
|
|
|
|
2012-06-25 21:14:58 +08:00
|
|
|
popd
|
|
|
|
|
|
|
|
chmod +x $WORKSPACE/dist/bin/osgversion
|
|
|
|
|
|
|
|
|
2012-08-02 17:34:00 +08:00
|
|
|
################################################################################
|
2015-01-19 07:37:36 +08:00
|
|
|
|
2012-08-14 19:11:48 +08:00
|
|
|
# run the unlock script now - we need to do this right before code-signing,
|
|
|
|
# or the keychain may automatically re-lock after some period of time
|
2012-08-23 01:35:52 +08:00
|
|
|
unlock-keychain.sh
|
2012-08-14 19:11:48 +08:00
|
|
|
|
2012-06-25 21:14:58 +08:00
|
|
|
echo "Running package script"
|
|
|
|
./hudson_mac_package_release.rb
|