Resolved #1757 - Can now see version when running from a desktop Jar
This commit is contained in:
parent
5e264a7e62
commit
267c98be55
4 changed files with 9 additions and 3 deletions
|
@ -21,8 +21,8 @@ android {
|
|||
applicationId "com.unciv.app"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 29
|
||||
versionCode 369
|
||||
versionName "3.5.7"
|
||||
versionCode appCodeNumber
|
||||
versionName appVersion
|
||||
|
||||
archivesBaseName = "Unciv"
|
||||
}
|
||||
|
|
|
@ -33,6 +33,9 @@ allprojects {
|
|||
version = '1.0.1'
|
||||
ext {
|
||||
appName = "Unciv"
|
||||
appCodeNumber = 369
|
||||
appVersion = "3.5.7"
|
||||
|
||||
gdxVersion = '1.9.10'
|
||||
roboVMVersion = '2.3.1'
|
||||
box2DLightsVersion = '1.4'
|
||||
|
|
|
@ -40,6 +40,7 @@ task dist(dependsOn: classes, type: Jar) { // Compiles the jar file
|
|||
|
||||
manifest {
|
||||
attributes 'Main-Class': project.mainClassName
|
||||
attributes 'Specification-Version': appVersion
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,9 @@ internal object DesktopLauncher {
|
|||
config.title = "Unciv"
|
||||
config.useHDPI = true
|
||||
|
||||
val game = UncivGame("Desktop", null){exitProcess(0)}
|
||||
val versionFromJar = DesktopLauncher.javaClass.`package`.specificationVersion
|
||||
|
||||
val game = UncivGame(if (versionFromJar != null) versionFromJar else "Desktop", null){exitProcess(0)}
|
||||
|
||||
if(!RaspberryPiDetector.isRaspberryPi()) // No discord RPC for Raspberry Pi, see https://github.com/yairm210/Unciv/issues/1624
|
||||
tryActivateDiscord(game)
|
||||
|
|
Loading…
Reference in a new issue