如何在Source Insight中保存配置模板?

发布于 2024-08-19 11:27:40 字数 163 浏览 2 评论 0原文

我正在开展一个具有许多类似分支的项目。我想“一劳永逸”地配置 Source Insight——花时间分析应包含和排除文件/目录的大型项目,然后将其保存为配置,以便在启动新项目时在一个分支中,我几乎可以立即开始,只需进行一些小的调整。

有没有办法将项目配置信息保存到模板中,以便在将来的项目中使用?

I'm working on a project with many similar branches. I'd like to configure Source Insight "once and for all"--to spend the time analyzing the huge project for which files/directories should be included and excluded, and then saving that as a configuration, so that when starting a new project in a branch, I could get started almost immediately, with only minor tweaks.

Is there a way to save project configuration information into a template, to use on future projects?

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

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

发布评论

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

评论(1

冷︶言冷语的世界 2024-08-26 11:27:40

Source Insight 有几种方法可以将文件和目录列表添加到项目中。最简单的方法是转到 Project >添加和删​​除项目文件...,选择“从列表添加”,然后选择一个文件。该文件可以包含绝对文件路径或相对于 Project > 中指定的项目源目录的路径。项目设置。如果您愿意,还可以在 Source Insight 宏中使用 AddFileListToProj(hprj, listfilename) 函数。从文档中:

将文件列表添加到项目hprjlistfilename 参数是一个包含列表文件名称的字符串。列表文件应该是一个文本文件,每行包含一个文件名。该文件还可以每行包含一个目录,在这种情况下,该目录的内容将添加到项目中。

现在,您只需创建文件列表。您可以按照自己的意愿在外部进行此操作,也可以让 Source Insight 从之前的项目中创建一个。为此,只需打开要用作“模板”的项目并转到 Project >项目报告。取消选中所有复选框并单击“确定”。现在删除报告顶部的标题行和底部的“总文件...”行。您应该留下项目中相对于项目源目录的所有文件的列表。保存此文件以供将来将文件添加到新项目时使用。

Source Insight has a few ways to add a list of files and directories to a project. The easiest way is to go to Project > Add And Remove Project Files..., select "add from list", then select a file. This file can containt absolute file paths or paths relative to the Project Source Directory specified in Project > Project Settings. You can also use the AddFileListToProj(hprj, listfilename) function in a Source Insight macro if you'd like to do it that way. From the documentation:

Adds a list of files to the project hprj. The listfilename parameter is a string containing the name of the list file. The list file should be a text file containing one file name per line. The file can also contain one directory per line, in which case the directory's contents are added to the project.

Now, you just need to create the list of files. You can either do it externally however you wish, or you can let Source Insight create one from a previous project. To do this, simiply open the project you want to use as your "template" and go to Project > Project Report. Uncheck all of the boxes and click "OK". Now delete the header lines from the top of the report and the "total files..." line from the bottom. You should be left with a list of all the files in the project relative to the project source directory. Save this file to use to add files to new projects in the future.

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