首页 > 代码库 > 确保 Xcode 每次 Build 时都自己主动更新资源

确保 Xcode 每次 Build 时都自己主动更新资源

參考:http://quick.cocoachina.com/?p=22


刚建立的quickproject。每次修改lua代码,都得清理一下。非常麻烦。參照着quick官网上改了改,要适配自己的项目

_TARGET_BUILD_CONTENTS_PATH=$TARGET_BUILD_DIR/$CONTENTS_FOLDER_PATH
echo _TARGET_BUILD_CONTENTS_PATH: $_TARGET_BUILD_CONTENTS_PATH
echo PWD: $PWD

echo Cleaning $_TARGET_BUILD_CONTENTS_PATH/

rm -fr $_TARGET_BUILD_CONTENTS_PATH/res/*
rm -fr $_TARGET_BUILD_CONTENTS_PATH/scripts/*
                                        
mkdir -p $_TARGET_BUILD_CONTENTS_PATH/res/
mkdir -p $_TARGET_BUILD_CONTENTS_PATH/scripts/
                                        
cp -RLp $PWD/../res/* $_TARGET_BUILD_CONTENTS_PATH/res/
cp -RLp $PWD/../scripts/* $_TARGET_BUILD_CONTENTS_PATH/scripts/



确保 Xcode 每次 Build 时都自己主动更新资源