scoop-games/bucket/mednaffe.json

60 lines
2.6 KiB
JSON

{
"homepage": "https://github.com/AmatCoder/mednaffe/",
"description": "Front-end for Mednafen",
"version": "0.9.2",
"license": "GPL-3.0-only",
"url": "https://github.com/AmatCoder/mednaffe/releases/download/0.9.2/mednaffe-0.9.2-win.zip",
"hash": "e172f24c656dbc0d07bbeb67de03481b119be155997749697d12f9f33b60af00",
"depends": "sudo",
"pre_install": [
"$medinst = 0",
"if (Test-Path \"$scoopdir\\apps\\mednafen\\current\\mednafen.exe\") {",
" $medinst = 1",
"}",
"elseif (Test-Path \"$scoopdir\\apps\\mednafen-dev\\current\\mednafen.exe\") {",
" $medinst = 2",
"}",
"if ((Test-Path \"$scoopdir\\apps\\mednafen\\current\\mednafen.exe\") -and (Test-Path \"$scoopdir\\apps\\mednafen-dev\\current\\mednafen.exe\")) {",
" Write-Host -ForegroundColor Yellow \"Mednafen and Mednafen-dev were found on this system.\"",
" Write-Host -ForegroundColor Yellow \"Choose one to use mednaffe with, 1 (stable) or 2 (dev)\"",
" $medinst = Read-Host -Prompt \"[1, 2]\"",
"}",
"if ($medinst -eq 0) {",
" Write-Host -ForegroundColor Yellow \"No Mednafen installation was found on this system.\"",
" Write-Host -ForegroundColor Yellow \"Choose 1 to install Mednafen stable, 2 for Mednafen-dev, or 3 to cancel the install.\"",
" $medinst = Read-Host -Prompt \"[1, 2, 3]\"",
" switch ($medinst) {",
" 1 {scoop install mednafen}",
" 2 {scoop install mednafen-dev}",
" 3 {Write-Error -Message \"Install aborted.\" -Category NotInstalled",
" scoop uninstall mednaffe",
" exit 1",
" }",
" }",
"}"
],
"bin": "mednaffe.exe",
"shortcuts": [
[
"mednaffe.exe",
"Mednaffe"
]
],
"installer": {
"script": [
"if (!(Test-Path \"$persist_dir\\mednafen.cfg\")) {",
" New-Item \"$persist_dir\" -ItemType Directory | Out-Null",
" switch ($medinst) {",
" 1 {sudo New-Item -ItemType HardLink -Path \"$persist_dir\\mednafen.cfg\" -Target \"$scoopdir\\persist\\mednafen\\mednafen.cfg\" | Out-Null}",
" 2 {sudo New-Item -ItemType HardLink -Path \"$persist_dir\\mednafen.cfg\" -Target \"$scoopdir\\persist\\mednafen-dev\\mednafen.cfg\" | Out-Null}",
" }",
"}"
]
},
"persist": "mednafen.cfg",
"checkver": "github",
"autoupdate": {
"url": "https://github.com/AmatCoder/mednaffe/releases/download/$version/mednaffe-$version-win.zip"
}
}