79649935

Date: 2025-06-02 15:38:41
Score: 0.5
Natty:
Report link

I managed to achieve copying a Linux SDK from a working to a new PC with the following combination of file copying and registry editing (and thanks to SilverWarrior's mention of the .sdk file in a comment) (but I still have found no way to accomplish this via the IDE itself, so any tips about that are still welcome):

  1. Make sure that Delphi is closed on at least the new PC.

  2. Copy the SDK folder (including all files and subfolders) from the working PC to the new PC. (It might be most practical to zip the folder on the working PC, then transfer the zip file to the new PC, then unzip it there.) The SDK files are located in the place shown in Tools > Options > Deployment > SDK Manager, when the SDK is selected. "Local root directory" for the SDK might be for example $(BDSPLATFORMSDKSDIR)\ubuntu20.04.sdk.
    Screenshot of Delphi Tools > Options > SDK Manager

    BDSPLATFORMSDKSDIR is an environment variable in Delphi, whose value can be checked under Tools > Options > IDE > Environment variables. Note that the value can be overridden, so you have to check both the top and the bottom list.
    Screenshot of Delphi Tools > Options > Environment Variables

  3. Copy the .sdk file from the working PC to the new PC. The .sdk file is located in %APPDATA%\Embarcadero\BDS\23.0. (In my example, the .sdk file was named ubuntu20.04.sdk.)

  4. Edit the file EnvOptions.proj on the new PC, search for <PropertyGroup Condition="'$(Platform)'=='Linux64'">, and below that, modify this line:
    <DefaultPlatformSDK/>
    to this (using your own .sdk file name):
    <DefaultPlatformSDK>ubuntu20.04.sdk</DefaultPlatformSDK>

  5. Use the Registry Editor (regedit) on the working PC to locate the key Software\Embarcadero\BDS\23.0\PlatformSDKs under HKEY_CURRENT_USER. Export this key (or, if you have several SDKs and want to copy only one of them, select the specific SDK subkey) to a .reg file.
    Regedit showing the PlatformSDKs key

  6. Copy the .reg file to the new PC, right-click it there, and choose "Merge" so that it gets imported into the registry on the new PC.

After this, the SDK shows up in Delphi on the new PC, and Linux projects can be compiled using it.

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Blacklisted phrase (1): any tips
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
Posted by: Matthias B