Crusader_Decomp/tools/pyghidra_crusader/README.md
MaddoScientisto ad6ebd0b86 Add PyGhidra Crusader Toolkit and patch scripts
- Introduced README.md for the PyGhidra Crusader Toolkit, detailing setup and usage instructions.
- Added bootstrap_env.ps1 script to create and refresh the Python virtual environment with necessary packages.
- Implemented _tmp_patch_hidden_cheat_menu.py and _tmp_patch_hidden_cheat_menu_deferred.py scripts for patching specific memory addresses in Ghidra.
2026-03-25 08:15:21 +01:00

1.4 KiB

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.