mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-25 10:48:50 +08:00
GP-6350: You can now set PyGhidra Java options via an assortment of
environment variables (Closes #8942)
This commit is contained in:
@@ -11,8 +11,11 @@
|
||||
SCRIPT_FILE="$(readlink -f "$0" 2>/dev/null || readlink "$0" 2>/dev/null || echo "$0")"
|
||||
SCRIPT_DIR="${SCRIPT_FILE%/*}"
|
||||
|
||||
# Add optional JVM args inside the quotes
|
||||
VMARG_LIST=""
|
||||
# Since JPype doesn't seem to pick up JDK_JAVA_OPTIONS automatically, include it ourselves
|
||||
VMARG_LIST="${JDK_JAVA_OPTIONS}"
|
||||
|
||||
# Apply Java options from externally set environment variables
|
||||
VMARG_LIST="${VMARG_LIST} ${GHIDRA_JAVA_OPTIONS} ${PYGHIDRA_JAVA_OPTIONS}"
|
||||
|
||||
# Make sure Python3 is installed
|
||||
if ! [ -x "$(command -v python3)" ] ; then
|
||||
|
||||
@@ -22,8 +22,11 @@ setlocal enabledelayedexpansion
|
||||
set DOUBLE_CLICKED=n
|
||||
for /f "tokens=2" %%# in ("%cmdcmdline%") do if /i "%%#" equ "/c" set DOUBLE_CLICKED=y
|
||||
|
||||
:: Add optional JVM args inside the quotes
|
||||
set VMARG_LIST=-Dsun.java2d.dpiaware=true
|
||||
:: Since JPype doesn't seem to pick up JDK_JAVA_OPTIONS automatically, include it ourselves
|
||||
set VMARG_LIST=%JDK_JAVA_OPTIONS%
|
||||
|
||||
:: Apply Java options from externally set environment variables
|
||||
set VMARG_LIST=%VMARG_LIST% %GHIDRA_JAVA_OPTIONS% %PYGHIDRA_JAVA_OPTIONS% -Dsun.java2d.dpiaware=true
|
||||
|
||||
:: Make sure Python3 is installed
|
||||
set PYTHON=py
|
||||
|
||||
Reference in New Issue
Block a user