I would like to know, is there a way to automatically make the IDE/Compiler/other copy all the resource that needs to be linked with the DCU to the DCU output folder.
I often use forms that I pre-compile to avoid the needs to recompile the unit all the time in my main projects. The DCU gets updated, but we need to copy the DFM manually everytime it changes. Same goes for any {$R *.res} specified. Maybe we could maintain those file directly in the DCU folder... but doesn't quite make sense to have a .DFM in a different folder than a .PAS
I looked for a compiler switch that would do it... Unsuccesfully.
Anyone knows if/how it can be achieved?
I'm using Delphi 2010
"Copy to Output Directory" is the property of the files within a Visual Studio project, which defines if the file will be copied to the project's built path as it is. Coping the file as it is allows us to use relative path to files within the project.
You could create a simple Post Build event which performed the copying. That way whenever you did a build, the system would copy the necessary files for you. The build events are available from the Project Options menu, there is a Pre-build and a Post-Build script.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With