Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

Streamlining RAD Studio Upgrades with GetIt

Streamlining RAD Studio Upgrades with GetIt 113

This guide covers streamlining GetIt packages during and upgrade and installation for a smoother upgrade experience.

When upgrading between major versions, the Settings Migration Tool simplifies keeping your settings. It is also great for migrating a subset of your settings between alternative registry keys. When upgrading minor versions, your registry settings are automatically persisted if you use the default settings during the upgrade, but it is still a good idea to use the settings tool to backup your settings.

It would also be nice to keep your GetIt packages installed. Both over minor releases and major releases. With the new release of 11.3 Alexandria I’ll walk you through my process for streamlining upgrades using the GetItCmd.exe command-line too. You can simplify the process with David Cornelius’ excellent AutoGetIt too. I’ll show both via the command-line too, and with AutoGetIt.

Prerequisites

When using GetItCmd.exe there are a few prerequisites. AutoGetIt uses GetItCmd automatically behind the scenes.

  1. RAD Studio is installed and on your path (it usually is by default)
  2. Use Command Prompt, not PowerShell. If you launch PowerShell, you can use cmd to switch.
    • I recommend using an elevated command prompt (ran with Administrator privileges). If you don’t, then it may prompt you for one or more elevations.
  3. Run rsvars.bat to set up all the environment variables.

1) Backup Package List

A good developer always has backups (plural!) especially before starting something like an upgrade. Let’s create a backup list of our installed GetIt packages.

[crayon-673f58190be6f610161565/]

The output will look something like

[crayon-673f58190be78135081249/]

That first column is what you need to backup. Just redirect it to a text file, open it in your favorite text editor, and use a column select to remove the extra text. AutoGetIt has a feature to do this automatically.

  1. Select Installed Only
  2. Refresh Package List
  3. Context Menu Check All or Ctrl+A
  4. Context Menu Save Checked Items or Ctrl+S

2) Uninstall GetIt Packages (minor updates)

Behind the scenes the RAD Studio installed uses the GetIt package manager. When you upgrade a minor release (e.g. going from 11.2 to 11.3) it uninstalls all GetIt packages but uses a different process. I’ve found this sometimes causes errors after the new version is installed as it still tries to load some packages. So if you are performing a minor update, then I recommend uninstalling your GetIt packages first.

Note: If you are moving to a new major version of RAD Studio then you don’t need to uninstall the packages first as nothing is installed during the upgrade process.

[crayon-673f58190be7a936427868/]

Or from AutoGetIt just use the Uninstall checked context menu item.

3) Perform the RAD Studio Upgrade

Now just upgrade RAD Studio as usual. I recommend backing up your settings with the Migration Assistant, but if you like to live dangerously that is your call.

4) Check GetIt Package Versions

If you are migrating your packages to a new major version, or even on some minor upgrades, some of the package numbers may have changed. So it might be a good idea to export the full package list for the new install, then do a comparison with the best text compare tool and see if the version numbers changed. If they did, you will want to change the version numbers before installing the packages again, otherwise they will fail to install.

[crayon-673f58190be7c248722194/]

From AutoGetIt

  1. Uncheck Installed Only
  2. Refresh Package List
  3. Context Menu Check All or Ctrl+A
  4. Context Menu Saved checked items or Ctrl+S

I found it easiest to spot changes if you sort the lists first. You can use UltraEdit’s Sort function or the sort command-line utility included with Windows. Then when viewing in Beyond Compare only show differences and hide context to spot any issues quickly. Notice the preview on the left only shows one difference for the right file, which is our package list. When we look at the package list we see that is the 11.2 Patch 1, which naturally isn’t available in 11.3.

5) Reinstall GetIt Packages

Once you’ve finished installing RAD Studio, close the IDE and reinstall your GetIt packages. The -ae argument automatically accepts the EULA prompts.

[crayon-673f58190be7d598589947/]

In AutoGetIt

  1. Uncheck Installed Only
  2. Refresh Package List
  3. Context menu Load checked items to load your saved list.
  4. Context menu Install checked.

Summary and Notes

Just fire up your new RAD Studio, and all your packages installed with none of those pesky error messages. A much smoother process.

  1. Backup GetIt Package List
  2. Uninstall GetIt Packages (for minor version upgrades)
  3. Upgrade/Install new RAD Studio version
  4. Check version package numbers
  5. Install GetIt Packages

Enjoy your improved productivity with RAD Studio 11.3 Alexandria.

Exit mobile version