The registry file is a JSON document with a single top-level JSON object which follows the schema described in just-install-v4.schema.json. This document roughly describes the format of the registry file for humans 😄
There are no examples in this document, the registry file itself is a living example of what you can do.
The top-level JSON object must contain two keys:
version
: Contains the version of the registry file and is used to prompt upgrades from older versions of just-install. The version is bumped each time we make a backward-incompatible change to the file format.packages
: This is a JSON object. Each key represents a package name and the value is itself a JSON object that contains the software version and instructions to get the installer. See "Package Entry" below for a description.
Each entry is a JSON object that must contain at least the following two keys:
installer
: A JSON object which describes where the installer is and how to run it once downloaded. See "Installer Options" below for a description.version
: The software's version. If you are adding an unversioned link that always points to the latest stable version uselatest
here.
The following key is optional:
skipAudit
: A boolean value that indicates whether CI should skip audits for this package. Use with care.
This JSON object must contain at least the following two keys:
x86
: The value is a string with the URL that must be used to download the installer. You can use{{.version}}
as a placeholder for the package's version.kind
: It can be one of the following:advancedinstaller
: Silently installs Advanced Installer packages;as-is
: Will run the executable as-is;copy
: Copy the file according to thedestination
parameter;custom
: Allows you to specify how to call the installer (example);innosetup
: Silently installs InnoSetup packages;msi
: Silently installs Windows Installer packages;nsis
: Silently installs NSIS packages;zip
: Runs an installer within a .zip file or extracts it to a destination directory.
options
: A JSON object whose contents depend on the value of thekind
, but other options are applicable to all installer types:extension
: Specify a custom extension for a file, in casejust-install
isn't able to determine it by itself (example).filename
: The complete name of the file that should be downloaded in the temporary directory. When specified, this value takes precedence overextension
.
Shims are a way to easily add executables to the %PATH%
. They are created only if the user has
installed exeproxy
(either through just-install
itself or manually) and only if the package
entry specifies some shims to create.
Take, for example, the
Go entry, which will create three executables called go.exe
, godoc.exe
and gofmt.exe
under %SystemDrive%\Shims
which will forward arguments to the original executable.
This way, users do not need to add a directory for each installed program to their %PATH%
since
they can just add %SystemDrive%\Shims
.
In some places, you can use the following placeholders:
{{.version}}
: This placeholder gets expanded with the package's version.{{.installer}}
: This placeholder gets replaced with the absolute path to the downloaded installer executable.{{.ENV_VAR}}
: WhereENV_VAR
is any environment variable found on the system. All environment variables are normalized to upper case so, for example,%SystemDrive%
becomes available as{{.SYSTEMDRIVE}}
. One exception is%ProgramFiles(x86)%
that gets normalized as{{.PROGRAMFILES_X86}}
(notice the lack of parentheses).