{
    "version": "3.4.2",
    "description": "Cross-platform advanced subtitle editor",
    "homepage": "https://www.aegisub.org/",
    "license": {
        "identifier": "BSD-3-Clause,MIT,BSDL,MPL-1.1",
        "url": "https://github.com/TypesettingTools/Aegisub/blob/master/LICENCE"
    },
    "suggest": {
        "vcredist": "extras/vcredist2022"
    },
    "architecture": {
        "64bit": {
            "url": "https://github.com/TypesettingTools/Aegisub/releases/download/v3.4.2/Aegisub-3.4.2-portable.zip",
            "hash": "2839195774b8de051071c40e0461b628a286089147ce3e025b539b0695beebed"
        }
    },
    "extract_dir": "aegisub-portable",
    "pre_install": [
        "# 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"
        ]
    ],
    "persist": [
        "autoback",
        "autosave",
        "catalog",
        "config"
    ],
    "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",
        "    }",
        "}"
    ],
    "checkver": {
        "github": "https://github.com/TypesettingTools/Aegisub"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://github.com/TypesettingTools/Aegisub/releases/download/v$version/Aegisub-$version-portable.zip"
            }
        }
    }
}
