1. Marcos Frequently Used
- SRCROOT
Directory path. Identifies the directory containing the target’s source files.
源代码所在路径. 即**.xcodeproj**所在目录.
- SYMROOT
Directory path.
Identifies the root of the directory hierarchy that contains product files and intermediate build files.
Product and build files are placed in subdirectories of this directory.
- CONFIGURATION
Identifier.
Identifies the build configuration (Debug/Release) the target uses to generate the product.
- EXECUTABLE_NAME
Filename. Specifies the name of the binary the target produces.
以上三个一般一起使用.
#沙盒中程序所在的地址.
$SYMROOT/$CONFIGURATION-iphoneos/$EXECUTABLE_NAME
$SYMROOT/$CONFIGURATION-iphonesimulator/$EXECUTABLE_NAME
2. Example:
#!/bin/sh
echo SRCROOT:$SRCROOT
echo MACH_O_TYPE:$MACH_O_TYPE
echo PRODUCT_NAME:$PRODUCT_NAME
echo PROJECT_NAME:$PROJECT_NAME
echo TARGET_NAME:$TARGET_NAME
echo INSTALL_PATH:$INSTALL_PATH
echo "SDKROOT (Base SDK)":$SDKROOT
echo EXECUTABLE_EXTENSION:$EXECUTABLE_EXTENSION
echo EXECUTABLE_NAME:$EXECUTABLE_NAME
echo EXECUTABLE_PATH:$EXECUTABLE_PATH
echo EXECUTABLE_PREFIX:$EXECUTABLE_PREFIX
echo EXECUTABLE_SUFFIX:$EXECUTABLE_SUFFIX
echo CONFIGURATION:$CONFIGURATION
echo SYMROOT:$SYMROOT
3. Result:
Perferences:
Apple 官网介绍