-
-
Save marutanm/db1547d9f08bc8165572 to your computer and use it in GitHub Desktop.
Cocos2d-x v3.3対応版
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
# 事前に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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$ rake task lib
が通りそうな雰囲気まで確認した