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.