mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
Merge branch 'GP-0_ghidraffe_LaunchScriptAllowSpecialCharArgs'
This commit is contained in:
commit
90843e92bc
1 changed files with 16 additions and 11 deletions
|
@ -55,19 +55,24 @@ setlocal enabledelayedexpansion
|
||||||
::
|
::
|
||||||
set VMARG_LIST=
|
set VMARG_LIST=
|
||||||
set ARGS=
|
set ARGS=
|
||||||
set INDEX=0
|
set /A INDEX=0
|
||||||
for %%A in (%*) do (
|
:shift_loop
|
||||||
set /A INDEX=!INDEX!+1
|
SET ARG=%1
|
||||||
if "!INDEX!"=="1" ( set MODE=%%A
|
IF DEFINED ARG (
|
||||||
) else if "!INDEX!"=="2" ( if %%~A == jre (set JAVA_TYPE_ARG=-java_home) else (set JAVA_TYPE_ARG=-jdk_home)
|
set /A INDEX+=1
|
||||||
) else if "!INDEX!"=="3" ( set APPNAME=%%A
|
if "!INDEX!"=="1" ( set MODE=%~1
|
||||||
) else if "!INDEX!"=="4" ( set MAXMEM=%%~A
|
) else if "!INDEX!"=="2" ( if "%~1" == "jre" (set JAVA_TYPE_ARG=-java_home) else (set JAVA_TYPE_ARG=-jdk_home)
|
||||||
) else if "!INDEX!"=="5" ( if not "%%~A"=="" set VMARG_LIST=%%~A
|
) else if "!INDEX!"=="3" ( set APPNAME=%~1
|
||||||
) else if "!INDEX!"=="6" ( set CLASSNAME=%%~A
|
) else if "!INDEX!"=="4" ( set MAXMEM=%~1
|
||||||
) else set ARGS=!ARGS! %%A
|
) else if "!INDEX!"=="5" ( if not "%~1"=="" set VMARG_LIST=%~1
|
||||||
|
) else if "!INDEX!"=="6" ( set CLASSNAME=%~1
|
||||||
|
) else set ARGS=!ARGS! "%~1"
|
||||||
|
|
||||||
|
SHIFT
|
||||||
|
GOTO shift_loop
|
||||||
)
|
)
|
||||||
|
|
||||||
if %INDEX% geq 6 goto continue1
|
if not "%CLASSNAME%" == "" (goto continue1)
|
||||||
echo Incorrect launch usage - missing argument^(s^)
|
echo Incorrect launch usage - missing argument^(s^)
|
||||||
goto showUsage
|
goto showUsage
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue