How to use different packages in one project for different versions of Delphi

We are slowly converting a large and complex collection of Delphi 6 projects into Delphi 2007.

In Delphi, I can use the compiler directives in the dpr, dpk, and pas files to make other code visible to different versions. For instance:

requires
  rtl,
  vcl,
  vclx,
  {$IFDEF VER180} //Delphi 2007 and later
  IndyCore,
  IndySystem,
  IndyProtocols;
  {$ELSE} //earlier than Delphi 2007
  IndyCore60,
  IndySystem60,
  IndyProtocols60;
  {$ENDIF}

However, I do not know how to do the same in a dof file. The above procedure requires a package that is used by the program. I want this program to have different package settings for different versions of Delphi. So I want to add something like the following to the dof file:

{$IFDEF VER180}
Packages=vcl;rtl;vclx;IndySystem;IndyCore;IndyProtocols;MyPackage;
{$ELSE}
Packages=vcl;rtl;vclx;IndySystem60;IndyCore60;IndyProtocols60;MyPackage;
{$ENDIF}

I am very new to Delphi 2007, so I hope that I am missing something really obvious!

Any suggestions received with thanks.

+3
2

Delphi 2007 dof. dproj.

2009 .

, , Delphi 6 2007?

-, 2010 ? Unicode ( , 2009/2010). IDE 2010 . . unicode - , 64 , unicode , .

. Delphi. .

+2

D2007 *.dof. YourProject.dproj. .

0

Source: https://habr.com/ru/post/1726041/


All Articles