Downloads a pre-compiled GLM binary for the current platform, verifies it
against its published SHA256 checksum, and installs it into a persistent
user cache directory. Binaries are attached as assets to AEME's GitHub
releases (tagged with the AEME package version, e.g. "0.4.0"), with the
GLM version encoded in the asset filename (e.g. glm-windows-3.9.108.zip).
Because a given GLM version isn't tied to any one AEME release, this
function searches across all releases of repo to find the release that
has the requested version's asset attached.
Usage
install_glm_aed(
version = "latest",
os = NULL,
repo = "limnotrack/AEME",
force = FALSE,
quiet = FALSE
)Arguments
- version
Character. The GLM version to install, e.g.
"3.9.108". Uselist_glm_versions()to see what's available. A trailing"+"(e.g."4.0.0+") selects the GLM+ (AED+) build of that version – the same binary plus the privatelibaed-riparian/-light/-devmodules. Defaults to"latest", which resolves to the highest version number available for the current platform (preferring the"+"edition on a tie).- os
Character. One of
"windows","macos", or"linux". Defaults to the platform R is currently running on; you shouldn't normally need to set this.- repo
Character. The
"owner/repo"GitHub repository that GLM binaries are attached to. Defaults to"limnotrack/AEME".- force
Logical. If
FALSE(the default) and this version is already installed for this platform, the download/verification steps are skipped and the existing path is returned. Set toTRUEto re-download and reinstall anyway.- quiet
Logical. If
TRUE, suppresses progress messages (download errors and checksum failures still raise, and are never silenced).
Details
Binaries are cached under tools::R_user_dir("AEME", "data"),
in a <os>/<version>/ subdirectory - by default this resolves to
~/.local/share/R/AEME on Linux, ~/Library/Application Support/org.R-project.R/R/AEME
on macOS, and %APPDATA%\R\data\R\AEME on Windows (overridable via the
R_USER_DATA_DIR/XDG_DATA_HOME environment variables - see
tools::R_user_dir for details). Multiple GLM versions can be installed
side by side and switched between via the version argument to
glm_exe_path() without re-downloading.
Every binary is published alongside a .sha256 checksum file in the same
release. This function downloads both, recomputes the SHA256 of the
downloaded zip locally, and compares it to the published value before
extracting anything. If the checksums don't match, or if no checksum file
is found at all, installation is aborted and nothing is extracted - this
function will not install an unverified binary under any circumstances.
See also
list_glm_versions() to discover available versions,
glm_exe_path() to locate an already-installed executable.
