如何自动检测并释放真正发生变化的DLL?

发布于 2024-07-16 21:33:06 字数 273 浏览 3 评论 0原文

每当我们重新编译 exe 或 DLL 时,即使源代码相同,其二进制映像也会有所不同,因为映像中的时间戳和校验和不同。

但是,我们的质量体系意味着每次发布新的 DLL 时,都必须再次执行相关的验证测试(通常是手动的,并且需要花费大量时间)。

因此,我们的目标是避免发布尚未发布的 DLL。 >实际上改变了。 即:拥有一个自动程序(脚本、工具等),仅根据 Dll 包含的有意义的信息(代码和数据)来检测不同的 Dll,忽略时间戳和校验和。

有没有好的方法来实现这一目标?

Whenever we recompile an exe or a DLL, its binary image is different even if the source code is the same, due to various timestamps and checksums in the image.

But, our quality system implies that each time a new DLL is published, related validation tests must be performed again (often manually, and it takes a significant amount of time.)

So, our goal is to avoid releasing DLLs that have not actually changed. I.e: having an automatic procedure (script, tool, whatever...) that detect different Dlls based only on meaningful information they contain (code and data), ignoring timestamps and checksum.

Is there a good way to achieve this ?

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

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

发布评论

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

评论(4

清眉祭 2024-07-23 21:33:06

它基于版本信息,并且仅在实际进行更改时更新版本信息。

Base it off the version information, and only update the version information when you actually make changes.

爱你是孤单的心事 2024-07-23 21:33:06

让您的构建工具构建 DLL 两次。 无论两者之间存在什么差异,都保证是时间戳或校验和的结果。 现在您可以使用该信息与您的下一个版本进行比较。

Have your build tool build the DLL twice. Whatever differences exist between the two are guaranteed to be the result of timestamps or checksums. Now you can use that information to compare to your next build.

清醇 2024-07-23 21:33:06

如果您有一个在开始构建之前同步源代码的自动构建系统,则仅在源代码管理中有任何实际更改时才继续构建和发布。 您应该能够从源代码管理客户端的输出中轻松检测到这一点。

If you have an automated build system that syncs source before starting a build, only proceed with building and publishing if there any actual changes in source control. You should be able to detect this easily from the output of your source control client.

聆听风音 2024-07-23 21:33:06

我们的构建系统也有同样的问题。 不幸的是,检测是否有任何实质性代码更改并不是一件容易的事,因为我们有大量静态库,因此对静态库的更改可能会导致 dll/exe 发生更改。 对 dll/exe 直接使用的文件进行更改可能只是修复错误注释,而不是更改生成的目标代码。

我之前曾寻找过一种工具来完成您想要的事情,但我没有看到。 我的想法是手动比较两个文件并跳过两个版本中无意义的差异。 可移植文件格式有详细记录,所以我不知道没想到这会非常困难。 我们的要求还要求我们忽略 dll/exe 中标记的版本,因为我们对所有文件进行了唯一标记,并且在对所有可执行文件进行签名时也忽略签名。

我还没有时间做这些事情,但如果您继续实施解决方案,我有兴趣与您合作。 如果您确实找到了可以执行此操作的工具,请告诉我们。

We have the same problem with our build system. Unfortunately it is not trivial to detect if there are any material code changes since we have numerous static libraries, so a change to one may result in a dll/exe changing. Changes to a file directly used by the dll/exe may just be fixing a bad comment, not changing the resulting object code.

I've looked previously for a tool to do what you desired and I did not see one. My thought was to compare the two files manually and skip the non meaningful differences in the two versions. The Portable File Format is well documented, so I don't expect this to be terribly difficult. Our requirements additional require that we ignore the version stamped into the dll/exe since we uniquely stamp all our files, and also to ignore the signature as we sign all our executables.

I've yet to find time to do any of this, but I'd be interested in collaborating with you if you proceed with implementing a solution. If you do find a tool that does this, please do let us know.

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