From 93f3b942bb6076139cddc162c6ec4ece66bc3992 Mon Sep 17 00:00:00 2001 From: Nader Shalabi Date: Sun, 16 Jan 2022 00:39:04 +0400 Subject: [PATCH] Update ModuleManifestFile.java The value associated with "EXCLUDE FROM GHIDRA JAR" module configuration has no effect when building the JAR file, for example, "EXCLUDE FROM GHIDRA JAR: false" will have no effect and the module will still be excluded since the current code checks only if the line starts with "EXCLUDE FROM GHIDRA JAR" but does not examine the assigned value. I updated the code to enable the effect of the true/false values. --- .../main/java/utility/module/ModuleManifestFile.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Ghidra/Framework/Utility/src/main/java/utility/module/ModuleManifestFile.java b/Ghidra/Framework/Utility/src/main/java/utility/module/ModuleManifestFile.java index 6050b52c77..b9a945ffb7 100644 --- a/Ghidra/Framework/Utility/src/main/java/utility/module/ModuleManifestFile.java +++ b/Ghidra/Framework/Utility/src/main/java/utility/module/ModuleManifestFile.java @@ -95,7 +95,16 @@ public class ModuleManifestFile { // ignore for now } else if (trimmedLine.startsWith(EXCLUDE_FROM_GHIDRA_JAR)) { - excludeFromGhidraJar = true; + String[] tokens = trimmedLine.split(":"); + + if (tokens.length == 2) { + if (tokens[1].toLowerCase().trim().compareTo("false") == 0) + excludeFromGhidraJar = false; + else + excludeFromGhidraJar = true; + } + else + excludeFromGhidraJar = true; // Default to not be included in build } else if (trimmedLine.startsWith(MODULE_FILE_LICENSE)) { processModuleFileLicense(trimmedLine);