[英]Mac OSX - Xcode Installation Directory
After Xcode has finished building is there a way to make it copy the executable to specific directory Xcode 完成构建后,有没有办法让它将可执行文件复制到特定目录
~/Sites/cgi-bin/ ~/站点/cgi-bin/
I have the target Installation Directory
set to the correct folder, with skip installation
unchecked , but no luck.我将目标Installation Directory
设置为正确的文件夹,未选中skip installation
,但没有运气。
Is there something i'm missing?有什么我想念的吗?
Check the "Deployment Postprocessing" build setting in your target's Release configuration. 检查目标的“发布”配置中的“部署后处理”构建设置。 Installation is normally done only with a command-line xcodebuild install, but setting Deployment Postprocessing makes it install on every build. 通常仅通过命令行xcodebuild安装完成安装,但是设置Deployment Postprocessing会使它安装在每个构建上。
Ensure your user account has write privileges in the directory you want to install in, because the IDE normally doesn't run with root privileges. 确保您的用户帐户在您要安装的目录中具有写特权,因为IDE通常不会以root特权运行。
在构建阶段右下角添加构建阶段运行脚本,添加诸如MV -f $ {} SYMROOT /调试/项目名称〜/库/项目名称
Perhaps an easier approach is to add a "Copy Files" build phase. 也许更简单的方法是添加“复制文件”构建阶段。 Set the Destination to "Absolute Path" and the Subpath to where you want it copied on disk. 将目标设置为“绝对路径”,并将子路径设置为要在磁盘上复制的位置。 Both tilde expansion and $HOME can be used in the Subpath. 代字扩展名和$ HOME均可在子路径中使用。
除了设置“安装目录”之外,请确保还将设置中的DSTROOT(安装生成产品位置)设置为“ /”。
I made installation work with every build after following build settings setup:在遵循构建设置设置后,我对每个构建进行了安装:
Skip Install
to NO
将Skip Install
设置为NO
Deployment Location
to YES
将Deployment Location
设置为YES
Installation Build Products Location
to /
将Installation Build Products Location
设置为/
Installation Directory
to ~/Sites/cgi-bin/
将Installation Directory
设置为~/Sites/cgi-bin/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.