views:

95

answers:

3

Delphi is a great IDE and compiler. But sometimes it also has a few minor flaws. Like my problem right now... I am working on a project that's created in Delphi 2007. But I like to use Delphi XE simply because the IDE has some interesting features and it happens to be more stable on my computer. So I opened the project in Delphi XE and have been changing the code, with backwards-compatibility in mind. When I save the project again to open it in D2007, it has problems reading the project, though. The dproj file of XE is not compatible with 2007. To open the project in D2007 again, I need to delete the dproj file and open the dpr file. (Or I need to save the old proj file of 2007 and put it back again when I want to use D2007 again.)

This is annoying. Does anyone know a better solution to keep the right dproj file for each version?

+7  A: 

One thing you could do would be to place the DPR and DPROJ files in separate directories. Unfortunately you would have to merge any changes you make in one version to the other, but that is fairly simple using Beyond compare:

BCompare.exe .\d2007\project.dpr .\dXE\project.dpr

skamradt
+2  A: 

You can have your project in version control like Subversion. If you omit the .dproj files from version control, it is usually quite manageable to work in different versions of Delphi

Jan Oosting
I like this solution. :-) But I think I'll do it slightly different, by not checking in the changed dproj file. (Still have to check in the dpr though.)
Workshop Alex
Check them in instead, and open a branch. When needed, you can merge them.
ldsandon
+1  A: 

I'm using single .dpr and multiple .dproj files in such case.

Basic steps: - Create project in D2007. - Close project. - Copy project.dproj to project.xe.dproj. - Open project.xe.dproj in XE. - Let it upgrade the project, save it and overwrite old project.xe.dproj. - Delete backup copy of project.xe.dproj created during the upgrade.

Now you have project.dproj to use in D2007 and project.xe.dproj to use in XE. Both are using the same codebase - project.dpr.

gabr
This will work as long as you don't change the project settings or add any units / forms to it. Especially in the latter case you will get some "interesting" effects due to forms being listed in the .dpr file but not in the .dproj file when you switch the IDE.
dummzeuch