{
    "version": "1.11.2",
    "description": "Photo viewer, image resizer & batch converter",
    "homepage": "https://www.xnview.com/en/xnview-mp/",
    "license": "Freeware|Proprietary",
    "architecture": {
        "64bit": {
            "url": "https://download.xnview.com/XnViewMP-win-x64.zip",
            "hash": "312d0cd24ac9130b929d71222d884c9ece33ae2e71a4fe2cdcdb923b0a85beae"
        },
        "32bit": {
            "url": "https://download.xnview.com/XnViewMP-win.zip",
            "hash": "1fe75ba26f0b482f505387b42dbc65800dc96605171cbe77ddbe34e5cda83ee6"
        }
    },
    "extract_dir": "XnViewMP",
    "pre_install": [
        "# --- If xnview.ini exists as a folder, then remove it ---",
        "if (Test-Path \"$persist_dir\\xnview.ini\" -PathType Container) {",
        "    Remove-Item \"$persist_dir\\xnview.ini\" -Force -Recurse",
        "}",
        "if (!(Test-Path \"$persist_dir\\xnview.ini\")) {",
        "   New-Item \"$dir\\xnview.ini\" -ItemType File | Out-Null",
        "}"
    ],
    "uninstaller": {
        "script": [
            "# Manually copy because Xnview overwrites hardlink with a regular file, which breaks persist",
            "if ((Test-Path \"$dir\\xnview.ini\") -and !(Get-Item \"$dir\\xnview.ini\").LinkType -and (Test-Path $persist_dir)) { Copy-Item \"$dir\\xnview.ini\" $persist_dir -Force }"
        ]
    },
    "bin": "xnviewmp.exe",
    "shortcuts": [
        [
            "xnviewmp.exe",
            "XnViewMP"
        ]
    ],
    "persist": "xnview.ini",
    "checkver": "Download <strong>XnView MP ([\\d.]+)",
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://download.xnview.com/XnViewMP-win-x64.zip"
            },
            "32bit": {
                "url": "https://download.xnview.com/XnViewMP-win.zip"
            }
        }
    }
}
