diff options
-rw-r--r-- | build.gradle.kts | 3 | ||||
-rw-r--r-- | gradle/libs.versions.toml | 4 | ||||
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/Firmament.kt | 15 | ||||
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/dbus/FirmamentDbusInterface.kt | 17 | ||||
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/dbus/FirmamentDbusObject.kt | 27 |
5 files changed, 0 insertions, 66 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index 812bf3c..f4ec9ea 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -151,9 +151,6 @@ dependencies { } nonModImplentation(libs.repoparser) shadowMe(libs.repoparser) - nonModImplentation(libs.bundles.dbus) - shadowMe(libs.bundles.dbus) - fun ktor(mod: String) = "io.ktor:ktor-$mod-jvm:${libs.versions.ktor.get()}" transInclude(nonModImplentation(ktor("client-core"))!!) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b63a839..89263b0 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -23,7 +23,6 @@ notenoughanimations = "WaI2x21x" devauth = "1.2.0" ktor = "2.3.0" -dbus_java = "4.2.1" neurepoparser = "1.4.0" hotswap_agent = "1.4.2-SNAPSHOT" mixinextras = "0.3.5" @@ -42,8 +41,6 @@ architectury = { module = "dev.architectury:architectury", version.ref = "archit rei_api = { module = "me.shedaniel:RoughlyEnoughItems-api", version.ref = "rei" } moulconfig = { module = "org.notenoughupdates.moulconfig:modern", version.ref = "moulconfig" } repoparser = { module = "moe.nea:neurepoparser", version.ref = "neurepoparser" } -dbus_java_core = { module = "com.github.hypfvieh:dbus-java-core", version.ref = "dbus_java" } -dbus_java_unixsocket = { module = "com.github.hypfvieh:dbus-java-transport-native-unixsocket", version.ref = "dbus_java" } mixinextras = { module = "io.github.llamalad7:mixinextras-fabric", version.ref = "mixinextras" } jarvis_api = { module = "moe.nea.jarvis:jarvis-api", version.ref = "jarvis" } jarvis_fabric = { module = "moe.nea.jarvis:jarvis-fabric", version.ref = "jarvis" } @@ -65,7 +62,6 @@ freecammod = { module = "maven.modrinth:freecam", version.ref = "freecammod" } femalegender = { module = "maven.modrinth:female-gender", version.ref = "femalegender" } [bundles] -dbus = ["dbus_java_core", "dbus_java_unixsocket"] runtime_required = [ "architectury_fabric", "rei_fabric", diff --git a/src/main/kotlin/moe/nea/firmament/Firmament.kt b/src/main/kotlin/moe/nea/firmament/Firmament.kt index 9a04db1..e2b904f 100644 --- a/src/main/kotlin/moe/nea/firmament/Firmament.kt +++ b/src/main/kotlin/moe/nea/firmament/Firmament.kt @@ -30,8 +30,6 @@ import net.fabricmc.loader.api.Version import net.fabricmc.loader.api.metadata.ModMetadata import org.apache.logging.log4j.LogManager import org.apache.logging.log4j.Logger -import org.freedesktop.dbus.connections.impl.DBusConnectionBuilder -import org.freedesktop.dbus.exceptions.DBusException import kotlinx.coroutines.CoroutineName import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Job @@ -43,7 +41,6 @@ import kotlin.coroutines.EmptyCoroutineContext import net.minecraft.command.CommandRegistryAccess import net.minecraft.util.Identifier import moe.nea.firmament.commands.registerFirmamentCommand -import moe.nea.firmament.dbus.FirmamentDbusObject import moe.nea.firmament.events.ClientStartedEvent import moe.nea.firmament.events.CommandEvent import moe.nea.firmament.events.ItemTooltipEvent @@ -97,12 +94,6 @@ object Firmament { } val globalJob = Job() - val dbusConnection = try { - DBusConnectionBuilder.forSessionBus() - .build() - } catch (e: Exception) { - null - } val coroutineScope = CoroutineScope(EmptyCoroutineContext + CoroutineName("Firmament")) + SupervisorJob(globalJob) @@ -121,12 +112,6 @@ object Firmament { @JvmStatic fun onClientInitialize() { - try { - dbusConnection?.exportObject(FirmamentDbusObject) - dbusConnection?.requestBusName("moe.nea.firmament") - } catch (e: DBusException) { - // :( - } var tick = 0 ClientTickEvents.END_CLIENT_TICK.register(ClientTickEvents.EndTick { instance -> TickEvent.publish(TickEvent(tick++)) diff --git a/src/main/kotlin/moe/nea/firmament/dbus/FirmamentDbusInterface.kt b/src/main/kotlin/moe/nea/firmament/dbus/FirmamentDbusInterface.kt deleted file mode 100644 index 9af968d..0000000 --- a/src/main/kotlin/moe/nea/firmament/dbus/FirmamentDbusInterface.kt +++ /dev/null @@ -1,17 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 Linnea Gräf <nea@nea.moe> - * - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -package moe.nea.firmament.dbus - -import org.freedesktop.dbus.annotations.DBusInterfaceName -import org.freedesktop.dbus.interfaces.DBusInterface - -@DBusInterfaceName("moe.nea.Firmament") -interface FirmamentDbusInterface : DBusInterface { - fun sayHello(): String - fun getCurrentRepoCommit(): String - fun requestRepoReDownload() -} diff --git a/src/main/kotlin/moe/nea/firmament/dbus/FirmamentDbusObject.kt b/src/main/kotlin/moe/nea/firmament/dbus/FirmamentDbusObject.kt deleted file mode 100644 index 4a7e008..0000000 --- a/src/main/kotlin/moe/nea/firmament/dbus/FirmamentDbusObject.kt +++ /dev/null @@ -1,27 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 Linnea Gräf <nea@nea.moe> - * - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -package moe.nea.firmament.dbus - -import moe.nea.firmament.repo.RepoManager - -object FirmamentDbusObject : FirmamentDbusInterface { - override fun sayHello(): String { - return "Hello from Firmanet" - } - - override fun getCurrentRepoCommit(): String { - return RepoManager.currentDownloadedSha ?: "none" - } - - override fun requestRepoReDownload() { - RepoManager.launchAsyncUpdate() - } - - override fun getObjectPath(): String { - return "/moe/nea/Firmament" - } -} |