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:
schroda
2025-04-06 21:09:56 +02:00
committed by GitHub
parent 78fd09c728
commit 3167d8aa15
11 changed files with 46 additions and 86 deletions

View File

@@ -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()}" }