Scripts to build an **unofficial** Rtools-esq installer for the macOS R toolchain
The repository contains the scripts used to create an installer package (
.pkg) that contains binaries used to create the CRAN official macOS R binary.
Specifically, the installer will try to download and install:
Moreover, the installer will attempt to clean up previous installations by removing configuration files
~/.Renvironthat are no longer used. Backups for each file will be presented with
.bckappended to the end.
For those interested, the installer can be obtained on either the project's release page or through http://go.illinois.edu/r-macos-rtools-pkg. The pre-built binaries this installer encloses can be found at https://developer.apple.com/download/more/ and https://github.com/fxcoudert/gfortran-for-macOS/releases.
Note The installer package was developed by James Joseph Balamuta and has no connection with the R project’s macOS CRAN maintainers. Financial support was provided to sign the installer by Professor Timothy Bates of the University of Edinburgh.
Once installed, you can start using compiled code in R like normal.
If you want to see behind the curtain, continue reading...
The macOS R toolchain installer performs four actions that require the user's password to accomplish. These actions are:
~/.Renviron(backups available with
gfortranversion to use
Note: The installer will remove any existing
~/.Renvironfiles. The existing files will be copied to a backup file, e.g.
Verify steps are conducted using embedded md5 hashes of the files. If the hash is not identical to what was embedded, the installer will exit. For details as to how this was implemented please see Issue 8: Verify pkg hash and the Pull Request 10: Feature Pkg Hash Verification.
As a result, the installer should have a "lock" icon in the upper right corner:
Clicking the lock icon will reveal the signed developer certificate:
With this being said, the code used to generate the installer has been made publically available under an open source license (GPL >= 2).
Below is an abridged version of the actions of each file provided.
Command Line Toolsdmg installer by using a headless cli check, downloads the installer from https://developer.apple.com/download/more/, and installs it using
~/.Renvironfiles will be backed up prior to being removed.
productbuildto create a
distribution.xml(title, background, ...)
productbuildto rebuild the package.
GPL (>= 2)