mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-22 07:30:24 +00:00
Rework dist scripts
This commit is contained in:
parent
a565c795cf
commit
cb413ee358
2 changed files with 6 additions and 34 deletions
36
dist/base.gradle
vendored
36
dist/base.gradle
vendored
|
@ -15,6 +15,8 @@ task licenses(type: DefaultTask) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def debugArguments = file("$projectDir/debug/debug_arguments.txt").text.lines().map(s -> '"' + s + '"').collect(Collectors.joining(' '))
|
||||||
|
|
||||||
if (org.gradle.internal.os.OperatingSystem.current().isWindows()) {
|
if (org.gradle.internal.os.OperatingSystem.current().isWindows()) {
|
||||||
task baseDist(type: DefaultTask) {
|
task baseDist(type: DefaultTask) {
|
||||||
doLast {
|
doLast {
|
||||||
|
@ -35,24 +37,13 @@ if (org.gradle.internal.os.OperatingSystem.current().isWindows()) {
|
||||||
into "$distDir/base/app/lang"
|
into "$distDir/base/app/lang"
|
||||||
}
|
}
|
||||||
|
|
||||||
def debugArguments = file("$projectDir/debug/debug_arguments.txt").text.lines().map(s -> '"' + s + '"').collect(Collectors.joining(
|
|
||||||
' '))
|
|
||||||
def debugAttachArguments = file("$projectDir/debug/windows/debug_attach_arguments.txt").text.lines().map(s -> '"' + s + '"').collect(
|
|
||||||
Collectors.joining(' '))
|
|
||||||
file("$distDir/base/app/scripts").mkdirs()
|
file("$distDir/base/app/scripts").mkdirs()
|
||||||
|
|
||||||
def debug = file("$distDir/base/app/scripts/xpiped_debug.bat")
|
def debug = file("$distDir/base/app/scripts/xpiped_debug.bat")
|
||||||
debug.text = file("$projectDir/debug/windows/xpiped_debug.bat").text.replace(
|
debug.text = file("$projectDir/debug/windows/xpiped_debug.bat").text.replace(
|
||||||
'JVM-ARGS',
|
'JVM-ARGS',
|
||||||
debugArguments)
|
debugArguments)
|
||||||
debug.setExecutable(true)
|
debug.setExecutable(true)
|
||||||
|
|
||||||
def debugAttach = file("$distDir/base/app/scripts/xpiped_debug_attach.bat")
|
|
||||||
debugAttach.text = file("$projectDir/debug/windows/xpiped_debug.bat").text.replace(
|
|
||||||
'JVM-ARGS',
|
|
||||||
debugAttachArguments + ' ' + debugArguments)
|
|
||||||
debugAttach.setExecutable(true)
|
|
||||||
|
|
||||||
copy {
|
copy {
|
||||||
from "$distDir/licenses"
|
from "$distDir/licenses"
|
||||||
into "$distDir/base/licenses"
|
into "$distDir/base/licenses"
|
||||||
|
@ -85,25 +76,13 @@ if (org.gradle.internal.os.OperatingSystem.current().isWindows()) {
|
||||||
into "$distDir/base/app"
|
into "$distDir/base/app"
|
||||||
}
|
}
|
||||||
|
|
||||||
def debugArguments = file("$projectDir/debug/debug_arguments.txt").text.lines().map(s -> '"' + s + '"').collect(Collectors.joining(
|
|
||||||
' '))
|
|
||||||
def debugAttachArguments = file("$projectDir/debug/linux/debug_attach_arguments.txt").text.lines().map(s -> '"' + s + '"').collect(
|
|
||||||
Collectors.joining(' '))
|
|
||||||
file("$distDir/base/app/scripts").mkdirs()
|
file("$distDir/base/app/scripts").mkdirs()
|
||||||
|
|
||||||
|
|
||||||
def debug = file("$distDir/base/app/scripts/xpiped_debug.sh")
|
def debug = file("$distDir/base/app/scripts/xpiped_debug.sh")
|
||||||
debug.text = file("$projectDir/debug/linux/xpiped_debug.sh").text.replace(
|
debug.text = file("$projectDir/debug/linux/xpiped_debug.sh").text.replace(
|
||||||
'JVM-ARGS',
|
'JVM-ARGS',
|
||||||
debugArguments)
|
debugArguments)
|
||||||
debug.setExecutable(true, false)
|
debug.setExecutable(true, false)
|
||||||
|
|
||||||
def debugAttach = file("$distDir/base/app/scripts/xpiped_debug_attach.sh")
|
|
||||||
debugAttach.text = file("$projectDir/debug/linux/xpiped_debug.sh").text.replace(
|
|
||||||
'JVM-ARGS',
|
|
||||||
debugAttachArguments + ' ' + debugArguments)
|
|
||||||
debugAttach.setExecutable(true, false)
|
|
||||||
|
|
||||||
copy {
|
copy {
|
||||||
from "$distDir/licenses"
|
from "$distDir/licenses"
|
||||||
into "$distDir/base/licenses"
|
into "$distDir/base/licenses"
|
||||||
|
@ -135,23 +114,12 @@ if (org.gradle.internal.os.OperatingSystem.current().isWindows()) {
|
||||||
into "$distDir/$app/Contents/Resources/lang"
|
into "$distDir/$app/Contents/Resources/lang"
|
||||||
}
|
}
|
||||||
|
|
||||||
def debugArguments = file("$projectDir/debug/debug_arguments.txt").text.lines().map(s -> '"' + s + '"').collect(Collectors.joining(
|
|
||||||
' '))
|
|
||||||
def debugAttachArguments = file("$projectDir/debug/mac/debug_attach_arguments.txt").text.lines().map(s -> '"' + s + '"').collect(
|
|
||||||
Collectors.joining(' '))
|
|
||||||
file("$distDir/$app/Contents/Resources/scripts").mkdirs()
|
file("$distDir/$app/Contents/Resources/scripts").mkdirs()
|
||||||
|
|
||||||
def debug = file("$distDir/$app/Contents/Resources/scripts/xpiped_debug.sh")
|
def debug = file("$distDir/$app/Contents/Resources/scripts/xpiped_debug.sh")
|
||||||
debug.text = file("$projectDir/debug/mac/xpiped_debug.sh").text.replace(
|
debug.text = file("$projectDir/debug/mac/xpiped_debug.sh").text.replace(
|
||||||
'JVM-ARGS',
|
'JVM-ARGS',
|
||||||
debugArguments)
|
debugArguments)
|
||||||
debug.setExecutable(true, false)
|
debug.setExecutable(true, false)
|
||||||
|
|
||||||
def debugAttach = file("$distDir/$app/Contents/Resources/scripts/xpiped_debug_attach.sh")
|
|
||||||
debugAttach.text = file("$projectDir/debug/mac/xpiped_debug.sh").text.replace(
|
|
||||||
'JVM-ARGS',
|
|
||||||
debugAttachArguments + ' ' + debugArguments)
|
|
||||||
debugAttach.setExecutable(true, false)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
4
dist/jpackage.gradle
vendored
4
dist/jpackage.gradle
vendored
|
@ -20,6 +20,10 @@ if (org.gradle.internal.os.OperatingSystem.current().isMacOsX()) {
|
||||||
releaseArguments += '-Xdock:name=XPipe'
|
releaseArguments += '-Xdock:name=XPipe'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isFullRelease || isStage) {
|
||||||
|
releaseArguments.add("-XX:+DisableAttachMechanism")
|
||||||
|
}
|
||||||
|
|
||||||
// To remove warnings, the plugin probably does not expect the JPackage tasks to be in a separate project
|
// To remove warnings, the plugin probably does not expect the JPackage tasks to be in a separate project
|
||||||
application {
|
application {
|
||||||
mainModule = 'io.xpipe.app'
|
mainModule = 'io.xpipe.app'
|
||||||
|
|
Loading…
Reference in a new issue