Rename overloaded compress method to compressNative

bzip2
Graham 5 years ago
parent 3a4085c680
commit d03d1c3bb5
  1. 22
      bundler/src/main/java/dev/openrs2/bundler/Resource.kt

@ -83,7 +83,7 @@ class Resource(
}
}
private fun compress(source: String, destination: String, resource: String): Resource {
private fun compressNative(source: String, destination: String, resource: String): Resource {
val path = "/dev/openrs2/natives/$resource"
val uncompressed = Resource::class.java.getResourceAsStream(path).use { it.readBytes() }
return compress(source, destination, uncompressed)
@ -92,40 +92,40 @@ class Resource(
fun compressGlResources() = listOf(
// Windows i386
listOf(
compress("jaggl_0_0.lib", "jaggl.dll", "windows-i386/jaggl.dll")
compressNative("jaggl_0_0.lib", "jaggl.dll", "windows-i386/jaggl.dll")
),
// Windows amd64
listOf(
compress("jaggl_1_0.lib", "jaggl.dll", "windows-amd64/jaggl.dll")
compressNative("jaggl_1_0.lib", "jaggl.dll", "windows-amd64/jaggl.dll")
),
// macOS i386
listOf(
compress("jaggl_2_0.lib", "libjaggl.dylib", "mac-i386/libjaggl.dylib")
compressNative("jaggl_2_0.lib", "libjaggl.dylib", "mac-i386/libjaggl.dylib")
),
// macOS amd64
listOf(
compress("jaggl_3_0.lib", "libjaggl.dylib", "mac-amd64/libjaggl.dylib")
compressNative("jaggl_3_0.lib", "libjaggl.dylib", "mac-amd64/libjaggl.dylib")
),
// Linux i386
listOf(
compress("jaggl_4_0.lib", "libjaggl.so", "linux-i386/libjaggl.so"),
compress("jaggl_4_1.lib", "libjaggl_dri.so", "linux-i386/libjaggl_dri.so")
compressNative("jaggl_4_0.lib", "libjaggl.so", "linux-i386/libjaggl.so"),
compressNative("jaggl_4_1.lib", "libjaggl_dri.so", "linux-i386/libjaggl_dri.so")
),
// Linux amd64
listOf(
compress("jaggl_5_0.lib", "libjaggl.so", "linux-amd64/libjaggl.so"),
compress("jaggl_5_1.lib", "libjaggl_dri.so", "linux-amd64/libjaggl_dri.so")
compressNative("jaggl_5_0.lib", "libjaggl.so", "linux-amd64/libjaggl.so"),
compressNative("jaggl_5_1.lib", "libjaggl_dri.so", "linux-amd64/libjaggl_dri.so")
)
)
fun compressMiscResources() = listOf(
compress("jagmisc_0.lib", "jagmisc.dll", "windows-i386/jagmisc.dll"),
compress("jagmisc_1.lib", "jagmisc.dll", "windows-amd64/jagmisc.dll")
compressNative("jagmisc_0.lib", "jagmisc.dll", "windows-i386/jagmisc.dll"),
compressNative("jagmisc_1.lib", "jagmisc.dll", "windows-amd64/jagmisc.dll")
)
}
}

Loading…
Cancel
Save