{
    "version": "2.4.7",
    "description": "Continuation of Clash Verge - A Clash Meta GUI based on Tauri.",
    "homepage": "https://github.com/clash-verge-rev/clash-verge-rev",
    "license": "GPL-3.0-only",
    "architecture": {
        "64bit": {
            "url": "https://github.com/clash-verge-rev/clash-verge-rev/releases/download/v2.4.7/Clash.Verge_2.4.7_x64-setup.exe#/dl.7z",
            "hash": "6642881b212bcd4766e81d56aec7497063ba5198c287f7d00a2ecf13b6f8b61a"
        },
        "arm64": {
            "url": "https://github.com/clash-verge-rev/clash-verge-rev/releases/download/v2.4.7/Clash.Verge_2.4.7_arm64-setup.exe#/dl.7z",
            "hash": "7f522be46e6abae89a4905ba4914ad7a9d08a8b07c7c97ee45c6607f0abd02e5"
        }
    },
    "pre_install": "Remove-Item \"$dir\\`$*\", \"$dir\\uninst*\" -Force -Recurse",
    "installer": {
        "script": [
            "ensure \"$persist_dir\" | Out-Null",
            "$targetPath = \"$env:APPDATA\\io.github.clash-verge-rev.clash-verge-rev\"",
            "$linkType = (Get-Item -Path $targetPath -ErrorAction SilentlyContinue).LinkType",
            "if (Test-Path $targetPath) {",
            "    if ($linkType -eq 'Junction') {",
            "        Remove-Item -Path $targetPath -Force",
            "    } else {",
            "        Get-ChildItem -Path $targetPath -Force | Move-Item -Destination $persist_dir -Force",
            "        Remove-Item -Path $targetPath -Force -Recurse",
            "    }",
            "}",
            "New-Item \"$env:APPDATA\\io.github.clash-verge-rev.clash-verge-rev\" -ItemType Junction -Target \"$persist_dir\" | Out-Null"
        ]
    },
    "pre_uninstall": [
        "if (!(is_admin)) { error \"$app requires admin rights to $cmd\"; break }",
        "Start-Process \"$dir\\resources\\clash-verge-service-uninstall.exe\" -Wait -Verb 'RunAs' -WindowStyle 'Hidden'; Start-Sleep -Seconds 3"
    ],
    "uninstaller": {
        "script": "Remove-Item \"$env:APPDATA\\io.github.clash-verge-rev.clash-verge-rev\" -Recurse -Force -ErrorAction 'SilentlyContinue'"
    },
    "shortcuts": [
        [
            "clash-verge.exe",
            "Clash Verge"
        ]
    ],
    "checkver": "github",
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://github.com/clash-verge-rev/clash-verge-rev/releases/download/v$version/Clash.Verge_$version_x64-setup.exe#/dl.7z"
            },
            "arm64": {
                "url": "https://github.com/clash-verge-rev/clash-verge-rev/releases/download/v$version/Clash.Verge_$version_arm64-setup.exe#/dl.7z"
            }
        }
    }
}
