mirror of
https://github.com/ScoopInstaller/Main.git
synced 2025-11-01 22:31:19 +00:00
78 lines
3.3 KiB
JSON
78 lines
3.3 KiB
JSON
{
|
|
"version": "4.0.20220206",
|
|
"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://github.com/r-windows/rtools-installer/releases/download/2022-02-06/rtools40-x86_64.exe",
|
|
"hash": "6f6b363ee7c7e58aaa51e58f37f910226e60f0dfd47417106250b5ce4d1c2727"
|
|
}
|
|
},
|
|
"innosetup": true,
|
|
"installer": {
|
|
"script": [
|
|
"'r', 'mro' | ForEach-Object {",
|
|
" if ((Select-CurrentVersion $_ $global) -match '^4') {",
|
|
" $renvloc = (versiondir $_ (Select-CurrentVersion $_ $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 ((Select-CurrentVersion $_ $global) -match '^4') {",
|
|
" $renvloc = (versiondir $_ (Select-CurrentVersion $_ $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": {
|
|
"github": "https://github.com/r-windows/rtools-installer",
|
|
"regex": "/tag/(\\d+)-(\\d+)-(\\d+)",
|
|
"replace": "4.0.${1}${2}${3}"
|
|
},
|
|
"autoupdate": {
|
|
"architecture": {
|
|
"64bit": {
|
|
"url": "https://github.com/r-windows/rtools-installer/releases/download/$match1-$match2-$match3/rtools40-x86_64.exe"
|
|
}
|
|
}
|
|
}
|
|
}
|