I always assumed that the dcu file is all that is needed at compile time. At least, the source files (pas and dfm) should not be required.
I have the following situation:
- A Delphi application with two units that each contain a form:
- UMain contains form TMain
- USubForm contains form TSubForm
- USubForm is in the uses clause of UMain
- After I compile this program, I removed USubForm.pas and USubForm.dfm and replaced them by the compiled USubForm.dcu.
- Compilation now results in an error:
DCC : error : E1026 File not found: 'USubForm.dfm'
- Note that if I only remove USubForm.pas (but leave USubForm.dfm file in place next to USubForm.dcu), the compilation works.
I don't understand. I thought the dcu file would be all I need (i.e. it's the compiled version of the pas + dfm file).
I'm using Delphi XE2 (we should be upgrading soon, but I don't think this is relevant for my question).
P.S. Some context: I'm trying to setup a continuous integration system for our in-house Delphi libraries and applications. I'd like to be able to compile applications without needing the source files of the libraries.