I would like to define in my code a constant holding the date on which the executable was built. I would naturally like to automate that process.
I know that I can w
In fact TCompile is not a Delphi unite. You can find it here, on EDN. And (just a copy of the page) :
Nonvisual component that modifies the unit file "Project.pas". This file has the date and time the project was compiled along with the build number.Drop this component on the TForm, then set the project path. This can be done by placing the caret in the ProjectPath property field, then pressing the ENTER key.
Include "Project" in the USES clause; Save the project, then exit Delphi. The next time the project is opened in Delphi, the unit file "Project.pas" will be created. Then each time you run the program from inside Delphi, the unit file will be updated with the current date, time and the build number.