blob: 153fb6fb907c7a5b6e1757f7617b76078f623a9e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#! /bin/sh
if [ $# -lt 1 ]
then
echo "missing mandatory argument(s) : SDK version"
exit 1
fi
export OSXCROSS_IOS=anything
DIR=$(pwd)
J=$((`nproc`))
function build()
{
TOOLCHAIN=$DIR/iphone/toolchain-$VERSION
[ -d iPhoneOS9.1.sdk ] && rm -fr iPhoneOS9.1.sdk
tar -xJf iphone/iPhoneOS$VERSION.sdk.tar.xz || exit
find godot -name \*.o -delete
find godot -name \*.gen.h -delete
find godot -name \*.gen.cpp -delete
pushd godot
scons -j $J platform=iphone arch=arm target=release IPHONESDK=$DIR/iPhoneOS9.1.sdk IPHONEPATH=$TOOLCHAIN ios_triple=arm-apple-darwin11- || return 1
scons -j $J platform=iphone arch=arm64 target=release IPHONESDK=$DIR/iPhoneOS9.1.sdk IPHONEPATH=$TOOLCHAIN ios_triple=arm-apple-darwin11- || return 1
# scons -j $J platform=iphone arch=x86_64 target=release IPHONESDK=$DIR/iPhoneOS9.1.sdk IPHONEPATH=$TOOLCHAIN ios_triple=arm-apple-darwin11- || return 1
for module in libgodot libgodot_camera_module libgodot_arkit_module
do
$TOOLCHAIN/arm-apple-darwin11-lipo -create bin/$module.iphone.opt.arm.a bin/$module.iphone.opt.arm64.a -output bin/$module.iphone.fat.a
done
popd
mkdir iphone-$VERSION && mv godot/bin/libgodot* iphone-$VERSION/
}
for VERSION in $@
do
echo "##### build $VERSION #####"
build $VERSION || popd
done
|