From 87c56f01d61c4f0c51c039437920b5c98c5d04fd Mon Sep 17 00:00:00 2001 From: KeybadeBlox Date: Sun, 14 Dec 2025 23:55:08 -0500 Subject: [PATCH] Update delink.sh for Windows If you've cloned this repository on Windows, you have either a POSIX environment or Git Bash and can run this script. It just needs to call the right headless Ghidra script depending on the OS (which it now tries to do). --- delink.sh | 8 +++++++- readme.md | 5 ++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/delink.sh b/delink.sh index 562de22..b992494 100755 --- a/delink.sh +++ b/delink.sh @@ -50,7 +50,13 @@ delink() { # $3: Ghidra project name # $4: Whitespace-separated address ranges to include in object # $5: Output path (inside /target) - "$1/support/analyzeHeadless" "$2" "$3"\ + # Call the right script depending on whether we're on Windows + # (this seems like the most reliable method I can find for POSIX sh) + if [ -n "$WINDIR" ]; then suffix=.bat + else suffix= + fi + + "$1/support/analyzeHeadless$suffix" "$2" "$3"\ -process default.xbe\ -noanalysis\ -postScript DelinkProgram.java\ diff --git a/readme.md b/readme.md index 7fcee00..9b596ba 100644 --- a/readme.md +++ b/readme.md @@ -6,9 +6,8 @@ the JSRF decompilation effort. The addresses given in each section are runtime memory addresses (as one would see in e.g. Ghidra). -`delink.sh` and `delink.ps1` are scripts for Unix-like and Windows systems -respectively to produced delinked object files in `target/` from a Ghidra -project. +`delink.sh` is a script that produces delinked object files in `target/` from a +Ghidra project. The `src/` directory contains decompiled code and data. Each symbol is annotated with its corresponding memory address in the original binary, and