Skip to content

Instantly share code, notes, and snippets.

@marutanm
Forked from g-1/Rakefile
Last active August 29, 2015 14:13
Show Gist options
  • Save marutanm/db1547d9f08bc8165572 to your computer and use it in GitHub Desktop.
Save marutanm/db1547d9f08bc8165572 to your computer and use it in GitHub Desktop.
Cocos2d-x v3.3対応版
# 事前にTARGETS > Build Settings > Architecturesに'i386'を追加する
PROJECT_PATH = "../cocos2d/build/cocos2d_libs.xcodeproj"
TARGET_NAME="'libcocos2d 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
@marutanm
Copy link
Author

marutanm commented Jan 8, 2015

$ rake task libが通りそうな雰囲気まで確認した

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