Crusader_Decomp/tools/pyghidra_crusader
2026-03-25 23:32:13 +01:00
..
__pycache__ Pseudocode and stuff 2026-03-25 23:32:13 +01:00
__init__.py Add various scripts and JSON plans for Ghidra project 2026-03-20 23:50:39 +01:00
__main__.py Add various scripts and JSON plans for Ghidra project 2026-03-20 23:50:39 +01:00
_tmp_patch_hidden_cheat_menu.py Pseudocode and stuff 2026-03-25 23:32:13 +01:00
_tmp_patch_hidden_cheat_menu_deferred.py Pseudocode and stuff 2026-03-25 23:32:13 +01:00
bootstrap_env.ps1 Add PyGhidra Crusader Toolkit and patch scripts 2026-03-25 08:15:21 +01:00
cli.py Add 'annotate-usecode' command to import USECODE IR JSON annotations 2026-03-24 18:14:20 +01:00
common.py Add PyGhidra Crusader Toolkit and patch scripts 2026-03-25 08:15:21 +01:00
README.md Add PyGhidra Crusader Toolkit and patch scripts 2026-03-25 08:15:21 +01:00

PyGhidra Crusader Toolkit

This toolkit drives the local PyGhidra fallback workflow for the Crusader Ghidra project.

Defaults

  • Ghidra install dir: I:\Apps\ghidra_12.0.4_PUBLIC
  • Python env: .venv-pyghidra311
  • Python base interpreter: C:\Users\Maddo\.pyenv\pyenv-win\versions\3.11.6\python.exe
  • CLI entrypoint: .\.venv-pyghidra311\Scripts\python.exe -m tools.pyghidra_crusader

Bootstrap Or Refresh

Run this from the repo root to create or refresh the local environment against the bundled Ghidra 12.0.4 offline packages:

powershell -ExecutionPolicy Bypass -File .\tools\pyghidra_crusader\bootstrap_env.ps1

The script recreates or refreshes .venv-pyghidra311, then installs these pinned packages from the local Ghidra tree:

  • pyghidra==3.0.2 from Ghidra\Features\PyGhidra\pypkg\dist
  • ghidra-stubs==12.0.4 from docs\ghidra_stubs

Override the defaults when needed:

powershell -ExecutionPolicy Bypass -File .\tools\pyghidra_crusader\bootstrap_env.ps1 `
  -PythonExe C:\Path\To\python.exe `
  -GhidraInstallDir I:\Apps\ghidra_12.0.4_PUBLIC `
  -VenvPath .\.venv-pyghidra311

Validation

After bootstrap, validate package versions and the project-open path:

.\.venv-pyghidra311\Scripts\python.exe -m tools.pyghidra_crusader project-files

If you need to target a different installed Ghidra tree temporarily, set GHIDRA_INSTALL_DIR or pass --install-dir to the CLI.