【发布时间】:2013-11-13 18:20:20
【问题描述】:
如果我查看构建 iOS 应用程序的详细信息,在复制资源阶段,我看到 Xcode 声称使用了一种称为“内置复制”的东西:
CpResource /svn/MyProject/MyResources/myLog.json /Users/benjamin.flynn/Library/Developer/Xcode/DerivedData/MyApp-gocyhvchxrohmbbgmgbzzxtztbku/Build/Products/Debug-iphoneos/MyApp.app/myLog.json
cd "/svn/MyProject/MyApp"
setenv PATH "/Applications/Xcode-5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode-5.0.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /svn/MyProject/MyResources/myLog.json /Users/benjamin.flynn/Library/Developer/Xcode/DerivedData/MyApp-gocyhvchxrohmbbgmgbzzxtztbku/Build/Products/Debug-iphoneos/MyApp.app
builtin-copy 是 Xcode 内部的东西吗?我问是因为如果我将路径设置为 Xcode 设置的路径,我没有可用的内置复制命令。似乎很方便。我希望在 shell 脚本中复制我自己的资源,所以我正在查看 Xcode 阶段以供参考。
【问题讨论】:
-
顾名思义,“builtin-copy”内置于 Xcode 应用程序本身,因此不能作为单独的命令行工具使用。
-
@MartinR 啊,我在读“builtin”是指一些shell,但你的建议似乎很合理。
-
FWIW,好像和
rsync -r --exclude .DS_Store -exclude CVS --exclude .svn --exclude .git --exclude .hg --copy-links /svn/MyProject/MyResources/myLog.json /Users/benjamin.flynn/Library/Developer/Xcode/DerivedData/MyApp-gocyhvchxrohmbbgmgbzzxtztbku/Build/Products/Debug-iphoneos/MyApp.app做一样的事情 -
这可以作为答案,@BenFlynn