简体   繁体   English

同一台机器上的多个 Delphi 版本

[英]Multiple Delphi versions on the same machine

What we would like to do is install multiple Delphi versions on the same machine, those versions are D7, D2010 and DXE.我们要做的是在同一台机器上安装多个 Delphi 版本,这些版本是 D7、D2010 和 DXE。

We had previously D7 and D2010, worked OK together(had to duplicate components for D7 and D2010 because of special conditions for various versions), however, I'm not sure about XE, hence the question.我们以前有 D7 和 D2010,一起工作正常(由于各种版本的特殊条件,不得不为 D7 和 D2010 复制组件),但是,我不确定 XE,因此有问题。

Of course we could experiment, but that means wasting quite a few hours, so if someone already had made a similar setup or actively have, can you please share you experience?当然我们可以尝试,但这意味着要浪费不少时间,所以如果有人已经做过类似的设置或者正在积极做,你能分享一下你的经验吗?

EDIT1 :编辑1

The D7-D2010 install was performed in chronological version order: D7-D2010 安装按时间版本顺序执行:

  • D7 + updates D7+更新
  • D2010 + updates D2010+更新

I've had no trouble ever installing many different versions of Delphi on the same machine. 我从未在同一台计算机上安装过许多不同版本的Delphi的麻烦。 It's a well supported configuration because, for example, component vendors need to be able to test all versions that they support. 这是一个受良好支持的配置,因为例如组件供应商需要能够测试他们支持的所有版本。

You can use one VM per Delphi, but you can equally well put all the versions of Delphi on the same machine. 每个Delphi可以使用一个VM,但也可以将所有版本的Delphi放在同一台计算机上。

When I put multiple Delphi versions onto a single machine I make sure that no version of Delphi is in the system PATH. 当我将多个Delphi版本放在一台计算机上时,请确保系统PATH中没有Delphi版本。 Then when I do automated command line builds I add to the PATH at the start of the build script. 然后,当我执行自动命令行构建时,我将在构建脚本的开头添加到PATH中。 That way I am sure I always get the desired version. 这样,我确信我总是能得到想要的版本。

It should work fine. 它应该工作正常。 I haven't tried your exact combination, but I'm running 7 and XE at home, and 2007 and XE2 at work. 我没有尝试过将您的确切组合使用,但是我正在家里运行7和XE,在工作中是2007和XE2。 No problems. 没问题。

However, you might think about putting the different versions on virtual machines, so you keep them (and all their components) separated, not risking to kill the configuration for one project when you change another. 但是,您可能会考虑将不同版本放置在虚拟机上,以便将它们(及其所有组件)分开,而不用冒着风险在更改另一个项目时取消一个项目的配置的风险。

You should be careful and always install Delphis in the chronological order, older releases first. 您应该小心并始终按时间顺序安装Delphis,首先是较早的版本。

You can run every version of Delphi from 7 to XE2 side-by-side without any problems. 您可以并行运行从7到XE2的每个版本的Delphi,而不会出现任何问题。 I'm doing this on my main dev machine here, as well as my clean dev VM. 我正在这里的主要开发机器以及干净的开发VM上执行此操作。

Just be sure that you install last the Delphi version that you wish to be the default when the shell opens a Delphi project or Pascal unit. 只要确保您在外壳程序打开Delphi项目或Pascal单元时安装了希望作为默认值的最后一个Delphi版本即可。

Specific different folders for all paths in all installations and it should work. 适用于所有安装中所有路径的特定文件夹,它应该可以工作。

For example \\Delphi XE1 \\Delphi XE2 例如\\ Delphi XE1 \\ Delphi XE2

or simply use Rad Studio 14.0\\ and so forth. 或直接使用Rad Studio 14.0 \\等。

Just make sure common files and documents and stuff like that goes into Rad Studio 14.0 as well. 只要确保通用文件和文档以及类似的东西也可以进入Rad Studio 14.0中即可。

So have one main folder for each delphi version and make sure the installer installs everything into that main version folder. 因此,每个delphi版本都有一个主文件夹,并确保安装程序将所有内容都安装到该主版本文件夹中。

Since I have started using XE3, I have had a nuisance problem where sporadically while compile and linking, an error would occur stating that the EXE could not be written because it already existed (ie it could not overwrite the existing EXE). 自从我开始使用XE3以来,我遇到了一个令人讨厌的问题,即在编译和链接时偶尔会出现一个错误,指出该EXE因为已经存在而无法写入(即它无法覆盖现有EXE),因此会出现错误。 I always ran Delphi7 and XE3 at the same time since I have large projects I maintain for both. 我总是同时运行Delphi7和XE3,因为我有同时维护的大型项目。 One day I was really having the problem often and it was driving me crazy so I started trying things. 有一天,我真的经常遇到问题,这让我发疯,所以我开始尝试一些事情。 One of those was to not run Delphi7 when running XE3 which turned out to be the culprit. 其中之一是在运行XE3时不运行Delphi7,这是罪魁祸首。 I was also getting random breakpoints when loading projects with XE3, and that problem was solved as well. 在使用XE3加载项目时,我也遇到了随机断点,这个问题也得到了解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM