From dc40114ee57e558f7f4cb664a9edda0109cdf514 Mon Sep 17 00:00:00 2001 From: Ryan Kurtz Date: Tue, 30 Mar 2021 14:28:23 -0400 Subject: [PATCH] GP-815: New error message in launch.bat and launch.sh to make it more clear what the problem is when launching in dev mode when nothing has been compiled yet. --- Ghidra/RuntimeScripts/Linux/support/launch.sh | 4 ++++ Ghidra/RuntimeScripts/Windows/support/launch.bat | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/Ghidra/RuntimeScripts/Linux/support/launch.sh b/Ghidra/RuntimeScripts/Linux/support/launch.sh index 8fb54aa451..1a8109d705 100755 --- a/Ghidra/RuntimeScripts/Linux/support/launch.sh +++ b/Ghidra/RuntimeScripts/Linux/support/launch.sh @@ -101,6 +101,10 @@ else CPATH="${INSTALL_DIR}/Ghidra/Framework/Utility/bin/main" LS_CPATH="${INSTALL_DIR}/GhidraBuild/LaunchSupport/bin/main" DEBUG_LOG4J="${INSTALL_DIR}/Ghidra/RuntimeScripts/Common/support/debug.log4j.xml" + if ! [ -d "${LS_CPATH}" ]; then + echo "Ghidra cannot launch in development mode because Eclipse has not compiled its class files." + exit 1 + fi fi # Make sure some kind of java is on the path. It's required to run the LaunchSupport program. diff --git a/Ghidra/RuntimeScripts/Windows/support/launch.bat b/Ghidra/RuntimeScripts/Windows/support/launch.bat index 98160e6c33..308867a91e 100644 --- a/Ghidra/RuntimeScripts/Windows/support/launch.bat +++ b/Ghidra/RuntimeScripts/Windows/support/launch.bat @@ -77,6 +77,11 @@ set "INSTALL_DIR=%INSTALL_DIR%..\..\..\" set "CPATH=%INSTALL_DIR%Ghidra\Framework\Utility\bin\main" set "LS_CPATH=%INSTALL_DIR%GhidraBuild\LaunchSupport\bin\main" set "DEBUG_LOG4J=%INSTALL_DIR%Ghidra\RuntimeScripts\Common\support\debug.log4j.xml" +if not exist "%LS_CPATH%" ( + echo Ghidra cannot launch in development mode because Eclipse has not compiled its class files. + set ERRORLEVEL=1 + goto exit1 +) :continue2