Compiling Twice with Delphi 6 and getting the same checksum on the binary

你离开我真会死。 提交于 2019-11-30 21:40:31

We researched this question a few years ago, and as I recall the answer was simply that the people at Borland/Codegear/Embarcadero do not subscribe to the notion that the compiler should produce exactly the same output given exactly the same input (given that the current date-time is not acceptable to consider as input).

This is disappointing, but given that Delphi is upmteen major versions old, it probably will not change.

Based on your comment in the question, I think you are searching for the answer to this question:

How can I verify that a certain binary is created by a certain set of source files

One way is to have an automated built process that:

  1. Inserts a unique verififcation tag in the source code (might be as simple as a GUID string or something else in an include file)
  2. Compiles the binaries using that verification tag
  3. Packs the resulting binary and source code in a delivery directory tree

You must make sure that your sourcecode actually uses that verification tag (for instance by showing in an about box, or something similar).

I use FinalBuilder to automate build processes like this.

--jeroen

Unfortunately I haven't heard of any answer to this problem.

It's not just timestamps but there are places where a few bytes of random garbage out of memory ends up in the result.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!