Commit a051ce6c authored by Skylot's avatar Skylot

fix(scripts): support spaces in java path for windows scripts (#686)

parent 40f19cce
......@@ -19,5 +19,10 @@ applicationDistribution.with {
}
startScripts {
defaultJvmOpts = ['-Xms128M', '-Xmx4g']
defaultJvmOpts = ['-Xms128M', '-Xmx4g', '-XX:+UseG1GC']
doLast {
def str = windowsScript.text
str = str.replaceAll('set JAVA_EXE=%JAVA_HOME%/bin/java.exe', 'set JAVA_EXE="%JAVA_HOME%/bin/java.exe"')
windowsScript.text = str
}
}
......@@ -51,8 +51,8 @@ startScripts {
doLast {
def str = windowsScript.text
str = str.replaceAll('java.exe', 'javaw.exe')
str = str.replaceAll('"%JAVA_EXE%" %DEFAULT_JVM_OPTS%',
'start "jadx-gui" /B "%JAVA_EXE%" %DEFAULT_JVM_OPTS%')
str = str.replaceAll('"%JAVA_EXE%" %DEFAULT_JVM_OPTS%', 'start "jadx-gui" /B "%JAVA_EXE%" %DEFAULT_JVM_OPTS%')
str = str.replaceAll('set JAVA_EXE=%JAVA_HOME%/bin/javaw.exe', 'set JAVA_EXE="%JAVA_HOME%/bin/javaw.exe"')
windowsScript.text = str
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment