mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-21 14:06:05 +08:00
Merge remote-tracking branch 'origin/GP-0_ryanmkurtz_native-check--SQUASHED' into Ghidra_12.1
This commit is contained in:
@@ -27,8 +27,7 @@ import org.apache.logging.log4j.Logger;
|
||||
import docking.framework.SplashScreen;
|
||||
import generic.jar.ResourceFile;
|
||||
import ghidra.base.help.GhidraHelpService;
|
||||
import ghidra.framework.Application;
|
||||
import ghidra.framework.GhidraApplicationConfiguration;
|
||||
import ghidra.framework.*;
|
||||
import ghidra.framework.client.RepositoryAdapter;
|
||||
import ghidra.framework.main.FrontEndTool;
|
||||
import ghidra.framework.model.*;
|
||||
@@ -96,6 +95,8 @@ public class GhidraRun implements GhidraLaunchable {
|
||||
|
||||
log.info("Ghidra startup complete (" + GhidraLauncher.getMillisecondsFromLaunch() +
|
||||
" ms)");
|
||||
|
||||
checkForMissingNativeComponents();
|
||||
});
|
||||
};
|
||||
|
||||
@@ -249,6 +250,22 @@ public class GhidraRun implements GhidraLaunchable {
|
||||
}
|
||||
}
|
||||
|
||||
private void checkForMissingNativeComponents() {
|
||||
boolean isWin = Platform.CURRENT_PLATFORM.getOperatingSystem() == OperatingSystem.WINDOWS;
|
||||
|
||||
try {
|
||||
Application.getOSFile("Decompiler", isWin ? "decompile.exe" : "decompile");
|
||||
}
|
||||
catch (OSFileNotFoundException e) {
|
||||
//@formatter:off
|
||||
String msg =
|
||||
"It appears that native components have not been built for this Ghidra installation.\n" +
|
||||
"See the \"Building Native Components\" section of the Getting Started guide for build instructions.";
|
||||
//@formatter:on
|
||||
Msg.showWarn(GhidraRun.class, null, "Missing Native Components", msg);
|
||||
}
|
||||
}
|
||||
|
||||
private class GhidraProjectManager extends DefaultProjectManager {
|
||||
// this exists just to allow access to the constructor
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user