{
    "version": "2.10.36",
    "description": "GNU Image Manipulation Program",
    "homepage": "https://www.gimp.org",
    "license": "GPL-3.0-only",
    "url": "https://download.gimp.org/mirror/pub/gimp/v2.10/windows/gimp-2.10.36-setup.exe",
    "hash": "947efa2397f7a17b8e4f4c9689e4ab67f00ca220ac1aa0ae0c1e179ccfc4fc10",
    "innosetup": true,
    "installer": {
        "script": [
            "Push-Location \"$dir\"",
            "Get-ChildItem -Filter '*.debug' -Recurse | Remove-Item -Recurse",
            "if ($architecture -eq '64bit') {",
            "   Rename-Item 'lib\\gimp\\2.0\\plug-ins\\twain\\twain,2.exe' 'twain.exe'",
            "   Remove-Item 'lib\\gimp\\2.0\\plug-ins\\twain\\twain,1.exe'",
            "   Get-ChildItem -Filter '*,1*' -Recurse | Rename-Item -NewName { $_.name -Replace ',\\d','' }",
            "   Get-ChildItem -Filter '*,*' -Recurse | Remove-Item",
            "} else {",
            "   Rename-Item 'lib\\gimp\\2.0\\plug-ins\\twain\\twain,1.exe' 'twain.exe'",
            "   Remove-Item 'lib\\gimp\\2.0\\plug-ins\\twain\\twain,2.exe'",
            "   Get-ChildItem -Filter '*,1*' -Recurse | Remove-Item",
            "   Get-ChildItem -Filter '*,*' -Recurse | Rename-Item -NewName { $_.name -Replace ',\\d','' }",
            "}",
            "$pyenv = Get-Content 'lib\\gimp\\2.0\\environ\\pygimp.env' -Raw",
            "$pyenv + '__COMPAT_LAYER=HIGHDPIAWARE' | Set-Content 'lib\\gimp\\2.0\\environ\\pygimp.env'",
            "$pyint = Get-Content 'lib\\gimp\\2.0\\interpreters\\pygimp.interp' -Raw",
            "$pyint = $pyint -Replace '(python|python2)=(.*)', \"`$1=$dir\\bin\\pythonw.exe\"",
            "$pyint = $pyint -Replace 'py::python2', 'py::python'",
            "$pyint | Set-Content 'lib\\gimp\\2.0\\interpreters\\pygimp.interp'",
            "Pop-Location",
            "Copy-Item \"$bucketsdir\\extras\\scripts\\gimp\\default.env\" \"$dir\\lib\\gimp\\2.0\\environ\\\" | Out-Null"
        ]
    },
    "bin": [
        "bin\\gimp-console-2.10.exe",
        [
            "bin\\gimp-console-2.10.exe",
            "gimp-console"
        ],
        [
            "bin\\gimp-console-2.10.exe",
            "gimp"
        ],
        "bin\\gimptool-2.0.exe",
        [
            "bin\\gimptool-2.0.exe",
            "gimptool"
        ]
    ],
    "shortcuts": [
        [
            "bin\\gimp-2.10.exe",
            "GIMP"
        ]
    ],
    "checkver": {
        "url": "https://www.gimp.org/downloads/",
        "regex": "gimp-(?<version>[\\d.]+)-setup(?<build>-\\d)?\\.exe",
        "replace": "${version}${build}"
    },
    "autoupdate": {
        "url": "https://download.gimp.org/mirror/pub/gimp/v$majorVersion.$minorVersion/windows/gimp-$matchHead-setup$matchTail.exe",
        "hash": {
            "url": "$baseurl/SHA256SUMS"
        }
    }
}
