fixed AppImage, changed to single app
|
@ -6,6 +6,10 @@
|
||||||
* User Manual available at https://docs.gradle.org/8.0.2/userguide/building_java_projects.html
|
* User Manual available at https://docs.gradle.org/8.0.2/userguide/building_java_projects.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import org.gradle.internal.os.OperatingSystem
|
||||||
|
import java.nio.file.Files
|
||||||
|
import java.io.File
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
@ -28,6 +32,8 @@ plugins {
|
||||||
|
|
||||||
apply plugin: 'io.github.fvarrui.javapackager.plugin'
|
apply plugin: 'io.github.fvarrui.javapackager.plugin'
|
||||||
|
|
||||||
|
version = "1.0"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
// Use Maven Central for resolving dependencies.
|
// Use Maven Central for resolving dependencies.
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
@ -62,7 +68,7 @@ distTar {
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
archiveFileName = 'ServerCraft.jar'
|
// archiveFileName = 'ServerCraft.jar'
|
||||||
|
|
||||||
manifest {
|
manifest {
|
||||||
attributes 'Main-Class': application.mainClass
|
attributes 'Main-Class': application.mainClass
|
||||||
|
@ -83,12 +89,10 @@ task pack(type: io.github.fvarrui.javapackager.gradle.PackageTask, dependsOn: bu
|
||||||
organizationUrl = "https://brysonsteck.xyz"
|
organizationUrl = "https://brysonsteck.xyz"
|
||||||
organizationEmail = "me@brysonsteck.xyz"
|
organizationEmail = "me@brysonsteck.xyz"
|
||||||
url = "https://codeberg.org/brysonsteck/ServerCraft"
|
url = "https://codeberg.org/brysonsteck/ServerCraft"
|
||||||
createTarball = true
|
|
||||||
createZipball = true
|
|
||||||
additionalResources = [ file('src/main/resources/xyz/brysonsteck/ServerCraft/') ]
|
|
||||||
|
|
||||||
linuxConfig {
|
linuxConfig {
|
||||||
pngFile = file('src/main/resources/icon.png')
|
pngFile = file('src/main/resources/icon.png')
|
||||||
|
wrapJar = false
|
||||||
}
|
}
|
||||||
|
|
||||||
macConfig {
|
macConfig {
|
||||||
|
@ -109,10 +113,21 @@ task pack(type: io.github.fvarrui.javapackager.gradle.PackageTask, dependsOn: bu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
clean.doFirst {
|
// tasks.register('fixAppImageIcon', Copy) {
|
||||||
delete "${rootDir}/app/bin"
|
build.doLast {
|
||||||
delete "${rootDir}/build"
|
if (OperatingSystem.current().isLinux()) {
|
||||||
|
exec {
|
||||||
|
workingDir "${buildDir}"
|
||||||
|
commandLine "mkdir", "-p", "assets/AppDir"
|
||||||
}
|
}
|
||||||
|
exec {
|
||||||
|
workingDir "${buildDir}"
|
||||||
|
commandLine "cp", "resources/main/icon.png", "assets/AppDir/ServerCraft.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// build.finalizedBy(fixAppImageIcon)
|
||||||
|
|
||||||
javafx {
|
javafx {
|
||||||
version = "20"
|
version = "20"
|
|
@ -8,4 +8,3 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
rootProject.name = 'ServerCraft'
|
rootProject.name = 'ServerCraft'
|
||||||
include('app')
|
|
||||||
|
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 215 KiB After Width: | Height: | Size: 215 KiB |
Before Width: | Height: | Size: 209 KiB After Width: | Height: | Size: 209 KiB |
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 5 KiB |