Building ret-sync for Ghidra 11.2.1
With the below changes, it builds fine:
diff --git a/ext_ghidra/src/main/help/help/shared/Frontpage.css b/ext_ghidra/src/main/help/help/shared/DefaultStyle.css
similarity index 100%
rename from ext_ghidra/src/main/help/help/shared/Frontpage.css
rename to ext_ghidra/src/main/help/help/shared/DefaultStyle.css
diff --git a/ext_ghidra/src/main/help/help/topics/retsync/help.html b/ext_ghidra/src/main/help/help/topics/retsync/help.html
index 8f858d2..1f9d6a1 100644
--- a/ext_ghidra/src/main/help/help/topics/retsync/help.html
+++ b/ext_ghidra/src/main/help/help/topics/retsync/help.html
@@ -10,7 +10,7 @@
<META name="ProgId" content="FrontPage.Editor.Document">
<TITLE>Skeleton Help File for a Module</TITLE>
- <LINK rel="stylesheet" type="text/css" href="../../shared/Frontpage.css">
+ <LINK rel="stylesheet" type="text/css" href="help/shared/DefaultStyle.css">
</HEAD>
<BODY>
diff --git a/ext_ghidra/src/main/java/retsync/LocalColorizerService.java b/ext_ghidra/src/main/java/retsync/LocalColorizerService.java
index 4b1454e..6e6f655 100644
--- a/ext_ghidra/src/main/java/retsync/LocalColorizerService.java
+++ b/ext_ghidra/src/main/java/retsync/LocalColorizerService.java
@@ -299,7 +299,7 @@ public class LocalColorizerService {
addPrimaryHighlight(token, defaultHighlightColor);
if (token instanceof ClangSyntaxToken) {
addPrimaryHighlightToTokensForParenthesis((ClangSyntaxToken) token, defaultParenColor);
- addBraceHighlight((ClangSyntaxToken) token, defaultParenColor);
+ addPrimaryHighlightToTokensForBrace((ClangSyntaxToken) token, defaultParenColor);
}
}
}
References: https://github.com/bootleg/ret-sync/issues/108 https://github.com/NationalSecurityAgency/ghidra/commit/9f8b03a90f344ef10cdbd5c9a0036b2fb88fdce2#diff-107b88c3af214ad82d528f05627965317343fb37220194e15cf89d780e192433R122
I can confirm it build correctly
I can confirm it builds and ret-sync works (Ghidra 11.3).
Except I also need to do the following to have the extension available in the CodeBrowser on top of the following: https://github.com/bootleg/ret-sync?tab=readme-ov-file#install-the-ghidra-extension
In CodeBrowser, go to File > Configure then click on Configure in Ghidra Core section. Then search for "RetSyncPlugin" in the Filter field and tick the box associated with it once found. Then it should just work, without having to restart Ghidra or the CodeBrowser.
For anyone trying to compile it in remnux (and possibly any ubuntu-derived). You do need the patch (if you're using Ghidra 11.2), but the gradle available in the repos is way too old. Download the latest version and compile it with that instead.
> Task :compileJava
C:\Users\danie\Documents\gradle\ret-sync-master\ext_ghidra\src\main\java\retsync\LocalColorizerService.java:302: error: cannot find symbol
addBraceHighlight((ClangSyntaxToken) token, defaultParenColor);
^
symbol: method addBraceHighlight(ClangSyntaxToken,Color)
location: class LocalColorizerService.FullLineLocationClangHighlightController
Note: C:\Users\danie\Documents\gradle\ret-sync-master\ext_ghidra\src\main\java\retsync\RetSyncPlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
> Task :compileJava FAILED
[Incubating] Problems report is available at: file:///C:/Users/danie/Documents/gradle/ret-sync-master/ext_ghidra/build/reports/problems/problems-report.html
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler output below.
C:\Users\danie\Documents\gradle\ret-sync-master\ext_ghidra\src\main\java\retsync\LocalColorizerService.java:302: error: cannot find symbol
addBraceHighlight((ClangSyntaxToken) token, defaultParenColor);
^
symbol: method addBraceHighlight(ClangSyntaxToken,Color)
location: class LocalColorizerService.FullLineLocationClangHighlightController
Note: C:\Users\danie\Documents\gradle\ret-sync-master\ext_ghidra\src\main\java\retsync\RetSyncPlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
gradle 8.12.1 also tried with 8.13. exact same issue.
Pr when?
I can confirm this change works in Ghidra 11.3.1 with gradle 8.10.2
fixed in 70be8e3f2e6ec723a5eed3d3da013081fd4ac740. Thanks all.