Skip to content

Instantly share code, notes, and snippets.

@young40
Created March 30, 2017 02:41
Show Gist options
  • Save young40/6c8f1495f6a7c59c3dfadf3c4e3a6d97 to your computer and use it in GitHub Desktop.
Save young40/6c8f1495f6a7c59c3dfadf3c4e3a6d97 to your computer and use it in GitHub Desktop.
Build cocos2d-x pre-build static lib for cocos2d-x lua iOS
echo "Build start"
mkdir -p frameworks/cocos2d-x-prebuild
cd frameworks/cocos2d-x/build/
rm -rf build
xcodebuild -project cocos2d_libs.xcodeproj -target "libcocos2d iOS"
cd -
cp "frameworks/cocos2d-x/build/build/Release-iphoneos/libcocos2d iOS.a" frameworks/cocos2d-x-prebuild/
cd frameworks/cocos2d-x/cocos/scripting/lua-bindings/proj.ios_mac/
rm -rf build
xcodebuild -project cocos2d_lua_bindings.xcodeproj -target "libluacocos2d iOS"
cd -
cp "frameworks/cocos2d-x/cocos/scripting/lua-bindings/proj.ios_mac/build/Release-iphoneos/libluacocos2d iOS.a" frameworks/cocos2d-x-prebuild/
cd frameworks/cocos2d-x/tools/simulator/libsimulator/proj.ios_mac/
rm -rf build
xcodebuild -project libsimulator.xcodeproj -target "libsimulator iOS"
cd -
cp "frameworks/cocos2d-x/tools/simulator/libsimulator/proj.ios_mac/build/Release-iphoneos/libsimulator iOS.a" frameworks/cocos2d-x-prebuild/
echo "Build success"
@young40
Copy link
Author

young40 commented Mar 30, 2017

Maybe you can use it for cocos2d-js project as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment