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

This commit is contained in:
Skylot
2019-06-10 14:46:08 +03:00
parent 40f19cce61
commit a051ce6cf4
2 changed files with 8 additions and 3 deletions
+6 -1
View File
@@ -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
}
}
+2 -2
View File
@@ -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
}
}