Link to home
Start Free TrialLog in
Avatar of BJThomsen
BJThomsen

asked on

Is there a way to recreate a .res file without loading the delphi environment?

I have a utility the builds projects using the command line compiler. Some projects (there are 1500+ projects total) were checked into source control without the applications .res file.

Is there any easy way to recreate the .res file for the application without actually loading the project into the delphi environment, there are a couple hundred projects without the .res and would be a pain to load them all just to get the .res file.
Avatar of Colin_Dawson
Colin_Dawson

You can build a Res file from the Command line using the BRCC32.   I've not done this for a long time, and can't remember all the details.

You'll need to create a .rc file. This will control what will be in the .res file.   Then you execute BRCC32 and it'll turn create a .RC file for you.
ASKER CERTIFIED SOLUTION
Avatar of Madshi
Madshi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Mind you, even if you do have version information, you could always create a program that will generate the .rc file, but interrogating the .dof file.  That's where Delphi saves the project options.
Avatar of BJThomsen

ASKER

The res file for a project contains the forms dfm info. Not just the program icon.
The resource section of the linked exe contains the dfm info, the res file does not - at least not for me.
Whilst it IS possible to store menus, and form templates in the .res file. As Mashi has seen the .dfm's are not stored in the .res.
I use ResourceHacker to edit resources
http://www.users.on.net/johnson/resourcehacker/
ugh .. sorry bout the post .. didn't read completely :/