mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-01 01:44:34 -05: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:
@@ -15,7 +15,12 @@ object AppInfo {
|
||||
*
|
||||
* @since extension-lib 1.3
|
||||
*/
|
||||
fun getVersionCode() = BuildConfig.REVISION.substring(1).toInt()
|
||||
fun getVersionCode() =
|
||||
BuildConfig.VERSION
|
||||
.replace("v", "")
|
||||
.split('.')
|
||||
.joinToString("")
|
||||
.toInt()
|
||||
|
||||
/**
|
||||
* should be something like "0.13.1"
|
||||
|
||||
@@ -12,6 +12,7 @@ import suwayomi.tachidesk.server.generated.BuildConfig
|
||||
data class AboutDataClass(
|
||||
val name: String,
|
||||
val version: String,
|
||||
@Deprecated("The version includes the revision as the patch number")
|
||||
val revision: String,
|
||||
val buildType: String,
|
||||
val buildTime: Long,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package suwayomi.tachidesk.graphql.queries
|
||||
|
||||
import com.expediagroup.graphql.generator.annotations.GraphQLDeprecated
|
||||
import suwayomi.tachidesk.global.impl.AppUpdate
|
||||
import suwayomi.tachidesk.graphql.types.AboutWebUI
|
||||
import suwayomi.tachidesk.graphql.types.WebUIUpdateCheck
|
||||
@@ -15,6 +16,7 @@ class InfoQuery {
|
||||
data class AboutServerPayload(
|
||||
val name: String,
|
||||
val version: String,
|
||||
@GraphQLDeprecated("The version includes the revision as the patch number")
|
||||
val revision: String,
|
||||
val buildType: String,
|
||||
val buildTime: Long,
|
||||
|
||||
@@ -20,7 +20,7 @@ class MangaUpdatesInterceptor(
|
||||
originalRequest
|
||||
.newBuilder()
|
||||
.addHeader("Authorization", "Bearer $token")
|
||||
.header("User-Agent", "Suwayomi ${BuildConfig.VERSION} (${BuildConfig.REVISION})")
|
||||
.header("User-Agent", "Suwayomi ${BuildConfig.VERSION}")
|
||||
.build()
|
||||
|
||||
return chain.proceed(authRequest)
|
||||
|
||||
@@ -137,7 +137,7 @@ fun applicationSetup() {
|
||||
|
||||
setupLogLevelUpdating(serverConfig.debugLogsEnabled, listOf(BASE_LOGGER_NAME))
|
||||
|
||||
logger.info { "Running Suwayomi-Server ${BuildConfig.VERSION} revision ${BuildConfig.REVISION}" }
|
||||
logger.info { "Running Suwayomi-Server ${BuildConfig.VERSION}" }
|
||||
|
||||
logger.debug {
|
||||
"Loaded config:\n" +
|
||||
|
||||
@@ -591,14 +591,18 @@ object WebInterfaceManager {
|
||||
return BuildConfig.WEBUI_TAG
|
||||
}
|
||||
|
||||
val currentServerVersionNumber = extractVersion(BuildConfig.REVISION)
|
||||
val currentServerVersionNumber =
|
||||
BuildConfig.VERSION
|
||||
.split(".")
|
||||
.last()
|
||||
.toInt()
|
||||
val webUIToServerVersionMappings = fetchServerMappingFile(flavor)
|
||||
|
||||
logger.debug {
|
||||
"getLatestCompatibleVersion: " +
|
||||
"flavor= ${flavor.uiName}, " +
|
||||
"webUIChannel= ${serverConfig.webUIChannel.value}, " +
|
||||
"currentServerVersion= ${BuildConfig.REVISION}, " +
|
||||
"currentServerVersion= ${BuildConfig.VERSION}, " +
|
||||
"mappingFile= $webUIToServerVersionMappings"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user