ghidra/Ghidra/RuntimeScripts/Windows/support/buildGhidraJar.bat
Ryan Kurtz 4491a0fd6e GP-2301: Each launch script can now specify if they require a JDK or JRE
to run.  Allows svrAdmin to run with just a JRE, like the GhidraServer.
2022-08-12 03:39:36 -04:00

30 lines
818 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% jdk Ghidra "" "%APP_VMARGS%" ghidra.util.GhidraJarBuilder -main ghidra.JarRun %*