{
    "version": "5.2.1.32035",
    "description": "Directory and file compare functions in one package",
    "homepage": "https://www.scootersoftware.com",
    "license": {
        "identifier": "Shareware",
        "url": "https://www.scootersoftware.com/kb/licensev5"
    },
    "notes": [
        "The manifest already updated to v5, if you want to stay on v4 proceed as follows:",
        "",
        "- Install 'versions/beyondcompare4' instead. (Recommendation)",
        "- Execute 'scoop reset beyondcompare@4.x.y.z; scoop hold beyondcompare', you should have a v4 installation now.",
        "- Check via `scoop info beyondcompare`",
        "",
        "Or maybe you want to upgrade license from v4 to v5: https://www.scootersoftware.com/kb/upgradepolicy"
    ],
    "url": "https://www.scootersoftware.com/files/BCompare-5.2.1.32035.exe",
    "hash": "da9309beafdc8c91f6432e028d8b539a0f881f1401cc9caeb60cc017babd015a",
    "architecture": {
        "64bit": {
            "installer": {
                "args": [
                    "/DIR=\"$dir\"",
                    "/VERYSILENT",
                    "/PORTABLE"
                ]
            }
        },
        "32bit": {
            "installer": {
                "args": [
                    "/32",
                    "/DIR=\"$dir\"",
                    "/VERYSILENT",
                    "/PORTABLE"
                ]
            }
        }
    },
    "bin": [
        "Bcomp.exe",
        "BCompare.exe"
    ],
    "shortcuts": [
        [
            "BCompare.exe",
            "Beyond Compare 5"
        ]
    ],
    "pre_install": [
        "$contents = @{",
        "    # Create a default BCPreferences.xml that will skip update checks.",
        "    'BCPreferences.xml' = '<BCPreferences Version=\"2\" MinVersion=\"2\"><TBcPrefs><CheckForUpdatesDayAmt Value=\"0\"/></TBcPrefs></BCPreferences>'",
        "}",
        "# Hardlinks won't work properly here to persist files, because this app creates a new file instead of writing to the existing one.",
        "# Please keep the file list the same in both pre_install and post_install scripts.",
        "'BC5Key.txt', 'BCColors.xml', 'BCCommands.xml', 'BCFileFormats.xml', 'BCPreferences.xml', 'BCState.xml', 'BCSessions.xml' | ForEach-Object {",
        "    if (Test-Path \"$persist_dir\\$_\") {",
        "        Copy-Item \"$persist_dir\\$_\" \"$dir\\$_\" -Force",
        "    } else {",
        "        Set-Content -Path \"$dir\\$_\" -Value $contents[$_]",
        "    }",
        "}"
    ],
    "persist": [
        "Helpers",
        "Packers"
    ],
    "pre_uninstall": [
        "# Hardlinks won't work properly here to persist files, because this app creates a new file instead of writing to the existing one.",
        "# Please keep the file list the same in both pre_install and post_install scripts.",
        "'BC5Key.txt', 'BCColors.xml', 'BCCommands.xml', 'BCFileFormats.xml', 'BCPreferences.xml', 'BCState.xml', 'BCSessions.xml' | ForEach-Object {",
        "    if (Test-Path \"$dir\\$_\") {",
        "        Copy-Item \"$dir\\$_\" \"$persist_dir\\$_\" -Force",
        "    }",
        "}"
    ],
    "checkver": {
        "url": "https://www.scootersoftware.com/download",
        "regex": "BCompare-([\\d.]+)\\.exe"
    },
    "autoupdate": {
        "url": "https://www.scootersoftware.com/files/BCompare-$version.exe"
    }
}
