{
    "version": "2.41.8",
    "description": "A tabbed SSH solution for Windows, combining PuTTY, WinSCP and VcXsrv",
    "homepage": "https://winsshterm.blogspot.com/",
    "license": {
        "identifier": "Freeware",
        "url": "https://winsshterm.blogspot.com/p/license.html"
    },
    "depends": "putty",
    "suggest": {
        "Copy files": "extras/winscp",
        "X-server": "extras/vcxsrv"
    },
    "architecture": {
        "64bit": {
            "url": "https://github.com/WinSSHTerm/WinSSHTerm/releases/download/2.41.8/WinSSHTerm-2.41.8-x64.zip",
            "hash": "c9d1e9e742d5378c520e09204b75ed04bced2833850a5ed8666ce93199214739"
        },
        "arm64": {
            "url": "https://github.com/WinSSHTerm/WinSSHTerm/releases/download/2.41.8/WinSSHTerm-2.41.8-arm64.zip",
            "hash": "24baf2fbc3e41c123c035169659da33ccdc6881893e0493e389973e7cb487cf4"
        }
    },
    "extract_dir": "WinSSHTerm",
    "post_install": [
        "$puttyDir = currentdir putty $global",
        "'putty', 'pageant', 'plink', 'puttygen' | ForEach-Object {",
        "    if (Test-Path \"$puttyDir\\$_.exe\") {",
        "        New-Item -Path \"$dir\\tools\\$_.exe\" -Value \"$puttyDir\\$_.exe\" -ItemType HardLink -Force | Out-Null",
        "    } else {",
        "         error \"$_.exe not found\"",
        "    }",
        "}",
        "if (!(Test-Path \"$dir\\tools\\WinSCP\\WinSCP.exe\")) {",
        "    $winscpDir = currentdir winscp $global",
        "    if (Test-Path \"$winscpDir\\WinSCP.exe\") {",
        "        New-Item -Path \"$dir\\tools\\WinSCP\" -Value \"$winscpDir\" -ItemType Junction -Force | Out-Null",
        "    } else {",
        "        info 'Install WinSCP for File Transfer support'",
        "    }",
        "}",
        "if (!(Test-Path \"$dir\\tools\\VcXsrv\\vcxsrv.exe\")) {",
        "    $vcxsrvDir = currentdir vcxsrv $global",
        "    if (Test-Path \"$vcxsrvDir\\vcxsrv.exe\") {",
        "        New-Item -Path \"$dir\\tools\\VcXsrv\" -Value \"$vcxsrvDir\" -ItemType Junction -Force | Out-Null",
        "    } else {",
        "        info 'Install VcXsrv for X-Server support'",
        "    }",
        "}",
        "if (!(Test-Path \"$dir\\config\\preferences.xml\")) { ",
        "    $preferencesXml = '<?xml version=\"1.0\" encoding=\"utf-8\"?><Settings><CheckForXServer>False</CheckForXServer><CheckForWinSCP>False</CheckForWinSCP><CheckForPageant>False</CheckForPageant></Settings>'",
        "    Set-Content -Path \"$dir\\config\\preferences.xml\" -Value $preferencesXml -Encoding Ascii",
        "}"
    ],
    "env_set": {
        "WINSSHTERM_EXE_DISALLOW_AUTO_UPDATE": "TRUE"
    },
    "bin": "WinSSHTerm.exe",
    "shortcuts": [
        [
            "WinSSHTerm.exe",
            "WinSSHTerm"
        ]
    ],
    "persist": [
        "config",
        "tools"
    ],
    "checkver": {
        "github": "https://github.com/WinSSHTerm/WinSSHTerm"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://github.com/WinSSHTerm/WinSSHTerm/releases/download/$version/WinSSHTerm-$version-x64.zip"
            },
            "arm64": {
                "url": "https://github.com/WinSSHTerm/WinSSHTerm/releases/download/$version/WinSSHTerm-$version-arm64.zip"
            }
        },
        "hash": {
            "url": "https://winsshterm.blogspot.com/",
            "regex": "(?s)$basename.*?$sha256"
        }
    }
}
