Skip to content

Commit 1ba4e7a

Browse files
committed
add build script
1 parent 47adcf0 commit 1ba4e7a

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ xcuserdata/
44
*.pyc
55
luac
66
!*.o
7+
build/
File renamed without changes.

build_release_ios.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
3+
cd $(dirname $0)
4+
5+
echo $PWD
6+
configuration=Release
7+
projectName=luacocoa
8+
9+
for scheme in libffi-iOS luaoc; do
10+
xcodebuild \
11+
-workspace luacocoa.xcworkspace \
12+
-scheme $scheme \
13+
-destination 'platform=iOS Simulator,name=iPhone 5' \
14+
-destination 'generic/platform=iOS' \
15+
-configuration $configuration \
16+
SYMROOT="$PWD/build" \
17+
;
18+
done
19+
20+
if (($? == 0)); then
21+
echo "create universal libs"
22+
23+
cd build
24+
if [[ ! -d $projectName ]] ; then
25+
mkdir $projectName
26+
fi
27+
28+
for lib in $(cd $configuration-iphoneos; ls *.a); do
29+
echo "create universal lib $lib"
30+
lipo -create -output $projectName/"$lib" \
31+
$configuration-iphoneos/"$lib" $configuration-iphonesimulator/"$lib"
32+
done
33+
34+
cp -r $configuration-iphoneos/include $projectName
35+
36+
echo "create universal libs done!"
37+
fi

0 commit comments

Comments
 (0)