fix xdg-open permissions on Linux
This commit is contained in:
parent
09af9fccb5
commit
2fb74dc552
2 changed files with 24 additions and 2 deletions
|
@ -1,4 +1,3 @@
|
|||
|
||||
plugins {
|
||||
id("java")
|
||||
id("application")
|
||||
|
@ -57,9 +56,11 @@ tasks.test {
|
|||
}
|
||||
|
||||
jlink {
|
||||
imageZip = project.file("${layout.buildDirectory}/distributions/ImageTagger-${javafx.platform.classifier}.zip")
|
||||
val buildDirectory = layout.buildDirectory.asFile.get().absolutePath
|
||||
imageZip = project.file("$buildDirectory/distributions/ImageTagger-${javafx.platform.classifier}.zip")
|
||||
options = listOf("--strip-debug", "--compress", "2", "--no-header-files", "--no-man-pages")
|
||||
launcher {
|
||||
unixScriptTemplate = project.file("${layout.projectDirectory}/src/main/resources/unixExecutableScriptTemplate.txt")
|
||||
name = "ImageTagger"
|
||||
}
|
||||
}
|
||||
|
|
21
img-ui/src/main/resources/unixExecutableScriptTemplate.txt
Normal file
21
img-ui/src/main/resources/unixExecutableScriptTemplate.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
# NucuLabs.dev's Image Tagger Application
|
||||
SCRIPT_NAME=\$(basename "\$0")
|
||||
APP_NAME=\${SCRIPT_NAME%.sh}
|
||||
|
||||
DIR="\${0%/*}"
|
||||
|
||||
<% if ( System.properties['BADASS_CDS_ARCHIVE_FILE_LINUX'] ) { %>
|
||||
CDS_ARCHIVE_FILE="<%= System.properties['BADASS_CDS_ARCHIVE_FILE_LINUX'] %>"
|
||||
CDS_JVM_OPTS="-XX:ArchiveClassesAtExit=\$CDS_ARCHIVE_FILE"
|
||||
if [ -f "\$CDS_ARCHIVE_FILE" ]; then
|
||||
CDS_JVM_OPTS="-XX:SharedArchiveFile=\$CDS_ARCHIVE_FILE"
|
||||
fi
|
||||
<% } %>
|
||||
|
||||
# Make jexec and jspawnhelper executable otherwise they won't work properly.
|
||||
chmod +x \$DIR/../lib/jexec
|
||||
chmod +x \$DIR/../lib/jspawnhelper
|
||||
|
||||
"\$DIR/java" \$CDS_JVM_OPTS ${jvmArgs} -p "\$DIR/../app" -m ${moduleName}/${mainClassName} ${args} "\$@"
|
Loading…
Reference in a new issue