GP-693: Fixed additional issues with Ghidra and its supporting launch

scripts not being able to run correctly on Windows when an ampersand was
in the path. Also fixed an issue with svrAdmin.bat and
buildGhidraJar.bat not working if the Ghidra path contained a space.
This commit is contained in:
Ryan Kurtz
2021-02-19 10:46:20 -05:00
parent 61096c5fdf
commit 95b37d2ce1
10 changed files with 47 additions and 65 deletions

View File

@@ -24,7 +24,7 @@ set VMARG_LIST=-XX:ParallelGCThreads=2
set VMARG_LIST=%VMARG_LIST% -XX:CICompilerCount=2
:: store current path
set filepath=%~dp0
set "filepath=%~dp0"
:: Loop through parameters (if there aren't any, just continue) and store
:: in params variable.

View File

@@ -8,9 +8,9 @@ setlocal
set LAUNCH_MODE=fg
:: Sets SCRIPT_DIR to the directory that contains this file (ends with '\')
set SCRIPT_DIR=%~dp0
set "SCRIPT_DIR=%~dp0"
set GHIDRA_ROOT_DIR=%SCRIPT_DIR%..\Ghidra
set "GHIDRA_ROOT_DIR=%SCRIPT_DIR%..\Ghidra"
if exist "%GHIDRA_ROOT_DIR%" goto continue
echo This script does not support development mode use

View File

@@ -11,16 +11,16 @@
setlocal
REM Get parent of current folder
set SCRIPT_DIR=%~dp0
set "SCRIPT_DIR=%~dp0"
set GHIDRA_DIR=%SCRIPT_DIR%..\Ghidra
set "GHIDRA_DIR=%SCRIPT_DIR%..\Ghidra"
set OS_DIR=os
REM Production Environment
if exist "%GHIDRA_DIR%" goto continue
REM Development Environment
set GHIDRA_DIR=%SCRIPT_DIR%..\..\..
set "GHIDRA_DIR=%SCRIPT_DIR%..\..\.."
set OS_DIR=build\os
:continue
@@ -35,7 +35,7 @@ if exist "%PROGRAMFILES(X86)%" (
set OS_TYPE=win32
)
set PDB_EXE=%GHIDRA_DIR%\Features\PDB\%OS_DIR%\%OS_TYPE%\pdb.exe
set "PDB_EXE=%GHIDRA_DIR%\Features\PDB\%OS_DIR%\%OS_TYPE%\pdb.exe"
if not exist "%PDB_EXE%" (
echo "%PDB_EXE% not found"

View File

@@ -26,6 +26,6 @@ set VMARG_LIST=-XX:ParallelGCThreads=2
set VMARG_LIST=%VMARG_LIST% -XX:CICompilerCount=2
:: store current path
set filepath=%~dp0
set "filepath=%~dp0"
call "%filepath%launch.bat" %LAUNCH_MODE% Ghidra-Python "%MAXMEM%" "%VMARG_LIST%" ghidra.python.PythonRun %params%