Building base R using rtools40
Scripts to build R for Windows using Rtools40 toolchains. This version automatically gets built, checked, and deployed every day to CRAN.
To build R for Windows yourself, you need:
- rtools40
- InnoSetup 6 (only required to build the full installer)
- MikTex
Rtools40 provides perl and all required system libraries so we no longer need any special "extsoft" file like we did in the past.
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.
The ./quick-build.sh
script shows how to build a local single-architecture version of R from a source tarball.
To build, run the ./quick-build.sh
script inside the rtools40 bash shell. This will build a complete 64-bit version of R, but not 32-bit R and also not manuals or the installer.
This is useful if you want to test a patch for base R. Obviously you can adjust the ./quick-build.sh
script to add patches.
Alternatively run ./full-build.sh
to build the complete installer as it appears on CRAN. This can take about 2 hours and requires you have innosetup and latex installed on your machine (in addition to rtools40). The process involves building both 32 and 64 bit R, as well as pdf manuals and finally the installer program.