-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·50 lines (40 loc) · 1.56 KB
/
run.sh
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
42
43
44
45
46
47
48
49
50
#!/bin/sh
AIR_SDK=~/Development/Frameworks/AIRSDK_Compiler/23
XCODEBUILD=/usr/bin/xcodebuild
echo "====== [Step 1] Build SWC ======"
pushd AIRNativeTestASPart
rm -f out/production/ANETest/ANETest.swc
"$AIR_SDK"/bin/acompc -source-path src -include-classes com.juhyeunize.ANETest -output=out/production/ANETest/ANETest.swc
popd
echo "====== [Step 2] Build Native C ======"
pushd AIRNativeTest
rm -f build/Release/ANETest.framework
"$XCODEBUILD" -project AIRNativeTest.xcodeproj -configuration Release -arch x86_64 clean build
popd
echo "====== [Step 3] Build ANE ======"
rm -f ./ANE/Test.ane
rm -f ./ANE/swc/ANETest.swc
rm -rf ./ANE/swc/swc-assets
cp "./AIRNativeTestASPart/out/production/ANETest/ANETest.swc" ./ANE/swc
mkdir -p ANE/swc/swc-assets
pushd ANE/swc/swc-assets
jar xf ../ANETest.swc
popd
rm -rf ./ANE/platform/mac
mkdir ./ANE/platform/mac
cp -R "./AIRNativeTest/build/Release/ANETest.framework" ./ANE/platform/mac
cp "./ANE/swc/swc-assets/library.swf" ./ANE/platform/mac
pushd ANE
"$AIR_SDK"/bin/adt -package -target ane Test.ane extension.xml -swc swc/ANETest.swc -platform MacOS-x86-64 -C platform/mac ANETest.framework library.swf
popd
echo "====== [Step 4] Execute Demo ======="
rm -f ./Demo/out/production/Demo/Test.ane
cp ./ANE/Test.ane ./Demo/out/production/Demo/
rm -rf ./Demo/out/production/Demo/ane-assets
mkdir -p ./Demo/out/production/Demo/ane-assets/Test.ane
pushd ./Demo/out/production/Demo/ane-assets/Test.ane
jar xf ../../Test.ane
popd
pushd ./Demo/out/production/Demo
"$AIR_SDK"/bin/adl -profile extendedDesktop -extdir ./ane-assets Main-descriptor.xml .
popd