views:

1707

answers:

4

Just bought Delphi 2010 (having skipped 2009) and I am trying to get my project to compile. However, I am running in to a bunch of problems compiling Virtual Treeview 4.8.5. Can someone outline a fool proof way of compiling and installing Virtual Treeview in Delphi 2010?

+5  A: 

If you have subversion, grab the latest (v5.00) from http://virtual-treeview.googlecode.com/svn/ In the trunk/Delphi folder, there is Delphi 2009 DPKs. It should be a simple thing to upgrade them to Delphi 2010.

Nick Ring
So, you have tried that approach with Delphi 2010?
Christer Fahlgren
+1  A: 

Well, I haven't used it, but I've updated a few other components and there are some general tricks that could help. The first thing I'd do is check and see if there's an include file that all or almost all of the units use, with a bunch of $DEFINEs for various Delphi versions. If so, you'll probably need to update it for Delphi 2010. That's the most likely source of your problems, since according to Nick Ring there's a working D2009 version so Unicode conversion isn't an issue.

Mason Wheeler
A: 

I just did it myself. Starting with the 2009 version, just edit the two compiler.inc files (one in source, one in design directories). As Mason said, just copy the part that defines using VER200 and change the VER200 to VER210. Built and installed without problems. Good luck!

MarkF
+1  A: 

Based on Nicks suggestion here is what I did.

I grabbed the latest from the trunk using TortoiseSVN.

Modified Common/Compilers.inc and added these two sections

// RAD STUDIO 2010 (BDS 7.0) DELPHI and BCB are no longer defined, only COMPILER
 {$ifdef VER210}
   {$define COMPILER_14}
 {$endif VER210}

And a bit later on in the file

 {$ifdef COMPILER_14}
     {$define COMPILER_1_UP}
     {$define COMPILER_2_UP}
     {$define COMPILER_3_UP}
     {$define COMPILER_4_UP}
     {$define COMPILER_5_UP}
     {$define COMPILER_6_UP}
     {$define COMPILER_7_UP}
     {$define COMPILER_8_UP}
     {$define COMPILER_9_UP}
     {$define COMPILER_10_UP}
     {$define COMPILER_11_UP}
     {$define COMPILER_12_UP}
     {$define COMPILER_14_UP}
     // Backwards compatibility
     {$define DELPHI_2_UP}
     {$define DELPHI_3_UP}
     {$define DELPHI_4_UP}
     {$define DELPHI_5_UP}
     {$define DELPHI_6_UP}
     {$define DELPHI_7_UP}
     {$define DELPHI_8_UP}
     {$define DELPHI_9_UP}
     {$define CPPB_3_UP}
     {$define CPPB_4_UP}
     {$define CPPB_5_UP}
     {$define CPPB_6_UP}

     {$ifdef BCB}
       {$define CPPB}
     {$else}
       {$define DELPHI}
     {$endif}
    {$endif}

Then I just had to add the Common, Source and Design folders to the source path when compiling. Then compile VirtualTreesD12.dpk, then VirtualTreesD12D.dpk.

Now on to the next problem...

Christer Fahlgren