From a684c0212d4fd3ef55c07def7bbbfe5dbd30d029 Mon Sep 17 00:00:00 2001 From: Graham Date: Sun, 12 Jan 2020 13:42:31 +0000 Subject: [PATCH] Load natives from new location below dev.openrs2 --- .../main/java/dev/openrs2/bundler/Resource.kt | 23 ++++++++++--------- pom.xml | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/bundler/src/main/java/dev/openrs2/bundler/Resource.kt b/bundler/src/main/java/dev/openrs2/bundler/Resource.kt index 8233178c62..3a8bde6c3d 100644 --- a/bundler/src/main/java/dev/openrs2/bundler/Resource.kt +++ b/bundler/src/main/java/dev/openrs2/bundler/Resource.kt @@ -50,47 +50,48 @@ class Resource( } private fun compress(source: String, destination: String, resource: String): Resource { - val uncompressed = Resource::class.java.getResourceAsStream(resource).use { it.readBytes() } + val path = "/dev/openrs2/natives/$resource" + val uncompressed = Resource::class.java.getResourceAsStream(path).use { it.readBytes() } return compress(source, destination, uncompressed) } fun compressGlResources() = listOf( // Windows i386 listOf( - compress("jaggl_0_0.lib", "jaggl.dll", "/natives/windows-i386/jaggl.dll") + compress("jaggl_0_0.lib", "jaggl.dll", "windows-i386/jaggl.dll") ), // Windows amd64 listOf( - compress("jaggl_1_0.lib", "jaggl.dll", "/natives/windows-amd64/jaggl.dll") + compress("jaggl_1_0.lib", "jaggl.dll", "windows-amd64/jaggl.dll") ), // macOS i386 listOf( - compress("jaggl_2_0.lib", "libjaggl.dylib", "/natives/mac-i386/libjaggl.dylib") + compress("jaggl_2_0.lib", "libjaggl.dylib", "mac-i386/libjaggl.dylib") ), // macOS amd64 listOf( - compress("jaggl_3_0.lib", "libjaggl.dylib", "/natives/mac-amd64/libjaggl.dylib") + compress("jaggl_3_0.lib", "libjaggl.dylib", "mac-amd64/libjaggl.dylib") ), // Linux i386 listOf( - compress("jaggl_4_0.lib", "libjaggl.so", "/natives/linux-i386/libjaggl.so"), - compress("jaggl_4_1.lib", "libjaggl_dri.so", "/natives/linux-i386/libjaggl_dri.so") + compress("jaggl_4_0.lib", "libjaggl.so", "linux-i386/libjaggl.so"), + compress("jaggl_4_1.lib", "libjaggl_dri.so", "linux-i386/libjaggl_dri.so") ), // Linux amd64 listOf( - compress("jaggl_5_0.lib", "libjaggl.so", "/natives/linux-amd64/libjaggl.so"), - compress("jaggl_5_1.lib", "libjaggl_dri.so", "/natives/linux-amd64/libjaggl_dri.so") + compress("jaggl_5_0.lib", "libjaggl.so", "linux-amd64/libjaggl.so"), + compress("jaggl_5_1.lib", "libjaggl_dri.so", "linux-amd64/libjaggl_dri.so") ) ) fun compressMiscResources() = listOf( - compress("jagmisc_0.lib", "jagmisc.dll", "/natives/windows-i386/jagmisc.dll"), - compress("jagmisc_1.lib", "jagmisc.dll", "/natives/windows-amd64/jagmisc.dll") + compress("jagmisc_0.lib", "jagmisc.dll", "windows-i386/jagmisc.dll"), + compress("jagmisc_1.lib", "jagmisc.dll", "windows-amd64/jagmisc.dll") ) } } diff --git a/pom.xml b/pom.xml index 712478231e..63f3ff007e 100644 --- a/pom.xml +++ b/pom.xml @@ -76,7 +76,7 @@ dev.openrs2 openrs2-natives-all - 1.0.0 + 2.0.0 dev.openrs2