Xcode 4 中的源代码生成

发布于 2024-12-03 12:53:52 字数 203 浏览 2 评论 0原文

我有一个项目,其中大量 C++ 代码是从一些元描述自动生成到多个文件中的。如何让 Xcode 4 在新构建发生时自动将这些文件添加到项目中?

注意:我知道构建阶段和自定义脚本,但我能找到的只是与资源相关的内容:将资源文件复制到最终的应用程序包。就我而言,我需要让 Xcode 4 自动将这些自动生成的文件注入到应用程序构建过程中......

I have a project where a large amount of C++ code is auto generated from some meta descriptions into multiple files. How do I make Xcode 4 automatically add these files into the project whenever happens the new build?

NOTE: I'm aware of build phases and custom scripts but all I could find was resources related: copy resource files to the final application bundle. In my case I need to make Xcode 4 automatically inject these autogenerated files into the application build process...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

方圜几里 2024-12-10 12:53:52

您可能想尝试添加“运行脚本”构建阶段。这将允许您运行任意 shell 脚本,您可以使用它来执行您需要执行的任何额外步骤。

在 Xcode4 中选择您的目标,单击“添加构建阶段”,然后选择“添加运行脚本”

You might want to try adding a "Run Script" build phase. This will allow you to run an arbitrary shell script, which you can use to do whatever extra steps you need to do.

Select your target in Xcode4, click "Add Build Phase" and then select "Add Run Script"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文