开发者

Relative paths in Delphi projects and ITE in particular

I've a bunch of projects with some common libraries in a SVN repository. The repository has some branches for in-production versions.

For this reason (checking out several versions on one computer, and minimizing swap time), I tried to configure all projects as much as possible with relative paths within the repository. (....\libraries\common for forms in .dpr and library searchpaths).

This is not 100% ideal (it occasionally gets confused if you file->open and browse to a different dir, but that is easily solved by opening a file in the rootdir (the dir with the .dpr)).

But now I started to use the ITE I see that the hierarchy built by the resource wizard contains absolute paths. (drive/full/path/to/checkout).

Does sb have a good solution to deal with this? Specially the ITE bit. Are there macro's in search paths that denote the working dir?

P.s. I've used visual sourcesafe so I'm aware of the usual subst tricks. I prefer a solution without any action on changing project trees. (the modifying of projects to use relative paths is one-off, and checked in, so not that painful)

P.s.2 the situation within projects (not ITE, but normal projects) can be defused by always closing pro开发者_运维技巧jects before opening new ones.


I found a partial solution. In the first dialogue you can edit the rootdirectory (by playing with the tickmark so that "edit rootdir" gets enabled). If you set the rootdir to a directory that is the parent of all dirs with forms, the IDE remains in "relative" mode.

This is still not perfect (it now ends up in the rootdir instead of the app dir), but at least this works with branches. (and maybe a bit postediting the .dproj will solve even this

Update: this won't work, since the absolute path is still in every .dfn. It is just that the IDE will look nice, since the project shows the paths relative in the IDE (the paths in the .dfn are corrected with the rootdir path it seems)


File a QC request if one does not exist yet - it's not the only places where Delphi stubbornly uses absolute paths instead of relative ones. Especially the ITE got very little attention and never was polished since it was introduced.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜