axmol/tools/jenkins-scripts/slave-scripts/runtime/ios-build.sh

26 lines
1.2 KiB
Bash
Raw Normal View History

2015-07-07 16:54:03 +08:00
#!/bin/bash
mycocos=tools/cocos2d-console/bin/cocos
$mycocos new -l $1 -t runtime
if [ $1 = "cpp" ];then
schemename="MyCppGame-mobile"
projectpath="MyCppGame/proj.ios_mac/MyCppGame.xcodeproj"
2015-07-08 15:53:49 +08:00
cocos_project_path="MyCppGame"
2015-07-07 16:54:03 +08:00
elif [ $1 = "lua" ];then
schemename="MyLuaGame-mobile"
projectpath="MyLuaGame/frameworks/runtime-src/proj.ios_mac/MyLuaGame.xcodeproj"
2015-07-08 15:53:49 +08:00
cocos_project_path="MyLuaGame"
2015-07-07 16:54:03 +08:00
elif [ $1 = "js" ];then
schemename="MyJSGame-mobile"
projectpath="MyJSGame/frameworks/runtime-src/proj.ios_mac/MyJSGame.xcodeproj"
2015-07-08 15:53:49 +08:00
cocos_project_path="MyJSGame"
2015-07-07 16:54:03 +08:00
fi
echo "start building..."
2015-07-08 15:53:49 +08:00
cocos compile -p ios -s $cocos_project_path | xcpretty
cocos compile -p ios -s $cocos_project_path
# xcodebuild -project $projectpath -target "${schemename}" -destination "platform=iOS Simulator,name=iPhone Retina (4-inch)" clean | xcpretty
# xcodebuild -project $projectpath -target "${schemename}" -destination "platform=iOS Simulator,name=iPhone Retina (4-inch)" build | xcpretty
# #the following commands must not be removed
# xcodebuild -project $projectpath -target "${schemename}" -destination "platform=iOS Simulator,name=iPhone Retina (4-inch)" build