I had to live with the problem. Until the day when it occurred to me that I could very probably find the solution to my problem on the internet. So I connected to Deja News and searched.
- A Better Build Process, The Delphi Magazine #49, September 1999
A life without Google? Was that really possible? I can hardly remember those times.
The article was written in Delphi 4 times and deals with building Delphi applications from a command line. More specifically, it solves the problem of dynamically recreating project.res file, which is something that you have to do if you want to increment build number in the version info resource during the build process. (A utility to increment build number was included, too.)
Also on display was a batch file that built my trusty GpProfile profiler and a "very complicated" tail utility.
str : TStringList;
i : integer;
str := TStringList.Create;
first := str.Count-StrToIntDef(ParamStr(2),20);
if first < 0 then first := 0;
for i := first to str.Count-1 do Writeln(str[i]);
Not much has changed in the Delphi world - I would code it almost identical today.