Xcode 4 目标构建设置“跳过安装”。它是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16374851/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode 4 target build setting "Skip install". What is it?
提问by Alex
The tile basically says it all.
瓷砖基本上说明了一切。
I'm developing a mac app which has the normal app target, but also has two more command-line tool targets whose products are copied to the app when building. I remember seeing somewhere that the "Skip install" was important in these cases, but I remember nothing of what I read, so this might be incorrect.
我正在开发一个 mac 应用程序,它具有普通的应用程序目标,但还有两个命令行工具目标,其产品在构建时被复制到应用程序。我记得在某个地方看到过“跳过安装”在这些情况下很重要,但我不记得我读过的内容,所以这可能是不正确的。
Anyway, I just wanted to know what this option affects.
无论如何,我只是想知道这个选项会影响什么。
采纳答案by hagi
I believe this only matters when you're developing for the App Store. If you archive your app target and this includes building other targets (command line tools, static libraries, ...), all the targets' products are copied into the archive, unless SKIP_INSTALL
is set to YES
.
我相信这仅在您为 App Store 开发时才重要。如果您归档应用程序目标并且这包括构建其他目标(命令行工具、静态库等),则所有目标的产品都会复制到归档中,除非SKIP_INSTALL
设置为YES
.
You can verify this: Archive your application, find the archive in the Organizer, Option-Click --> "Show in Finder", go into the archive (Option-Click --> "Show Package Contents"), and in /Products
you will find multiple files/folders. However, App Store builds only allow one product within the Products directory. Xcode warns you about this if you "Validate" your archived app in the Organizer:
您可以验证这一点:存档您的应用程序,在管理器中找到存档,Option-单击 -->“在 Finder 中显示”,进入存档(Option-单击 -->“显示包内容”),然后/Products
您将找到多个文件/文件夹。但是,App Store 版本只允许 Products 目录中的一种产品。如果您在管理器中“验证”存档的应用程序,Xcode 会警告您:
回答by Jeremy Huddleston Sequoia
Normally (SKIP_INSTALL=NO), during the install phase, the built target would be installed to $(DSTROOT)$(INSTALL_PATH). Setting SKIP_INSTALL=YES causes the target to be built but not installed.
通常 (SKIP_INSTALL=NO),在安装阶段,构建的目标将安装到 $(DSTROOT)$(INSTALL_PATH)。设置 SKIP_INSTALL=YES 会导致构建但不安装目标。
This is useful for static archives (libsomething.a) that will be later linked into other targets or bundles that will be installed by another target's copy-files build phase.
这对于静态档案 (libsomething.a) 很有用,这些档案稍后将链接到其他目标或由另一个目标的复制文件构建阶段安装的包中。