Jump to content
Sign in to follow this  
Leandroz

Build timestamp

Recommended Posts

Leandroz

I'd like to include a build timestamp in my AutoIt compiled executable.

A build timestamp is some identification of the date and time on which the executable was compiled, and it could be displayed on a GUI element to provide definitive version information beyond a typical release version "vX.Y" label. I.e. the title of a GUI window could read "Application vX.Y by Me - build yyyy-mm-dd.hh-mm-ss"

I know AutoItWrapper has a directive "#AutoIt3Wrapper_Res_Field" which allows for this type of information to be included in the resources of the compiled executable, but I don't know how to access it from within an AutoIt script.

Is there a some sort of predefined constant which AutoItWrapper can replace at compile-time or is there some way to reliably read the compiled resources? Or perhaps there's another way to achieve this?

Share this post


Link to post
Share on other sites
Leandroz

Did some searching and, through massive loops, found the very simple solution:

CODE
#AutoIt3Wrapper_Res_Field = Timestamp|%date% %time%

If @Compiled Then

MsgBox(0, "", FileGetVersion(@ScriptFullPath, "Timestamp"))

Else

MsgBox(0, "", "Not compiled")

EndIf

Share this post


Link to post
Share on other sites
KaFu

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×