Merge branch 'master' of github.com:Suwayomi/Tachidesk

This commit is contained in:
Aria Moradi 2021-05-03 20:41:46 +04:30
commit b626aa66ba
2 changed files with 9 additions and 0 deletions

View File

@ -78,6 +78,7 @@ You need this software packages installed in order to build this project:
- Java Development Kit and Java Runtime Environment version 8 or newer(both Oracle JDK and OpenJDK works) - Java Development Kit and Java Runtime Environment version 8 or newer(both Oracle JDK and OpenJDK works)
- Nodejs LTS or latest - Nodejs LTS or latest
- Yarn - Yarn
- Git
### building the full-blown jar ### building the full-blown jar
Run `./gradlew :webUI:copyBuild server:shadowJar`, the resulting built jar file will be `server/build/Tachidesk-vX.Y.Z-rxxx.jar`. Run `./gradlew :webUI:copyBuild server:shadowJar`, the resulting built jar file will be `server/build/Tachidesk-vX.Y.Z-rxxx.jar`.
### building without `webUI` bundled(server only) ### building without `webUI` bundled(server only)

View File

@ -44,6 +44,7 @@ import java.io.IOException
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
import java.util.Date import java.util.Date
import java.util.concurrent.CompletableFuture import java.util.concurrent.CompletableFuture
import kotlin.concurrent.thread
/* /*
* Copyright (C) Contributors to the Suwayomi project * Copyright (C) Contributors to the Suwayomi project
@ -75,6 +76,13 @@ object JavalinSetup {
} }
config.enableCorsForAllOrigins() config.enableCorsForAllOrigins()
}.start(serverConfig.ip, serverConfig.port) }.start(serverConfig.ip, serverConfig.port)
Runtime.getRuntime().addShutdownHook(
thread(start = false) {
app.stop()
}
)
if (hasWebUiBundled && serverConfig.initialOpenInBrowserEnabled) { if (hasWebUiBundled && serverConfig.initialOpenInBrowserEnabled) {
openInBrowser() openInBrowser()
} }