Local GetIt Packages Actions Data Index

From RAD Studio
Jump to: navigation, search

Go Up to GetIt Local Files Guide Index


Each GetIt item defines a list of actions that users can perform using the RAD Studio IDE. Each action includes the numeric value, the name, a summary description, and a list of required and optional parameters.

Roles

The following are descriptions for each role:

  • Id: unique identifier of the action. It must be different from any other action of the same GetIt package. The numeric value also determines the sequence of execution of actions associated with the same event (see Type below). All actions after Download will be executed in their numeric Id sequence.
  • ActionId: indicates the number of the actual action to be executed. The relevant actions and their IDs are listed below in this documentation guide. You need to refer to them by number in the JSON configuration file.
  • Type: indicates the event (using a numeric value) the action is associated with, that is, when in the process, the action is triggered. In other words, this needs to be a number from 1 to 6, tied to events like After Download or Before Uninstall.
  • RequireElevation: indicates if the specific actions require UAC. This works in conjunction with the same setting at the package configuration (both need to be set).
  • Parameter: shows a list of one or more positional parameters. The role of a parameter strictly depends on the action being executed (each action has a different number of parameters and a different value and role).
  • ActionName: is the optional description of the action and should match the ActionId numeric value to keep the JSON configuration file more readable.
  • Description: is a description of the action (displayed by the GetIt UI in the progress dialog and logged to a file, along with the ActionID and ActionName).


The following is an example of the mentioned items in use:

"Actions": [
{
    “Id": "1",
    …
  }
]

An individual action definition has fields like the following:

{
  "Id": "1",
  “ActionId": "6",
  "Type": "2",
  "RequireElevation": "0",
  "Parameter": [
    { "Parameter": "packages\\Sydney\\Delphi\\AbbreviaD.dproj" },
    { "Parameter": "Win32" },
    { "Parameter": "Release" }
  ],
  "ActionName": "CompileProject",
  "Description": "Compile AbbreviaD.dproj"
}
Note: The examples below use a “code notation”, like AddOptionPath("source\", "cPasLibraryPath", "Delphi.Personality", "Win32" and not the JSON notation used by the file.

Events

By default, all the system does with a GetIt package is expand the ZIP file in the catalog repository folder. It is possible to define actions to be executed during the installation (or uninstallation) process. Each action of a package is associated with an event.

We can use the following events (the number is indicated as action “type”, see above Type=2 for After download):

  1. Before Download: Occurs before downloading a catalog item and cannot use any elements of the download files. Action is ignored if the item is already in the cache.
  2. After Download: Executes after downloading and extracting a catalog item. It is ignored if the item is already in the cache.
  3. Before Install: Executes before the installation of a catalog item.
  4. After Install: Executes after the installation of a catalog item.
  5. Before Uninstall: Executes before the uninstallation of a catalog item removing it from the cache.
  6. After Uninstall: Executes after the uninstallation of a catalog item and cannot use any elements of the download files, as they have already been deleted.

The sections below describe each type of action (or event) listed by number.

Available Actions

ActionName ActionID
AddOptionPath 1
RemoveOptionPath 2
ExecuteProgram 3
InstallCHM 4
UninstallCHM 5
CompileProject 6
CleanProject 29
InstallPackage 7
UninstallPackage 8
UninstallProgram 11
ExecuteCommand 12
WarmNeededIDERestart 16
InstallIDEPackage 17
UninstallIDEPackage 18
CopyFile 19
UnzipFile 20
RestartIDE 21
AddValueToRegistry 24
DeleteValueFromRegistry 25
DeleteFile 32
AddEnvironmentVariable 33
RemoveEnvironmentVariable 34
AddTemporalVariable 35
RemoveTemporalVariable 36
MoveFile 37
ReplaceStrFromFile 38
CreateShortcut 39
CopyFolder 40
OpenCloseProject 41
MoveFolder 42
Predefined Temporary Variables

See Also

  • Sample Code