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.
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!
To build R for Windows, you need:
- rtools40
- InnoSetup 6 (only required for installer)
- MikTex (only required for installer)
Rtools40 provides perl and all required system libraries.
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.
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.
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.