remove date from build

53 views
Skip to first unread message

T Zirn

unread,
Nov 17, 2025, 3:11:48 PM (11 days ago) Nov 17
to inno...@googlegroups.com
We have a requirement to be able to build from the same "build branch" and get the same exact executable (proven via md5sums). Inno Setup embeds a date in the build of the installer executable. So the only way we've found to get the same executable no matter when it's built from the same branch is to set the "TouchDate" and "TouchTime" in our *.iss file. Overtime, however, it has become cumbersome to remember to update this file when there were no other changes in it. And to change it late enough that the date makes sense. I've been searching the docs to see if there is a way to force it to not include the date in the installer executable at all but so far haven't found anything. We've also tried TouchDate=none.
 Is there a way to tell InnoSetup to not include a date in the build of the install executable?

Martijn Laan

unread,
Nov 17, 2025, 3:29:29 PM (11 days ago) Nov 17
to innosetup
Hi,

Op 17-11-2025 om 20:58 schreef T Zirn:
 Is there a way to tell InnoSetup to not include a date in the build of the install executable?

I think you are referring to the timestamps of source files included in the installer.

There is no way to prevent Inno Setup from storing these timestamps. If you want the timestamps to remain stable, you must either ensure that unchanged files do not have modified timestamps, or set the touch flag on all files and specify a fixed TouchDate and TouchTime.


We have a requirement to be able to build from the same "build branch" and get the same exact executable (proven via md5sums).

Just out of curiosity, why is this a requirement? If your goal is to obtain the exact same executable, why are you rebuilding at all? You already have the executable.

Greetings,
Martijn

Jernej Simončič

unread,
Nov 17, 2025, 3:41:31 PM (11 days ago) Nov 17
to 'Martijn Laan' via innosetup on [innosetup]

On Monday, November 17, 2025, 21:29:18, 'Martijn Laan' via innosetup wrote:


Just out of curiosity, why is this a requirement? If your goal is to obtain the exact same executable, why are you rebuilding at all? You already have the executable.

It's for reproducible builds.

 

-- 
< Jernej Simončič ><><><><>< https://eternallybored.org/ >


Most general statements are false, including this one.
       -- Berkeley's Ninth Law

Martijn Laan

unread,
Nov 18, 2025, 4:04:25 AM (10 days ago) Nov 18
to innosetup
Hey,

Op 17-11-2025 om 21:41 schreef Jernej Simončič:

On Monday, November 17, 2025, 21:29:18, 'Martijn Laan' via innosetup wrote:


Just out of curiosity, why is this a requirement? If your goal is to obtain the exact same executable, why are you rebuilding at all? You already have the executable.

It's for reproducible builds.


Thanks. After some more thinking, I can imagine a few scenario's where it's useful.

However, note that the linked article says this (emphasis mine):

"For the compilation process to be deterministic, the input to the compiler must be the same, regardless of the build environment used. This typically involves normalizing variables that may change, such as order of input files, timestamps, locales, and paths."

In OP’s case, this does not seem to be true, because Git is used, which does not preserve timestamps.

Greetings,
Martijn

T Zirn

unread,
Nov 18, 2025, 12:33:42 PM (10 days ago) Nov 18
to innosetup
Thank you , we will unfortunately, continue to use the TouchDate and TouchTime then and have to keep it updated for each actual new build. I was originally hoping that TouchDate=none would do it but it did not.
And  Jernej  is correct, it is for proof of reproducible builds for auditors (proving we stored the right code to get the same build output).

Thanks for the quick responses. 

Martijn Laan

unread,
Nov 19, 2025, 2:16:57 AM (9 days ago) Nov 19
to 'Martijn Laan' via innosetup on [innosetup]
Hi,

Here's how it works, per file:

Compilation:
  • First it gets the timestamp of the source file, and then:
  • If the touch flag is set and TouchDate and/or TouchTime is not set to none then:
    • It overwrites the value with either the build date/time or a fixed date/time.
  • Else (the touch flag was not set or both TouchDate and TouchTime were set to none) it keeps the value
I suppose source could have been a better name than none. It might be called none because if you set the touch flag and you set both TouchDate and TouchTime to none, then there's no difference compared to not doing any of this.

So even if you don't set the touch flag (which you do at the moment, right? you didn't mention that so far), it still stores a timestamp. In fact, Setup doesn't know or care about the touch flag.

Setup uses the stored timestamp for two things:
  • For comparison if comparetimestamp is set.
  • After having installed the file it sets its timestamp to the stored timestamp.
What I could do is add a flag like nosourcetimestamp which would then not store a timestamp but also disallow the touch and comparetimestamp flags. It would have no effect when combined with the external flag.

Setup already knows how to deal with this, since it doesn't know timestamps when installing a downloaded file.

Greetings,
Martijn

Op 18-11-2025 om 18:31 schreef T Zirn:
--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/innosetup/5a6bbd38-7976-4dc7-9780-88e2b5c21f0an%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages