ghidra/Ghidra/RuntimeScripts/Windows/support/buildGhidraJar.bat
Ryan Kurtz 38edc05f81 GP-1057: Preventing Ghidra from launching when path contains !. Also
updating Installation Guide's "Known Issues" section.
2021-06-22 13:45:48 -04:00

30 lines
814 B
Batchfile

:: Ghidra Jar Builder launch
@echo off
setlocal
:: launch mode can be changed to one of the following:
:: fg, debug, debug-suspend
set LAUNCH_MODE=fg
:: Sets SUPPORT_DIR to the directory that contains this file (buildGhidraJar.bat).
:: SUPPORT_DIR will not contain a trailing slash.
::
:: '% ~' dereferences the value in param 0
:: 'd' - drive
:: 'p' - path (without filename)
:: '~0,-1' - removes trailing \
set "SUPPORT_DIR=%~dp0"
set "SUPPORT_DIR=%SUPPORT_DIR:~0,-1%"
set "GHIDRA_ROOT_DIR=%SUPPORT_DIR%\..\Ghidra"
if exist "%GHIDRA_ROOT_DIR%" goto continue
echo This script does not support development mode use
exit /B 1
:continue
set APP_VMARGS=-DGhidraJarBuilder.Name=%~n0
call "%SUPPORT_DIR%\launch.bat" %LAUNCH_MODE% Ghidra "" "%APP_VMARGS%" ghidra.util.GhidraJarBuilder -main ghidra.JarRun %*