mirror of
https://github.com/Suwayomi/Tachidesk.git
synced 2025-12-10 06:42:07 +01:00
Fix/startup jvm error after installation update via msi (#1229)
* Remove existing installations with msi installer * Remove unused x86 wxs file * Uninstall old msi versions with different upgrade code * Progress but error 2721 happens on install * Remove added uninstall previous version wxs stuff * Use revision as patch number MSI only uninstalls previous versions in case the version number changed (it only checks the first three numbers (major, minor, patch)). Thus, to prevent each preview install to result in it getting registered as a new "app" and for it to uninstall the old versions, we have to change the version on each release. * Deprecate "BuildConfig.REVISION" * Remove outdated env vars --------- Co-authored-by: Syer10 <syer10@users.noreply.github.com>
This commit is contained in:
@@ -10,14 +10,13 @@ import java.io.BufferedReader
|
||||
const val MainClass = "suwayomi.tachidesk.MainKt"
|
||||
|
||||
// should be bumped with each stable release
|
||||
val tachideskVersion = System.getenv("ProductVersion") ?: "v1.1.1"
|
||||
val getTachideskVersion = { "v1.1.${getCommitCount()}" }
|
||||
|
||||
val webUIRevisionTag = System.getenv("WebUIRevision") ?: "r1689"
|
||||
val webUIRevisionTag = "r1689"
|
||||
|
||||
// counts commits on the current checked out branch
|
||||
val getTachideskRevision = {
|
||||
private val getCommitCount = {
|
||||
runCatching {
|
||||
System.getenv("ProductRevision") ?: ProcessBuilder()
|
||||
ProcessBuilder()
|
||||
.command("git", "rev-list", "HEAD", "--count")
|
||||
.start()
|
||||
.let { process ->
|
||||
@@ -26,8 +25,11 @@ val getTachideskRevision = {
|
||||
it.bufferedReader().use(BufferedReader::readText)
|
||||
}
|
||||
process.destroy()
|
||||
"r" + output.trim()
|
||||
output.trim()
|
||||
}
|
||||
}.getOrDefault("r0")
|
||||
}.getOrDefault("0")
|
||||
}
|
||||
|
||||
// counts commits on the current checked out branch
|
||||
val getTachideskRevision = { "r${getCommitCount()}" }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user