Seleting an app for installation by Bench is called activating the app. Apps can be activated explicitly by the user, or they can be activated implicitly because they are required by Bench or another app. An activated app can be explicitly deactivated by the user. The activation and deactivation of apps is stored in two simple text files.
Usually the activation of apps is enough. But under some rare circumstances it can be helpful to suppress a required or implicitely activated app. Only then it is necessary to use the feature for deactivating an app.
The List of Active Apps
When Bench runs its tasks for download, app setup, environment setup, app removal, and others, it uses a list of active apps to know which apps to setup or remove. To compile this list, Bench reads the following files
lib\applibs\<app lib name>\apps.md
The compilation works in the following order:
- At first Bench reads the loaded app libraries
- Next it reads the User App Library
config\app.mdto load overrides and user defined apps.
- Some apps in the bench core app library are listed in the app category Required and are thereby activated implicitely.
- Bench than reads the user activated apps in
config\apps-activated.txtand activates the listed apps explicitely.
- Bench than evaluates the dependencies of the activated apps recursively, and implicitely activates all apps listed as dependencies for activated apps.
- At last Bench reads the deactivated apps in
config\app-deactivated.txtand deactivates the listed apps explicitely.
The list of active apps consists of all apps, which are activated – explicitely or implicitely – and are not deactivated.
Apps of the type Group App have no app resources and no executables, instead they just have a list of dependencies. If such an app is activated, all dependencies are activated implicitely.
This pattern is useful to group a number of apps for some scenario under one descriptive name.
Activation and Deactivation
The user currently has two options to activate or deactivate an app.
The first one is by using the setup dialog of the Bench Dashboard.
The second one is to edit the text files
apps-deactivated.txt with a text editor and run
the Bench auto setup afterwards.
Activation with Bench Dashboard
To activate or deactivate an app in the Bench Dashboard, open the setup dialog and just click on the checkboxes in the app list. After making your app selection, you have to run the Bench Auto Setup, to make the needed changes to the Bench installation.
Activation by Editing Text Files
- The file must be an UTF8 encoded text file.
- Every non empty line, which is not commented with a
#is interpreted as an app ID.
- Only non-space characters, up to the first space or the end of a line, are considered.
This example shows a possible text file for listing apps
# --- Activated Apps --- # AppA AppB this app has a comment AppC (this app ID is valid, despite the fact, that it is indended) # AppD (this app is not activated, because the line is commented out) AppE # how a comment after the app ID starts is irrelevant # but a # sign is recommended
The parsing of such app list is implemented in Mastersign.Bench.ActivationFile.