{
    "version": "0.11.2",
    "description": "A friendly cross-platform Installer for Ubuntu Touch.",
    "homepage": "https://ubuntu-touch.io//ubuntu-touch.io",
    "license": "GPL-3.0-only",
    "suggest": {
        "adb": "adb"
    },
    "architecture": {
        "64bit": {
            "url": "https://github.com/ubports/ubports-installer/releases/download/0.11.2/ubports-installer_0.11.2_win_x64.exe#/dl.7z",
            "hash": "e8cb3b8835a88cad08eebb3bd567f97d16cbefc4bf1ac5cfb2123905cea4b225"
        }
    },
    "pre_install": [
        "Expand-7zipArchive \"$dir\\`$PLUGINSDIR\\app-64.7z\" \"$dir\"",
        "Remove-Item \"$dir\\`$*\" -Recurse",
        "if (!(Test-Path \"$persist_dir\\APPDATA\")) {",
        "    Write-Host 'Moving settings from APPDATA to Scoop directory' -ForegroundColor Yellow",
        "    'ubports', 'ubports-installer' | ForEach-Object {",
        "        New-Item \"$dir\\APPDATA\\$_\" -ItemType Directory | Out-Null",
        "        if(Test-Path \"$env:APPDATA\\$_\") {Move-Item \"$env:APPDATA\\$_\" \"$dir\\APPDATA\" | Out-Null}",
        "        New-Item \"$env:APPDATA\\$_\" -ItemType Junction -Target \"$dir\\APPDATA\\$_\" | Out-Null",
        "    }",
        "}"
    ],
    "shortcuts": [
        [
            "ubports-installer.exe",
            "UBports Installer"
        ]
    ],
    "persist": "APPDATA",
    "checkver": {
        "github": "https://api.github.com/repos/ubports/ubports-installer/releases",
        "jsonpath": "$..browser_download_url",
        "regex": "/download/(?<tag>[\\w.-]+)/ubports-installer_([\\w.-]+)_win_x64\\.exe"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://github.com/ubports/ubports-installer/releases/download/$matchTag/ubports-installer_$version_win_x64.exe#/dl.7z",
                "hash": {
                    "url": "$url.sha256"
                }
            }
        }
    }
}
