Created
March 22, 2014 17:05
-
-
Save g-1/9710580 to your computer and use it in GitHub Desktop.
rakeでcoco2dx-3.0rc0用のstaticライブラリを作成する ref: http://qiita.com/g-1/items/01f6c430326dfd125af9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROJECT_PATH = "../cocos2d/build/cocos2d_libs.xcodeproj" | |
TARGET_NAME="'build all libs iOS'" | |
OUTPUT_DEBUG="tmp/iphonesimulator" | |
OUTPUT_RELEASE="tmp/iphoneos" | |
OUTPUT_LIB="../lib" | |
desc "静的ライブラリをビルドします" | |
task "lib" do | |
sh "xcodebuild -project #{PROJECT_PATH} -configuration Release -sdk iphonesimulator7.1 -target #{TARGET_NAME} TARGET_BUILD_DIR=../../build/#{OUTPUT_DEBUG} BUILT_PRODUCTS_DIR=../../build/#{OUTPUT_DEBUG} clean build" | |
sh "xcodebuild -project #{PROJECT_PATH} -configuration Release -sdk iphoneos7.1 -target #{TARGET_NAME} TARGET_BUILD_DIR=../../build/#{OUTPUT_RELEASE} BUILT_PRODUCTS_DIR=../../build/#{OUTPUT_RELEASE} clean build" | |
end | |
desc "lipoコマンドで各デバイス向けの静的ライブラリをひとつのバイナリにします" | |
task "lipo" do | |
Dir.glob("#{OUTPUT_RELEASE}/*"){|path| | |
p path | |
file = File.basename(path) | |
sh "lipo '#{OUTPUT_DEBUG}/#{file}' '#{OUTPUT_RELEASE}/#{file}' -create -output '#{OUTPUT_LIB}/#{file}'" | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment