{
    "version": "2.9.0",
    "description": "Graphical Scrcpy to display and control Android devices, powered by Electron",
    "homepage": "https://github.com/viarotel-org/escrcpy",
    "license": "Apache-2.0",
    "architecture": {
        "64bit": {
            "url": "https://github.com/viarotel-org/escrcpy/releases/download/v2.9.0/Escrcpy-2.9.0-win-setup-x64.exe#/dl.7z",
            "hash": "sha512:f06fc24979c240befa18f43dca0b9675e85c9cdb51578506e412bd31e2c44a21a7a5efbb5b23d68f2c4bd92dcc3848d62ebeab5c9e8d130b7cc8ac425b376260"
        },
        "arm64": {
            "url": "https://github.com/viarotel-org/escrcpy/releases/download/v2.9.0/Escrcpy-2.9.0-win-setup-arm64.exe#/dl.7z",
            "hash": "sha512:c7a004fbdb56acc553611ff96189f0b1e9a1c534043a7e3ed4b46c87576cac675dfbe23aad8a6aaefc7526f445606712a22199db5865cd41c797fb2c2e1b34b1"
        }
    },
    "pre_install": [
        "Get-ChildItem \"$dir\\`$PLUGINSDIR\\app*.7z\" | Rename-Item -NewName 'app.7z'",
        "Expand-7zipArchive -Path \"$dir\\`$PLUGINSDIR\\app.7z\" \"$dir\"",
        "Remove-Item \"$dir\\`$*\", \"$dir\\Uninst*\" -Recurse"
    ],
    "installer": {
        "script": [
            "if (Test-Path \"$env:AppData\\escrcpy\") {",
            "    info '[Persistent AppData]: Moving user data...'",
            "    ensure \"$persist_dir\\UserData\" | Out-Null",
            "    Copy-Item \"$env:AppData\\escrcpy\\*\" \"$persist_dir\\UserData\\\" -Recurse -Force -ErrorAction 'SilentlyContinue'",
            "    Remove-Item \"$env:AppData\\escrcpy\" -Recurse -Force -ErrorAction 'SilentlyContinue'",
            "}"
        ]
    },
    "shortcuts": [
        [
            "Escrcpy.exe",
            "Escrcpy",
            "--user-data-dir=\"$persist_dir\\UserData\""
        ]
    ],
    "persist": "UserData",
    "checkver": "github",
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://github.com/viarotel-org/escrcpy/releases/download/v$version/Escrcpy-$version-win-setup-x64.exe#/dl.7z"
            },
            "arm64": {
                "url": "https://github.com/viarotel-org/escrcpy/releases/download/v$version/Escrcpy-$version-win-setup-arm64.exe#/dl.7z"
            }
        },
        "hash": {
            "url": "$baseurl/latest.yml",
            "regex": "(?sm)$basename.*?sha512:\\s+$base64"
        }
    }
}
