Migrating GExperts settings

 Delphi, GExperts  Comments Off on Migrating GExperts settings
Nov 302020
 

Somebody just asked me whether there is a simple way to migrate GExperts settings from Delphi XE7 to a new version.

The short answer is: No, but some experts (or rather: some functionality, because not everything is wrapped into an expert) have an ex- and import function.

I also started to write a general ex- and import function for GExperts but never finished it. Real life tends to intrude on open source programming. 😉

The long answer would be: Yes, you can do that by copying the registry entries and configuration files:

  • Export the GExperts registry key to a file
  • Edit that file to match the new Delphi version
  • Import the edited file into the registry.

The GExperts registry key is located under the registry key of the corresponding Delphi version. For XE7 that would be

HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\15.0\GExperts-1.3

The exported file will contain many sections in the form

[HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\15.0\GExperts-1.3]

[HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\15.0\GExperts-1.3\ASCIIChart]
"Font Size"=dword:0000000a
"Font Name"="Tahoma"
"Font Base"=dword:00000000
"Edit Display Text"="±"
"Show Hex"="0"
"Zoom Font Size"=dword:00000020
"Show Hint"="1"
"Left"=dword:000002a9
"Top"=dword:0000016b
"Width"=dword:0000022e
"Height"=dword:000001b2
"TotalCallCount"=dword:00000000

Here you will have to change the BDS version (15.0) to the version of your new Delphi.

In addition there are multiple entries that refer to the Delphi installation directory, e.g.:

[HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\15.0\GExperts-1.3\Grep\DirectoryList]
"Count"=dword:00000003
"GrepDir0"="C:\\Delphi\\DelphiXE7\\Source\\VCL"
"GrepDir1"="C:\\Delphi\\DelphiXE7\\Source\\rtl"
"GrepDir2"="C:\\Delphi\\DelphiXE7\\Source\\fmx"

or

[HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\15.0\GExperts-1.3\Misc]
"VCLPath"="C:\\Delphi\\DelphiXE7\\Source\\VCL\\"
"ConfigPath"="C:\\Users\\twm\\AppData\\Roaming\\GExperts\\RAD Studio XE 7\\"
"HelpFile"="D:\\source\\_sourceforge\\gexperts\\editorexpert\\GExperts.chm"
"AlphabetizeMenu"="1"
"EditorExpertsEnabled"="1"
"PlaceGxMainMenuInToolsMenu"="0"
"EditorEnhancementsEnabled"="0"
"EnableCustomFont"="0"
"HideWindowMenu"="0"
"MoveComponentMenu"="0"
"CachingPath"="C:\\Users\\twm\\AppData\\Local\\Gexperts\\RAD Studio XE 7\\"

You will have to change all these and if you get them wrong, GExperts might not work after you have imported them.

In addition, some of the experts store additional configuration files in the ConfigPath (which is configured in the last section shown above). You will also have to copy these files.

But not all is lost:
You probably know which experts you regularly use and are worth migrating the settings, so delete everything but these settings, edit them and the triple check them. That’s easier and less error prone than summarily editing all of them. Then only import the settings for these experts. Again: Don’t forget the files the experts might have stored in the configuration directory.

 Posted by on 2020-11-30 at 14:28

PortableAppsToStartMenu 1.0.0

 Delphi  Comments Off on PortableAppsToStartMenu 1.0.0
Nov 012020
 

Tired of all those programs which install lots of additional stuff I have been using more and more so called “Portable Apps”. “Portable” in this context means: You can put them anywhere, even on a portable storage device and start them from there. These Programs are still Windows only. And of course nobody prevents you from putting them in a folder on the system harddisk, usually c:\PortableApps. All files these programs need are inside this one folder, so in order to move or copy them, you simply move/copy that folder.

There is a dedicated launcher and updater for these types of programs at portableapps.com, which is written in Delphi btw. and the source code is available.

One thing that has irked me all the time is that these programs don’t show up in the Windows start menu, unless I add them manually, which I usually don’t. Today I had enough and wrote PortableAppsToStartMenu, a tool which given a PortableApps directory collects all the executables stored there and creates shortcuts in the Windows Start Menu for them. They will be visible in the PortableApps folder there. Apparently there was no such tool so far.

This is what the program looks like:

Some feature highlights:

  • You can drag the PortableApps directory on the entry field to set it.
  • The entry field has autocompletion for directories.
  • There are options to
    • Hide the Portable Apps Platform tools
    • Hide apps hidden in the launcher
    • Hide the “Portable” part of the executable name
  • It’s also possible to select the apps manually, but that’s rather cumbersome.

And these are the entries it has added to my start menu:

The entries are also available through the Start Menu’s usual search/filter functionality:

The program itself is of course a portable app, but not available from portableapps.com but only from OSDN. The program is written in in Delphi 10.2 and the source code is also available there.

If you want to discuss this article, go to the related post in the international DelphiPraxis forum.

 Posted by on 2020-11-01 at 18:49