mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
GT-3120: Allow default bin/main class location to be overridden.
This commit is contained in:
parent
ef50280d10
commit
ab5e715607
1 changed files with 7 additions and 4 deletions
|
@ -32,6 +32,7 @@ import utilities.util.FileUtilities;
|
|||
*/
|
||||
public class ModuleUtilities {
|
||||
|
||||
private static final String BINARY_PATH = System.getProperty("binaryPath", "bin/main");
|
||||
public static final String MANIFEST_FILE_NAME = "Module.manifest";
|
||||
public static final String MANIFEST_FILE_NAME_UNINSTALLED = "Module.manifest.uninstalled";
|
||||
public static final String MODULE_LIST = "MODULE_LIST";
|
||||
|
@ -186,15 +187,17 @@ public class ModuleUtilities {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets the "bin" directories from the given modules.
|
||||
* Gets the directory locations of the .class files and resources from the given modules.
|
||||
*
|
||||
* @param modules The modules to get the bin directories of.
|
||||
* @return A collection of bin directories from the given modules.
|
||||
* @param modules The modules to get the compiled .class and resources directories of.
|
||||
* @return A collection of directories containing classes and resources from the given modules.
|
||||
*/
|
||||
public static Collection<ResourceFile> getModuleBinDirectories(Map<String, GModule> modules) {
|
||||
String[] binaryPathTokens = BINARY_PATH.split(":");
|
||||
List<ResourceFile> binDirectories = new ArrayList<>();
|
||||
for (GModule module : modules.values()) {
|
||||
module.collectExistingModuleDirs(binDirectories, "bin/main");
|
||||
Arrays.stream(binaryPathTokens).forEach(
|
||||
token -> module.collectExistingModuleDirs(binDirectories, token));
|
||||
}
|
||||
return binDirectories;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue