more of package moving

This commit is contained in:
Aria Moradi 2021-05-27 02:07:32 +04:30
parent 24f68b8f1a
commit 155f9f107d
8 changed files with 9 additions and 9 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(
"ir.armor.tachidesk.rootDir", "suwayomi.tachidesk.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("ir.armor.tachidesk.debugLogsEnabled", config.getString("server.debugLogsEnabled")).toBoolean() = System.getProperty("suwayomi.tachidesk.debugLogsEnabled", config.getString("server.debugLogsEnabled")).toBoolean()

View File

@ -5,7 +5,7 @@ plugins {
} }
allprojects { allprojects {
group = "ir.armor.tachidesk" group = "suwayomi"
version = "1.0" version = "1.0"

View File

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

View File

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

View File

@ -18,11 +18,11 @@ object Browser {
fun openInBrowser() { fun openInBrowser() {
val openInElectron = System.getProperty("ir.armor.tachidesk.webInterface")?.equals("electron") val openInElectron = System.getProperty("suwayomi.tachidesk.webInterface")?.equals("electron")
if (openInElectron == true) { if (openInElectron == true) {
try { try {
val electronPath = System.getProperty("ir.armor.tachidesk.electronPath")!! val electronPath = System.getProperty("suwayomi.tachidesk.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()

View File

@ -63,7 +63,7 @@ fun runMigrations(migrations: List<Migration>, database: Database = TransactionM
@OptIn(ExperimentalPathApi::class) @OptIn(ExperimentalPathApi::class)
private fun getTopLevelClasses(packageName: String): List<Class<*>> { private fun getTopLevelClasses(packageName: String): List<Class<*>> {
ServerConfig::class.java.getResource("/" + "ir.armor.tachidesk.model.database.migration".replace('.', '/')) ServerConfig::class.java.getResource("/" + "suwayomi.tachidesk.model.database.migration".replace('.', '/'))
val path = "/" + packageName.replace('.', '/') val path = "/" + packageName.replace('.', '/')
val uri = ServerConfig::class.java.getResource(path).toURI() val uri = ServerConfig::class.java.getResource(path).toURI()

View File

@ -48,7 +48,7 @@ class TestExtensions {
@BeforeAll @BeforeAll
fun setup() { fun setup() {
val dataRoot = File("tmp/TestDesk").absolutePath val dataRoot = File("tmp/TestDesk").absolutePath
System.setProperty("ir.armor.tachidesk.rootDir", dataRoot) System.setProperty("suwayomi.tachidesk.rootDir", dataRoot)
applicationSetup() applicationSetup()
setLoggingEnabled(false) setLoggingEnabled(false)