Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.
/ r-base-rtools40 Public archive

Scripts for building R for Windows using rtools40

Notifications You must be signed in to change notification settings

r-windows/r-base-rtools40

Repository files navigation

Base R Installer GHA Build Status

Scripts to build R for Windows (ucrt64) using Rtools40 toolchains.

This repository was used to build dailies and official releases for R 4.0.0 - 4.1.3. Sadly as of R 4.2.0, R-core has decided to go back to building the releases privately by an R-core member. Yet the current scripts and CI still work, and can be used for testing and understanding the build process.

Downloads

Signed builds can be found under releases. These installers are signed with a certified developer certificate, trusted by all Windows systems.

For the very latest svn builds, or testing patches, also checkout the r-contributor svn-dashboard!

Build requirements

To build R for Windows, you need:

Rtools40 provides perl and all required system libraries.

How to build yourself

Clone or download this repository. Optionally edit MkRules.local.in to adjust compiler flags. Now open any rtools msys2 shell from the Windows start menu.

win10

To build the latest R-devel from source, run the ./build.sh script inside the rtools40 bash shell. This will download and build a complete ucrt64 version of R-devel, but no manuals or the installer.

This is useful if you want to test a patch for base R. You can adjust the ./build.sh script to add patches.

Building the full installer

Alternatively to build the complete installer as it would appear on CRAN, set an environment variable build_installer when running the build script:

# Run in rtools40 shell
export build_installer=1
./build.sh

This requires you have innosetup and latex installed on your machine (in addition to rtools40). The process involves building R as well as pdf manuals and finally the installer program.