mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-22 11:39:29 +00:00
switch platform for script files
This commit is contained in:
parent
690f38e4dd
commit
40421eec75
1 changed files with 24 additions and 19 deletions
43
build.gradle
43
build.gradle
|
@ -163,28 +163,33 @@ configure([project(':cli'),
|
||||||
|
|
||||||
// edit generated shell scripts such that they expect to be executed in the
|
// edit generated shell scripts such that they expect to be executed in the
|
||||||
// project root dir as opposed to a 'bin' subdirectory
|
// project root dir as opposed to a 'bin' subdirectory
|
||||||
def windowsScriptFile = file("${rootProject.projectDir}/haveno-${applicationName}.bat")
|
if (osdetector.os == 'windows') {
|
||||||
windowsScriptFile.text = windowsScriptFile.text.replace(
|
def windowsScriptFile = file("${rootProject.projectDir}/haveno-${applicationName}.bat")
|
||||||
'set APP_HOME=%DIRNAME%..', 'set APP_HOME=%DIRNAME%')
|
|
||||||
|
|
||||||
def unixScriptFile = file("${rootProject.projectDir}/haveno-$applicationName")
|
|
||||||
unixScriptFile.text = unixScriptFile.text.replace(
|
|
||||||
'APP_HOME=$( cd "${APP_HOME:-./}.." > /dev/null && pwd -P ) || exit', 'APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit')
|
|
||||||
|
|
||||||
if (applicationName == 'desktop') {
|
|
||||||
windowsScriptFile.text = windowsScriptFile.text.replace(
|
windowsScriptFile.text = windowsScriptFile.text.replace(
|
||||||
'DEFAULT_JVM_OPTS=', 'DEFAULT_JVM_OPTS=-XX:MaxRAM=4g ' +
|
'set APP_HOME=%DIRNAME%..', 'set APP_HOME=%DIRNAME%')
|
||||||
'--add-opens=javafx.controls/com.sun.javafx.scene.control.behavior=ALL-UNNAMED ' +
|
|
||||||
'--add-opens=javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED ' +
|
|
||||||
'--add-opens=java.base/java.lang.reflect=ALL-UNNAMED ' +
|
|
||||||
'--add-opens=javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED')
|
|
||||||
|
|
||||||
|
if (applicationName == 'desktop') {
|
||||||
|
windowsScriptFile.text = windowsScriptFile.text.replace(
|
||||||
|
'DEFAULT_JVM_OPTS=', 'DEFAULT_JVM_OPTS=-XX:MaxRAM=4g ' +
|
||||||
|
'--add-opens=javafx.controls/com.sun.javafx.scene.control.behavior=ALL-UNNAMED ' +
|
||||||
|
'--add-opens=javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED ' +
|
||||||
|
'--add-opens=java.base/java.lang.reflect=ALL-UNNAMED ' +
|
||||||
|
'--add-opens=javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
def unixScriptFile = file("${rootProject.projectDir}/haveno-$applicationName")
|
||||||
unixScriptFile.text = unixScriptFile.text.replace(
|
unixScriptFile.text = unixScriptFile.text.replace(
|
||||||
'DEFAULT_JVM_OPTS=""', 'DEFAULT_JVM_OPTS="-XX:MaxRAM=4g ' +
|
'APP_HOME=$( cd "${APP_HOME:-./}.." > /dev/null && pwd -P ) || exit', 'APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit')
|
||||||
'--add-opens=javafx.controls/com.sun.javafx.scene.control.behavior=ALL-UNNAMED ' +
|
|
||||||
'--add-opens=javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED ' +
|
if (applicationName == 'desktop') {
|
||||||
'--add-opens=java.base/java.lang.reflect=ALL-UNNAMED ' +
|
unixScriptFile.text = unixScriptFile.text.replace(
|
||||||
'--add-opens=javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED"')
|
'DEFAULT_JVM_OPTS=""', 'DEFAULT_JVM_OPTS="-XX:MaxRAM=4g ' +
|
||||||
|
'--add-opens=javafx.controls/com.sun.javafx.scene.control.behavior=ALL-UNNAMED ' +
|
||||||
|
'--add-opens=javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED ' +
|
||||||
|
'--add-opens=java.base/java.lang.reflect=ALL-UNNAMED ' +
|
||||||
|
'--add-opens=javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED"')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (applicationName == 'apitest') {
|
if (applicationName == 'apitest') {
|
||||||
|
|
Loading…
Reference in a new issue