{
    "version": "12.0.4-20260303",
    "description": "a software reverse engineering (SRE) framework",
    "homepage": "https://ghidra-sre.org",
    "license": "Apache-2.0",
    "notes": "Ghidra requires JDK 21 on the PATH to run.",
    "extract_dir": "ghidra_12.0.4_PUBLIC",
    "suggest": {
        "JDK": "java/temurin21-jdk"
    },
    "architecture": {
        "64bit": {
            "url": "https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_12.0.4_build/ghidra_12.0.4_PUBLIC_20260303.zip",
            "hash": "c3b458661d69e26e203d739c0c82d143cc8a4a29d9e571f099c2cf4bda62a120"
        }
    },
    "post_install": [
        "# Copy default Configurations to persisting dir.",
        "if (Test-Path \"$dir\\Ghidra\\Configurations.original\") {",
        "    Copy-Item \"$dir\\Ghidra\\Configurations.original\\*\" \"$persist_dir\\Ghidra\\Configurations\" -Force -Recurse",
        "    Remove-Item \"$dir\\Ghidra\\Configurations.original\" -Force -Recurse | Out-Null",
        "}"
    ],
    "bin": "ghidraRun.bat",
    "shortcuts": [
        [
            "ghidraRun.bat",
            "ghidra"
        ]
    ],
    "env_set": {
        "GHIDRA_INSTALL_DIR": "$dir"
    },
    "persist": "Ghidra/Configurations",
    "checkver": {
        "github": "https://api.github.com/repos/NationalSecurityAgency/ghidra/releases/latest",
        "jsonpath": "$.assets..browser_download_url",
        "regex": "ghidra_([\\d.]+)_PUBLIC_(?<releasedate>\\d+)\\.zip",
        "replace": "${1}-${2}"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_$matchHead_build/ghidra_$matchHead_PUBLIC_$matchReleasedate.zip"
            }
        },
        "hash": {
            "url": "https://github.com/NationalSecurityAgency/ghidra/releases/tag/Ghidra_$matchHead_build",
            "regex": "<code>$sha256</code>"
        },
        "extract_dir": "ghidra_$matchHead_PUBLIC"
    }
}
