如何在 Visual Studio 中编写复杂链接的脚本(FIPS / 静态链接库 / VS.2008)

发布于 2024-08-21 02:41:22 字数 779 浏览 4 评论 0原文

问题

在继续允许开发人员通过属性 GUI 排列库的同时,在 Visual Studio vcproj 项目中构建复杂的 fips 链接的正确方法是什么?

情况

我正在使用 VS 2008 并且有一堆使用 openssl 静态链接的项目。到目前为止,链接很简单,但现在我要切换到 FIPS 签名库,过程如下:

  • 将源代码编译为 obj
  • 链接到 exe
  • 运行 exe,它将 sha 签名转储到 stdout,捕获该签名以供下一步
  • 重新编译预主要设置定义到签名(我们使用正则表达式提取)
  • 重新链接应用程序

FIP 提供了一些 nmake 和 perl 脚本来帮助处理过程,但我的团队习惯于在 Visual Studio 中工作,我想保留他们的工作流程尽可能相似。

选项

  • 使用批处理/perl/nmake 文件的
  • 自定义链接步骤msbuild
  • 其他

我尝试使用批处理文件和 perl 文件来编排链接,但我很难捕获所有链接设置和库。我已经开始研究 msbuild,但我不清楚它如何与 VisualStudioProject for c++ 反应。

我的问题是将数据从 VisualStudio 项目传输到自定义链接步骤。我想我可以强制链接转储数据,然后解析它并将其拉入 perl 或 make 脚本中。 IDE 中可用的变量似乎无法保存我需要的所有数据。

请让我知道您为此类事情尝试过哪些方法以及存在哪些问题。感谢您的帮助

Question

What's the right way to build a complex fips link into the Visual Studio vcproj projects while continuing to allow developers to arrange libraries via the properties GUI?

Situation

I'm using VS 2008 and have a bunch of projects that use openssl statically linked. Thus far the link has been simple, but now I'm switching to a FIPS signed library and the process is like this:

  • compile source to obj
  • link to exe
  • run exe which dumps a sha signature to stdout which is captured for the next step
  • recompile pre-main setting define to the signature (which we pulled out using a regex)
  • re-link application

FIPs provides some nmake and perl scripts to help with process, but my team is used to working in Visual studio and I'd like to keep their workflow as similar as possible.

Options

  • custom link step using batch/perl/nmake files
  • msbuild
  • macros
  • other

I tried using batch files and perl files to orchestrate the link, but I'm having difficulty capturing all of the link settings and libraries. I have begun to look at msbuild, but I'm unclear how it reacts with a VisualStudioProject for c++.

My problem is the transfer of data from the VisualStudio project to the custom link step. I guess I could force the link to dump the data and then parse it and pull it into the perl or make script. The variables available inside the IDE do not seem to hold all the data I need.

Please let me know what approaches you have tried for this kind of thing and what gotchas are out there. Thanks for the help

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

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

发布评论

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

评论(1

落墨 2024-08-28 02:41:22

我认为我处理这个问题的方式太小了。 Visual Studio 项目可以是生成的工件,而不是项目信息的中心位置。我可以使用 scons、cmake、nant、nmak、maven 或其中一些技术来描述我的构建过程并将 IDE 环境生成为工件。

因此,我的目标是:

  • 支持 TDD,提供从源代码更改到编译到测试的快速简单的体验
  • 的熟悉的 IDE 体验
  • 支持开发人员以易于理解和可维护的方式执行复杂链接

这些都没有说明项目信息需要规范的位置成为 vcprof 文件。

我记得读过有关 C++ 的这种模式(我已经在 java 中使用了这种模式)。我想我会看一下其中的一些。

有人有从声明性项目文件或脚本文件到IDE环境的弹弓经验吗?

I think I'm approaching this in too small a fashion. Visual studio projects can be an artifact produced instead of the central locus of project information. I could use scons, cmake, nant, nmak, maven or some of these technology to describe my build process and generate the IDE environment as an artifact.

My goals are thus:

  • support TDD with quick and simple experience from source change through compile to test
  • support the familiar IDE experience that the developers
  • perform the complex link in an easily understood and maintainable way

None of these say that the canonical location of project information needs to be the vcprof file.

I recall reading about this pattern for C++ (it's what I use for java already). I think I'll take a look at some of these.

Anyone have any experience with the slingshot from declaritive project file or script file to IDE environment?

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