If an RC file is modified, Delphi will compile it again. If an RC file has RCDATA or BITMAP declarations that reference files that have changed, Delphi will not recompile the .RC file to .RES again until I force it to by deleting the .RES file or doing a "touch" (modify file timestamp) on the top level .RC file.
Here's a sample TEST.RC file:
SAMPLE RCDATA "File.txt"
When TEST.RC is modified, that will cause a recompilation, when "File.txt" is modified, however Delphi does not recompile the resources, on a "Compile". I am not willing to just use "Build" because it increases my time from seconds to several minutes.
Has anyone ever gotten Delphi to work properly with .RC text files and dependencies? Granted some people add resources and never change them, but I have started using .RC files for things that I may often change such as binary or text data that is in RCDATA sections in an .RC file.
Note that trying to put a "delete .res" step in pre-build or post-build appears to break the Delphi IDE/compiler. I can sort this out externally when building outside the IDE (always delete certain .res files before I run msbuild), but inside the IDE, Delphi doesn't give me much of a choice.
Has anyone got a solution? (I'm having this problem in Delphi 2007, but any solution that works with any version of Delphi from 2007 up to XE3 would be welcome.)
del
doesn't work (it confuses the delphi IDE compiler), buttouch foo.rc
in a pre-build event works. I suppose doing the "rc.exe" command in pre-build would be perfect too. – Jari