{
    "version": "8.9.4",
    "description": "A free source code editor and Notepad replacement that supports several languages.",
    "homepage": "https://notepad-plus-plus.org",
    "license": "GPL-3.0-or-later",
    "notes": "Add Notepad++ as a context menu option by running: reg import \"$dir\\install-context.reg\"",
    "architecture": {
        "64bit": {
            "url": "https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.9.4/npp.8.9.4.portable.x64.zip",
            "hash": "1b336227c9384b42d1f287fa53965166cd1abaf7ccb82dd178ee5e9b3138b505"
        },
        "32bit": {
            "url": "https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.9.4/npp.8.9.4.portable.zip",
            "hash": "820272b38b52f89c9de55d5029a578bc7b178a7b06d36341bcf04404dbaf0bbb"
        },
        "arm64": {
            "url": "https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.9.4/npp.8.9.4.portable.arm64.zip",
            "hash": "7923af8ffdc5a7645e4f45e526917ff63d41b0881c8d4e646cae75a135b24925"
        }
    },
    "pre_install": [
        "'session.xml', 'userDefineLang.xml', 'nativeLang.xml' | ForEach-Object {",
        "    if (!(Test-Path \"$persist_dir\\$_\")) { New-Item \"$dir\\$_\" -ItemType File | Out-Null }",
        "}",
        "if (!(Test-Path \"$persist_dir\\stylers.xml\")) { Copy-Item \"$dir\\stylers.model.xml\" \"$dir\\stylers.xml\" }"
    ],
    "post_install": [
        "'install-context', 'uninstall-context' | ForEach-Object {",
        "    if (Test-Path \"$bucketsdir\\extras\\scripts\\notepadplusplus\\$_.reg\") {",
        "        $nppPath = \"$dir\\notepad++.exe\".Replace('\\', '\\\\')",
        "        $content = (Get-Content \"$bucketsdir\\extras\\scripts\\notepadplusplus\\$_.reg\").Replace('$npp', $nppPath)",
        "        if ($global) { $content = $content.Replace('HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE') }",
        "        Set-Content \"$dir\\$_.reg\" $content -Encoding Ascii -Force",
        "    }",
        "}",
        "# Update shipped plugins",
        "if (Test-Path \"$dir\\plugins.original\") {",
        "    Copy-Item -Recurse \"$dir\\plugins.original\\*\" \"$dir\\plugins\\\" -Force",
        "}"
    ],
    "uninstaller": {
        "script": [
            "if ($cmd -eq 'uninstall') {",
            "    reg import \"$dir\\uninstall-context.reg\"",
            "}"
        ]
    },
    "bin": "notepad++.exe",
    "shortcuts": [
        [
            "notepad++.exe",
            "Notepad++"
        ]
    ],
    "persist": [
        "backup",
        "cloud",
        "plugins",
        "themes",
        "userDefineLangs",
        "config.xml",
        "nativeLang.xml",
        "session.xml",
        "shortcuts.xml",
        "stylers.xml",
        "userDefineLang.xml"
    ],
    "checkver": {
        "github": "https://github.com/notepad-plus-plus/notepad-plus-plus"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v$version/npp.$version.portable.x64.zip"
            },
            "32bit": {
                "url": "https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v$version/npp.$version.portable.zip"
            },
            "arm64": {
                "url": "https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v$version/npp.$version.portable.arm64.zip"
            }
        },
        "hash": {
            "url": "$baseurl/npp.$version.checksums.sha256"
        }
    }
}
