{ "version": "4.0.0", "description": "Tools for building packages for R under Microsoft Windows, or for building R itself.", "homepage": "https://cloud.r-project.org/bin/windows/Rtools", "license": "BSD-3-Clause", "notes": "For R 3.3.x to 3.6.x, please use 'versions/rtools35'.", "architecture": { "64bit": { "url": "https://cloud.r-project.org/bin/windows/Rtools/rtools40v2-x86_64.exe", "hash": "3a41212b16523473e6343680d665c5dcc23d068d63c28f0d4ce91c5ce50960dd" }, "32bit": { "url": "https://cloud.r-project.org/bin/windows/Rtools/rtools40-i686.exe", "hash": "70d95372a818ae81e1e41c57751068d8bac322cf117b970bb00e76d5ec618898" } }, "innosetup": true, "installer": { "script": [ "'r', 'mro' | ForEach-Object {", " if ((current_version $_ $global) -match '^4') {", " $renvloc = (versiondir $_ (current_version $_ $global) $global) + '\\etc\\Renviron.site'", " if (Test-Path $renvloc) {", " $renv = Get-Content $renvloc -Encoding ASCII", " } else {", " $renv = @()", " }", " $rtoolspath = \"$dir\\usr\\bin\"", " if ($renv -cmatch 'PATH=') {", " $renv = $renv -replace 'PATH=\"(.*)', ('PATH=\"' + $rtoolspath + ';$1')", " } else {", " $renv += \"`r`nPATH=\", '\"', $rtoolspath, ';${PATH}\"' -join ''", " }", " $renv | Set-Content $renvloc -Encoding ASCII", " }", "}", "if (Test-Path 'C:\\rtools40') {", " if ($null -eq (Get-Item 'C:\\rtools40').LinkType) {", " Rename-Item -Path 'C:\\rtools40' -NewName 'rtools40.old' -Force", " } else {", " Remove-Item -Path 'C:\\rtools40' -Force", " }", "}", "New-Item -Path 'C:\\rtools40' -Target \"$dir\" -ItemType Junction | Out-Null" ] }, "uninstaller": { "script": [ "'r', 'mro' | ForEach-Object {", " if ((current_version $_ $global) -match '^4') {", " $renvloc = (versiondir $_ (current_version $_ $global) $global) + '\\etc\\Renviron.site'", " if (Test-Path $renvloc) {", " $renv = Get-Content $renvloc -Encoding ASCII", " } else {", " $renv = @()", " }", " $renv = $renv -replace '[^;\"]*rtools.*?;', ''", " $renv | Set-Content $renvloc -Encoding ASCII", " }", "}", "if ((Test-Path 'C:\\rtools40') -and ($null -ne (Get-Item 'C:\\rtools40').LinkType)) {", " Remove-Item -Path 'C:\\rtools40' -Force", "}", "if (Test-Path 'C:\\rtools40.old') {", " Rename-Item -Path 'C:\\rtools40.old' -NewName 'rtools40' -Force", "}" ] }, "checkver": { "url": "https://cloud.r-project.org/bin/windows/Rtools/VERSION.txt", "regex": "([\\d.]+)" }, "autoupdate": { "architecture": { "64bit": { "url": "https://cloud.r-project.org/bin/windows/Rtools/rtools$majorVersion$minorVersion-x86_64.exe" }, "32bit": { "url": "https://cloud.r-project.org/bin/windows/Rtools/rtools$majorVersion$minorVersion-i686.exe" } } } }