在 Xcode GUI 中指定构建操作(例如安装) [英] Specifying a build action (e.g. install) in Xcode GUI
问题描述
是否可以使用 Xcode GUI 指定构建操作,例如 install
?
Is it possible to specify a build action, for example install
using Xcode GUI?
我可以
xcodebuild install
从命令行,但在 GUI 菜单或任何相关菜单项的构建设置中找不到关键操作.
from the command line but can't find a key ACTION in the build settings in the GUI menu, or any relevant menu items.
推荐答案
我想如果我同时设置 Deployment Location(DEPLOYMENT_LOCATION) 和 Deployment Postprocessing(DEPLOYMENT_POSTPROCESSING),然后构建过程安装产品并复制公共/私有标头.无论实际的后处理是什么,都需要设置 DeploymentPostprocessing.
I figured that if I set both Deployment Location(DEPLOYMENT_LOCATION) and Deployment Postprocessing(DEPLOYMENT_POSTPROCESSING), then the build process installs the product and also copies public/private headers. Setting DeploymentPostprocessing is required no matter what the actual postprocessing is.
此外,安装目录(INSTALL_PATH) 和公共/私有头文件夹路径(PUBLIC/PRIVATE_HEADERS_FOLDER_PATH) 都假定在安装构建产品位置(DST_ROOT),因此产品和标题将位于那里.
Also, both Installation Directory(INSTALL_PATH) and Public/Private Headers Folder Path(PUBLIC/PRIVATE_HEADERS_FOLDER_PATH) are assumed to be under Installation Build Products Location(DST_ROOT), so the product and headers will be located there.
困扰我的一件事是安装目录应该以/
"开头,以便正确附加到 DST_ROOT.例如,如果 DST_ROOT 是 /myDistributionRoot/
并且 INSTALL_PATH 是 lib/
,则目标目录变为 /myDistributionRootlib
,而不是 /myDistributionRoot/lib
.
One thing that bothers me is that Installation Directory should start with "/
" in order to correctly appended to DST_ROOT. For example, if DST_ROOT is /myDistributionRoot/
and INSTALL_PATH is lib/
, then the destination directory becomes /myDistributionRootlib
, not /myDistributionRoot/lib
.
这篇关于在 Xcode GUI 中指定构建操作(例如安装)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!