开发者

Including a C tool in a Xcode4 project

开发者 https://www.devze.com 2023-03-09 13:01 出处:网络
I have a project which builds two targets, the main app and a tool. How can I correctly include the tool in the app bundle? I have 开发者_运维百科already navigated to target dependencies and added th

I have a project which builds two targets, the main app and a tool.

How can I correctly include the tool in the app bundle? I have 开发者_运维百科already navigated to target dependencies and added the tool; however when adding the built executable to the "Copy Bundle Resources" phase, I get a path to the builded product like:

.../.../awieuhfaowasldijfsalkdj/Build/Debug/tool

Is there any way to add the tool to the bundle dynamically, I mean without hardcoding such path? Ideally, I'd like to add the tool in a special folder (say "Tools") inside the "Resources" bundle folder, but I don't even know if that's possible.

Apart from this, is there something else I need to do in order to complete the process of adding it as a resource?


One simple way to avoid the weird path is to specify that the build location should be the one specified by the targets (by default build/Debug or build/Release under the project folder):

  • Open the Xcode preferences
  • Click on the Locations tab
  • Under Build Location, select Place build products in locations specified by targets
0

精彩评论

暂无评论...
验证码 换一张
取 消