{
    "version": "03-02",
    "description": "Cross-platform advanced subtitle editor, with new feature branches. Read the README on the feature branch.",
    "homepage": "https://github.com/arch1t3cht/Aegisub",
    "license": {
        "identifier": "BSD-3-Clause,MIT,BSDL,MPL-1.1",
        "url": "https://github.com/arch1t3cht/Aegisub/blob/feature/LICENCE"
    },
    "suggest": {
        "vcredist": "extras/vcredist2022"
    },
    "architecture": {
        "64bit": {
            "url": "https://github.com/arch1t3cht/Aegisub/releases/download/migration03-02/Windows.MSVC.Release.-.portable.zip",
            "hash": "214d53159f3ada038a87a63bba27f62b1fe12a85734036764755fc2513444a63"
        }
    },
    "pre_install": [
        "Expand-ZipArchive -Path \"$dir\\aegisub-portable-64.zip\" -DestinationPath \"$dir\"-ExtractDir \"aegisub-portable\" -Removal",
        "",
        "# Hardlinks won't work properly here to persist files, because this app creates a new file instead of writing to the existing one.",
        "'config.json' | ForEach-Object {",
        "    if (Test-Path -LiteralPath \"$persist_dir\\$_\" -PathType Leaf) {",
        "        Copy-Item -Path \"$persist_dir\\$_\" -Destination \"$dir\\$_\" -Force",
        "    }",
        "}"
    ],
    "shortcuts": [
        [
            "aegisub.exe",
            "Aegisub"
        ]
    ],
    "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.",
        "'config.json' | ForEach-Object {",
        "    if (Test-Path -LiteralPath \"$dir\\$_\" -PathType Leaf) {",
        "        ensure $persist_dir | Out-Null",
        "        Copy-Item -Path \"$dir\\$_\" -Destination \"$persist_dir\\$_\" -Force",
        "    }",
        "}"
    ],
    "persist": [
        "autoback",
        "autosave",
        "catalog",
        "config"
    ],
    "checkver": {
        "github": "https://api.github.com/repos/arch1t3cht/Aegisub/releases/latest",
        "jsonpath": "$.tag_name",
        "regex": "^migration([0-9]+-[0-9]+)$"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://github.com/arch1t3cht/Aegisub/releases/download/migration$version/Windows.MSVC.Release.-.portable.zip"
            }
        }
    }
}
