Merge branch 'GP-0_ryanmkurtz_PR-6249_ByThePowerOfScience_single-jar-src'

This commit is contained in:
Ryan Kurtz 2024-04-29 14:01:42 -04:00
commit 586fc9efcd

View file

@ -327,7 +327,7 @@ public class GhidraJarBuilder implements GhidraLaunchable {
Collections.sort(moduleList);
for (ApplicationModule module : moduleList) {
File srcDir = new File(module.getModuleDir(), "src");
File srcDir = new File(module.getModuleDir(), "lib");
File srcZipFileForModule = new File(srcDir, module.getName() + "-src.zip");
if (srcZipFileForModule.exists()) {
writeModuleSrcZipToOverallSrcZip(zip, srcZipFileForModule);
@ -337,12 +337,17 @@ public class GhidraJarBuilder implements GhidraLaunchable {
wroteToZip |= writeZipRecursively(zip, srcDir.getAbsolutePath(), srcDir);
}
}
if (wroteToZip) {
if (!wroteToZip) {
System.out
.println("Can't create source zip! Has source been downloaded and installed?");
// zip.close reports error if nothing has been written to it
}
try {
// zip.close may report error if nothing has been written to it
zip.close();
}
catch (IOException e) {
e.printStackTrace();
}
}
private void writeModuleSrcZipToOverallSrcZip(Zip zip, File srcZipFileForModule)