I’m looking for a ready-to-use piece of code that would be able to read and modify Delphi .res files. The thing is that I need to create an application that will be compiling many Delphi projects at once (using the dcc32.exe file). However, it is necessary for me to change file version and language before compilation, and as far as I know, I have to modify the .res file to do that.
Have you come across any code that would give me an interface to .res files allowing me to modify the data contained in it? The thing is that I want to change only those two pieces of information keeping the rest unchanged. This is why I can’t compile my own .res file based on a script.
An application executed from a command line would also be OK if it allows to be called with parameters and does what I need it to do.
Thank you very in advance!
If all you need is to add file version resource then create
appver.rcfile, compile it withbrcc32and in one of your app unit (for exampleappver.pas) add{$R appver.res}(as Marian noticed you must turn off Delphi project option to include version info).I created command line programs that increase build numbers in
.rcfile, create new branch/tag in SVN with new version in branch name, compiles.rcto.res, and build application.My
.rcfiles with such info (Polish language) looks like: