Updated Mac release build script.
Capture most of the build logic in a script (ie. visible to Git, and outside Jenkins). use XCodebuild to run the actual compiles, so we get Clang. Use the Xcode 4.3 SDK paths.
This commit is contained in:
parent
4eb511c33d
commit
1ff0264a57
2 changed files with 66 additions and 15 deletions
|
@ -1,15 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
SDK_PATH="/Developer/SDKs/MacOSX10.6.sdk"
|
|
||||||
OSX_TARGET="10.6"
|
|
||||||
|
|
||||||
svn co https://macflightgear.svn.sourceforge.net/svnroot/macflightgear/trunk/FlightGearOSX macflightgear
|
|
||||||
|
|
||||||
pushd macflightgear
|
|
||||||
|
|
||||||
# compile the stub executable
|
|
||||||
gcc -o FlightGear -mmacosx-version-min=$OSX_TARGET -isysroot $SDK_PATH -arch i386 main.m \
|
|
||||||
-framework Cocoa -framework RubyCocoa -framework Foundation -framework AppKit
|
|
||||||
|
|
||||||
popd
|
|
||||||
|
|
66
hudson_mac_build_release.sh
Executable file
66
hudson_mac_build_release.sh
Executable file
|
@ -0,0 +1,66 @@
|
||||||
|
#!/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
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
echo "Starting on SimGear"
|
||||||
|
pushd sgBuild
|
||||||
|
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -G Xcode -DSIMGEAR_SHARED:BOOL="ON" ../simgear
|
||||||
|
|
||||||
|
# compile
|
||||||
|
xcodebuild -configuration Release -target install build
|
||||||
|
|
||||||
|
if [ $? -ne '0' ]; then
|
||||||
|
echo "make simgear failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
echo "Starting on FlightGear"
|
||||||
|
pushd fgBuild
|
||||||
|
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -G Xcode -DSIMGEAR_SHARED:BOOL="ON" ../flightgear
|
||||||
|
|
||||||
|
xcodebuild -configuration Release -target install build
|
||||||
|
|
||||||
|
if [ $? -ne '0' ]; then
|
||||||
|
echo "make flightgear failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
|
chmod +x $WORKSPACE/dist/bin/osgversion
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
echo "Building Macflightgear launcher"
|
||||||
|
|
||||||
|
SDK_PATH="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk"
|
||||||
|
OSX_TARGET="10.6"
|
||||||
|
|
||||||
|
svn co https://macflightgear.svn.sourceforge.net/svnroot/macflightgear/trunk/FlightGearOSX macflightgear
|
||||||
|
|
||||||
|
pushd macflightgear
|
||||||
|
|
||||||
|
# compile the stub executable
|
||||||
|
gcc -o FlightGear -mmacosx-version-min=$OSX_TARGET -isysroot $SDK_PATH -arch i386 main.m \
|
||||||
|
-framework Cocoa -framework RubyCocoa -framework Foundation -framework AppKit
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
|
echo "Running package script"
|
||||||
|
./hudson_mac_package_release.rb
|
Loading…
Reference in a new issue