reconsider package strings

This commit is contained in:
Aria Moradi 2021-05-27 02:13:17 +04:30
parent 155f9f107d
commit dda5a2df93
5 changed files with 6 additions and 6 deletions

View File

@ -12,7 +12,7 @@ import net.harawata.appdirs.AppDirsFactory
val ApplicationRootDir: String val ApplicationRootDir: String
get(): String { get(): String {
return System.getProperty( return System.getProperty(
"suwayomi.tachidesk.rootDir", "suwayomi.server.rootDir",
AppDirsFactory.getInstance().getUserDataDir("Tachidesk", null, null) AppDirsFactory.getInstance().getUserDataDir("Tachidesk", null, null)
) )
} }

View File

@ -17,4 +17,4 @@ fun setLogLevel(level: Level) {
} }
fun debugLogsEnabled(config: Config) fun debugLogsEnabled(config: Config)
= System.getProperty("suwayomi.tachidesk.debugLogsEnabled", config.getString("server.debugLogsEnabled")).toBoolean() = System.getProperty("suwayomi.server.debugLogsEnabled", config.getString("server.debugLogsEnabled")).toBoolean()

View File

@ -1 +1 @@
jre\bin\java -Dsuwayomi.tachidesk.debugLogsEnabled=true -jar Tachidesk.jar jre\bin\java -Dsuwayomi.server.debugLogsEnabled=true -jar Tachidesk.jar

View File

@ -1 +1 @@
jre\bin\javaw "-Dsuwayomi.tachidesk.webInterface=electron" "-Dsuwayomi.tachidesk.electronPath=electron/electron.exe" -jar Tachidesk.jar jre\bin\javaw "-Dsuwayomi.server.webInterface=electron" "-Dsuwayomi.server.electronPath=electron/electron.exe" -jar Tachidesk.jar

View File

@ -18,11 +18,11 @@ object Browser {
fun openInBrowser() { fun openInBrowser() {
val openInElectron = System.getProperty("suwayomi.tachidesk.webInterface")?.equals("electron") val openInElectron = System.getProperty("suwayomi.server.webInterface")?.equals("electron")
if (openInElectron == true) { if (openInElectron == true) {
try { try {
val electronPath = System.getProperty("suwayomi.tachidesk.electronPath")!! val electronPath = System.getProperty("suwayomi.server.electronPath")!!
electronInstances.add(ProcessBuilder(electronPath, appBaseUrl).start()) electronInstances.add(ProcessBuilder(electronPath, appBaseUrl).start())
} catch (e: Throwable) { // cover both java.lang.Exception and java.lang.Error } catch (e: Throwable) { // cover both java.lang.Exception and java.lang.Error
e.printStackTrace() e.printStackTrace()