在Xcode 項目執行:Run Script 時,則標識:${SYMROOT} . 更改括弧類型。 例如:BUILD 號自增,編譯完成後自動copy 某文件至目標文件夾等: cp -R ${BUILD_DIR}/${CONFIGURATION}-iphoneos/XXXX.bundle ${SRCR ...
在Xcode 項目執行:Run Script 時,則標識:${SYMROOT} . 更改括弧類型。
例如:BUILD 號自增,編譯完成後自動copy 某文件至目標文件夾等:
cp -R ${BUILD_DIR}/${CONFIGURATION}-iphoneos/XXXX.bundle ${SRCROOT}/../XXXProject/
具體環境變數如下:
$(SYMROOT) = $()/Build/Products
$(BUILD_DIR) = $()/Build/Products
$(BUILD_ROOT) = $()/Build/Products
這三個變數中的$()不會隨著Build Settings參數的設置而改變
相反,以下可以通過設置而改變
$(CONFIGURATION_BUILD_DIR) = $()/Build/Products/Debug-iphonesimulator
$(BUILT_PRODUCTS_DIR) = $()/Build/Products/Debug-iphonesimulator
$(CONFIGURATION_TEMP_DIR) = $()/Build/Intermediates/UtilLib.build/Debug-iphonesimulator
$(TARGET_BUILD_DIR) = $()/Build/Products/Debug-iphonesimulator
$(SDK_NAME) = iphonesimulator5.0
$(PLATFORM_NAME) = iphonesimulator
$(CONFIGURATION) = Debug
$(TARGET_NAME) = UtilLib
$(EXECUTABLE_NAME) = libUtilLib.a 可執行文件名
${IPHONEOS_DEPLOYMENT_TARGET} 5.0
$(ACTION) = build
$(CURRENTCONFIG_SIMULATOR_DIR) 當前模擬器路徑
$(CURRENTCONFIG_DEVICE_DIR) 當前設備路徑
$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME =
$()/Build/Products/Debug-iphonesimulator
$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) = $()/Build/Intermediates/UtilLib.build/Debug-iphonesimulator
自定義變數
${CONFIGURATION}-iphoneos 表示:Debug-iphoneos
${CONFIGURATION}-iphonesimulator 表示:Debug-iphonesimulator
$(CURRENTCONFIG_DEVICE_DIR) = ${SYMROOT}/${CONFIGURATION}-iphoneos
$(CURRENTCONFIG_SIMULATOR_DIR) = ${SYMROOT}/${CONFIGURATION}-iphonesimulator
自定義一個設備無關的路徑(用來存放各種架構arm6/arm7/i386輸出的產品)
$(CREATING_UNIVERSAL_DIR) = ${SYMROOT}/${CONFIGURATION}-universal
自定義變數代表的值
$(CURRENTCONFIG_DEVICE_DIR) = $()/Build/Products/Debug-iphoneos
$(CURRENTCONFIG_SIMULATOR_DIR) = $()/Build/Products/Debug-iphonesimulator
$(CREATING_UNIVERSAL_DIR) = $()/Build/Products/Debug-universal