changes for patch directory

This commit is contained in:
ghidravore 2019-04-04 14:27:22 -04:00
parent 9857ade2fe
commit 7fa646aac1
2 changed files with 7 additions and 10 deletions

View File

@ -56,7 +56,7 @@ public class GhidraLauncher {
addExternalJarPaths(classpathList, layout.getApplicationRootDirs());
}
else {
addPatchPaths(classpathList, layout.getApplicationRootDirs());
addPatchPaths(classpathList, layout.getApplicationInstallationDir());
addModuleJarPaths(classpathList, layout.getModules());
}
classpathList = orderClasspath(classpathList);
@ -79,19 +79,16 @@ public class GhidraLauncher {
}
/**
* Add bin patch directories and lib patch jars to the given path list. This should be done
* Add patch jars to the given path list. This should be done
* first so they take precedence in the classpath.
*
* @param pathList The list of paths to add to.
* @param appRootDirs The application root directories to search.
*/
private static void addPatchPaths(List<String> pathList, Collection<ResourceFile> appRootDirs) {
for (ResourceFile rootDir : appRootDirs) {
ResourceFile debugLibDir = new ResourceFile(rootDir, "patch");
if (debugLibDir.exists()) {
pathList.addAll(findJarsInDir(debugLibDir));
}
private static void addPatchPaths(List<String> pathList, ResourceFile installDir) {
ResourceFile patchDir = new ResourceFile(installDir, "Ghidra/patch");
if (patchDir.exists()) {
pathList.addAll(findJarsInDir(patchDir));
}
}

View File

@ -398,7 +398,7 @@ task assembleCommon (type: Copy) {
////////////////
// Patch Readme
////////////////
from (ROOT_PROJECT_DIR + "/Ghidra/patch") {
from (ROOT_PROJECT_DIR + "/GhidraBuild/patch") {
into "Ghidra/patch"
}