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()); addExternalJarPaths(classpathList, layout.getApplicationRootDirs());
} }
else { else {
addPatchPaths(classpathList, layout.getApplicationRootDirs()); addPatchPaths(classpathList, layout.getApplicationInstallationDir());
addModuleJarPaths(classpathList, layout.getModules()); addModuleJarPaths(classpathList, layout.getModules());
} }
classpathList = orderClasspath(classpathList); 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. * first so they take precedence in the classpath.
* *
* @param pathList The list of paths to add to. * @param pathList The list of paths to add to.
* @param appRootDirs The application root directories to search. * @param appRootDirs The application root directories to search.
*/ */
private static void addPatchPaths(List<String> pathList, Collection<ResourceFile> appRootDirs) { private static void addPatchPaths(List<String> pathList, ResourceFile installDir) {
ResourceFile patchDir = new ResourceFile(installDir, "Ghidra/patch");
for (ResourceFile rootDir : appRootDirs) { if (patchDir.exists()) {
ResourceFile debugLibDir = new ResourceFile(rootDir, "patch"); pathList.addAll(findJarsInDir(patchDir));
if (debugLibDir.exists()) {
pathList.addAll(findJarsInDir(debugLibDir));
}
} }
} }

View File

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