From 4602ff464621f03b42bb56808860b6ea9abf49b5 Mon Sep 17 00:00:00 2001 From: Xiaoyin Liu Date: Wed, 8 Apr 2020 19:29:39 +0800 Subject: [PATCH] Add missing quotes in launch.bat When set Windows environment variables, they need to be quoted if special characters like & exists in path. Fixes #1726 --- .../RuntimeScripts/Windows/support/launch.bat | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Ghidra/RuntimeScripts/Windows/support/launch.bat b/Ghidra/RuntimeScripts/Windows/support/launch.bat index 9bee1566cf..0fc913c731 100644 --- a/Ghidra/RuntimeScripts/Windows/support/launch.bat +++ b/Ghidra/RuntimeScripts/Windows/support/launch.bat @@ -36,7 +36,7 @@ for /f "tokens=2" %%# in ("%cmdcmdline%") do if /i "%%#" equ "/c" set DOUBLE_CLI :: '% ~' dereferences the value in param 0 :: 'd' - drive :: 'p' - path (without filename) -set SUPPORT_DIR=%~dp0 +set "SUPPORT_DIR=%~dp0" :: :: Parse arguments @@ -63,20 +63,20 @@ goto showUsage :: :: Production Environment :: -set INSTALL_DIR=%SUPPORT_DIR%..\ -set CPATH=%INSTALL_DIR%Ghidra\Framework\Utility\lib\Utility.jar -set LS_CPATH=%SUPPORT_DIR%LaunchSupport.jar -set DEBUG_LOG4J=%SUPPORT_DIR%debug.log4j.xml +set "INSTALL_DIR=%SUPPORT_DIR%..\" +set "CPATH=%INSTALL_DIR%Ghidra\Framework\Utility\lib\Utility.jar" +set "LS_CPATH=%SUPPORT_DIR%LaunchSupport.jar" +set "DEBUG_LOG4J=%SUPPORT_DIR%debug.log4j.xml" if exist "%INSTALL_DIR%Ghidra" goto continue2 :: :: Development Environment :: -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 +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" :continue2