TntUnicode (now TMSUnicode) Controls Saga

Due to the TNTUnicode controls saga I have flip-flopped and TNT is now an option in all Mustangpeak packages.  If you are, or desire to, use TNT (or the new TMS controls) you MUST edit the packages to include the required TNT (or TMS) packages.  This is NOT optional.  The compile will install the controls without Unicode support. If you then recompile using the {$DEFINE TNTSUPPORT} conditional define Delphi will likely not complain about not having the TNT packages in the Requires section of the Mustangpeak packages.  If you run and deliver an application compiled like this I will stake my life that eventually you will have strange unexplainable AV's eventually.  There is a reason that I will not go into but you may search on "implicit import" on the Web for more information. 

How do I deal with this?

First open the install folder for the particular Mustangpeak package, here we are in the Common Library install folder.  I create a new folder called Delphi Dev (but you can call it Tnt Delphi or anything you like).  Copy all the files from the Delphi folder into this new folder. 

Tnt

 

Now open the package for your particular IDE, for me that would be D7 in a text editor.

Now add the corresponding TNT runtime package to the requires section,  and update the Column Selection Form to use the Unicode enabled version for VirtualShellTools as shown.

Save and close.  Now open the {PackageInstallPath}\Include\AddIns.inc file and uncomment out the {$DEFINE TNTSUPPORT} line so you don't have to remember to do this with every project.

Repeat this for all Mustangpeak Packages and while you are at it do the same for VirtualTreeview.  Don't forget you have to have TNT controls installed before compiling the Mustangpeak packages.

Now compile all the packages.  Open the corresponding designtime packages, [MustangpeakPackage]D7D.dpk, and compile compile them too.  Then press the install button to install the package in the IDE.  You will likely get several error messages during the compile as there will be inconsistencies between the packages as you link in the TNT controls.  Just answer yes to the questions.

Why go through all this?  Now when you update your Mustangpeak packages you don't have to do this all over again.  Install the new files with the package installer as usual.  Now open the packages (I create a Package Group that includes all the packages in the Delphi Dev folders I want to compile in one shot) and recompile them.   They will be compiled with the TNT (or TMS) packages correctly and the resulting bpl file will be correct. 

There is one exception to this.  The installer will write a new Addins.inc file and {$DEFINE TNTSUPPORT} will need to be uncommented out after the update.

Now create a new application and define TNTSUPPORT in the options dialog.  This is double protection just in case the Addins.inc has been overwritten as mentioned above, it is not strictly necessary.

And you are ready to go.

 

 


mustangpeak.net

  Last Modified on: