kitgit

tirbofish/dropbear · diff

87b14a3 · tk

added more functions for mouse input detection :) i believe input state is dealt with, but controller support doesn't exist yet. ill do that later (not my biggest priority rn).

Unverified

diff --git a/build.gradle.kts b/build.gradle.kts
index 786e8fa..4757c1c 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -33,6 +33,7 @@ val libPathProvider = provider {
     )
 
     candidates.firstOrNull { it.exists() }?.absolutePath
+        ?: println("No Rust library exists")
 }
 
 kotlin {
@@ -50,33 +51,13 @@ kotlin {
     }
 
     val nativeLibPath = libPathProvider.get()
-    if (nativeLibPath != null) {
-        val nativeLibDir = file(nativeLibPath).parentFile.absolutePath
-        val nativeLibFileName = file(nativeLibPath).name
-        val nativeLibNameForLinking = when {
-            isMacOs -> nativeLibFileName.removePrefix("lib").removeSuffix(".dylib")
-            isLinux -> nativeLibFileName.removePrefix("lib").removeSuffix(".so")
-            isMingwX64 -> nativeLibFileName.removeSuffix(".dll")
-            else -> throw GradleException("Unsupported OS for library name derivation.")
-        }
-
-        nativeTarget.apply {
-            binaries {
-                sharedLib {
-                    baseName = "dropbear"
-
-                    if (isLinux || isMacOs) {
-                        linkerOpts("-L$nativeLibDir", "-l$nativeLibNameForLinking", "-Wl,-rpath,\\\$ORIGIN")
-                    } else if (isMingwX64) {
-                        val importLibName = "$nativeLibNameForLinking.lib"
-                        val importLibPath = file("$nativeLibDir/$importLibName").absolutePath
-                        linkerOpts(
-                            importLibPath
-                        )
-                    }
-                }
-            }
-        }
+    val nativeLibDir = file(nativeLibPath).parentFile.absolutePath
+    val nativeLibFileName = file(nativeLibPath).name
+    val nativeLibNameForLinking = when {
+        isMacOs -> nativeLibFileName.removePrefix("lib").removeSuffix(".dylib")
+        isLinux -> nativeLibFileName.removePrefix("lib").removeSuffix(".so")
+        isMingwX64 -> nativeLibFileName.removeSuffix(".dll")
+        else -> throw GradleException("Unsupported OS for library name derivation.")

Large diffs are not rendered by default. Showing the first 50 of 893 lines. Show full diff