Delphi Build Server – Do I Need to Check in .dres Files?

buildsdelphi

We're using final builder to build a Delphi project and the person managing the build server noticed that projects with no .dres files were not building because they're not in SVN and because they're not in SVN they're not on the build machine.

So he put them in SVN.

I'm a little skeptical about the necessity of putting them in SVN though. For one thing, if they're needed by the build server then they're not being built by the build server and we're not really creating the build in one step since we're using pre-compiled code (I might as well just check in my DCU's, tear off my beard and return my Delphi-4-Ever allegiance card).

I see in Delphi after compiling a project:


c:\program files (x86)\embarcadero\rad studio\9.0\bin\cgrc.exe -c65001 "PROJResource.rc" -foPROJ.dres

Those files are produced by brcc32 compiling an RC file. I'd say, well just add that line to the build server, but PROJResource.rc isn't in SVN either!

PROJResource.rc is automatically generated by Delphi from adding things using the project manager and I never noticed it so I never added it to SVN and no one else complained (I think the .dproj file is behind this). The RC files that I wrote myself are in SVN though.

So… what's the best way to fix this, just check in the PROJResource.rc or is there something else we can be doing to streamline this?

Best Answer

If you are using FinalBuilder 7.0.0.1864 or later, on the Delphi Action Properties dialog, switch to the Resource Compiler page, and turn on "Compile Project Resources (D2009 or later)" - this will recompile the dres file during the build and you should not need to add it to svn (you do need the dproj though).

(I tried to post a screenshot but aparently I might be a spammer and I'm not allowed to do that yet!).