3
votes

We have a little annoying problem with our delphi 2007 IDE, from time to time for no obvious reason the delphi IDE changes absolute paths in the <DCC_DependencyCheckOutputName> node to relative paths.

for example before we saved the project this was written in the dproj file:

<DCC_DependencyCheckOutputName>D:\DcProgs\ProgUtils\ConvertToSmw\ConvertToSmw.exe</DCC_DependencyCheckOutputName>

and after saving in the delphi 2007 ide it changes to

<DCC_DependencyCheckOutputName>..\..\..\ProgUtils\ConvertToSmw\ConvertToSmw.exe</DCC_DependencyCheckOutputName>

My question is why and when does delphi do this and is there a way to stop delphi from doing this ?

You see we have made a custom buildscript that makes nightly builds for our projects and packs the executables using upx after a successfull build. To know the exe files location we use the "DCC_DependencyCheckOutputName" node, but upx doesn't like the relative paths so we need absolute paths. It would be nice that delphi stopped changing this or that we at least know when or why this happening so we know what not to do inside the ide to prevent this.

Any idea's ?

1
Use your revision control system to revert these IDE changes whenever you commit changes.David Heffernan
that's what we do at the moment, but sometimes we forget to check the dproj, to see if delphi had changed it or not, before we commit. and it only gets noticed when the nightly build starts. It would still be interesting to know when and why delphi changes these from absolute to relative paths. It doesn't seem to happen all the time. And it made me wonder why delphi did thisWillems Davy
@WillemsDavy with Delphi RAD == 'Random Application Development' sometimes :)mjn
If you are extracting <DCC_DependencyCheckOutputName> node, don't you have the possibility to expand its result back to full path spec before feeding it to upx?Jan Doggen

1 Answers

3
votes

The IDE does this when the project and the referenced files are on the same drive.

Delphi tries to do you a favour into making your project and references using relative paths, so you can move around the directory tree to another location or machine with more ease.

Sometimes this fires back (for instance when you want to include parts from the Delphi example code).

The only way to do this is to make sure the parts you want to have absolute pathnames be on a difference drive letter than the main project.

It might also be (I didn't try yet) that you can enforce this by having them on a different UNC path.