views:

139

answers:

5

i need to maintain different versions of a software, the problem is like this:

1) v 1.0 - Delphi 7 - DevExpress build 20 - TeeChart 5

2) v 2.0 - Delphi 2005 - DevExpress build 40 - TeeChart 7

3) v 2.1 - Delphi 2009 - DevExpress build 52 - TeeChart 8

4) v 3.0 - Delphi 2009 - DevExèress build 53 - TeeChart 2010

(of course this is an example)

What solution do you suggest? What I do now is using virtual machines and taking snapshots, anyway this means having in practice one windows version per software version.

What else can be done? Typically old versions need to be maintained just for bux fix, not for new developement.

Update: I added (4), this is an extra problem, maintaining same delphi version with different versions of components. It seems that Snapshot of Virtual Machine is still the most convenient way to work with no many compromises. Of course the problem is the complexity given by the 3rd party libraries, not Delphi itself.

+1  A: 

It is technically possible to use multiple Delphi versions on a single computer. It just eats up lots of disk space, though. And you would need to make sure each version looks at it's own folder settings for the component libraries and projects. So you could keep them all installed. (Just install them in the same order as the versions, thus first Delphi 7, then 2005 and finally 2009.)
Right now, I have 2005 and Delphi XE installed on a single system without any conflicts. Just as long as each Delphi version has it's own set of folders with third-party components and other stuff. (Although several add-ins like GExperts will work for any installed Delphi version.)
Is there any reason why you don't want those three versions on a single computer?

Workshop Alex
The reason is the (4th) point I added to my question: 2 versions that use same IDE version, but different components.
Too bad Delphi doesn't allow itself to be installed twice on a single system. :-) Suggestion: create a virtual machine with all your older projects and keep only the latest one on your current system. Also keep in mind that your older projects might just work fine with a newer version of it's components. So v2.1 and v3.0 could possibly both use the same component sets. Would it be bad to upgrade the components for those projects?
Workshop Alex
+2  A: 

If you don't need to do much visual design in the old versions of your app you could use our approach:

  • We have multiple DX installations: The current one plus the older ones we still need. Only the current one is properly installed, i.e. the IDE only "knows" the current one.
  • In the current version of your project, we use the current DX installation (like in a new project).
  • For older versions, we use the appropriate copy, i.e. point the project search path to one of the older copies. This means that the IDE and our source code use different versions of DX! However this has never been a big problem for us because we don't need to do much visual design on older versions of our app.

If you visually edit a form with DX components in one of the older versions the IDE will spit out DFMs corresponding to the currently installed DX version which is not the one your old app uses. In this case I would just textually compare the DFMs before and after the edit and check if anything has been messed up. If so just fix the borken DFM using a text editor.

Ulrich Gerhardt
Good trick, but won't work for me, thanks anyway.
+2  A: 

I typically use the JVCL tool to clean out properties added in newer TCharts, and that works fine. (mixing D7 - TD2006 - D2007 - D2009 - Delphi XE).

See:

Marco van de Voort
Thanks for the interesting links.
+1  A: 

Personally I think you're already working with the best solution with your VMs.

Before I started using different VMs for my projects though, I made use of the Delphi "-r" command line switch to load different component sets for different projects under the same IDE.

There's also a tool Jed's Configuration Manager which simplifies doing this.

LachlanG
Ok, I will stick to VM, they are very convenient by the way, because they remove many headaches....
A: 

To maintain different sets of libraries with the same Delphi version, you can use the -r parameter to switch the "registry root" that Delphi uses.

This blog posting shows how to do that.

--jeroen

Jeroen Pluimers