Switch to vendored implementation of Pack200

This fixes the main blocker for upgrading to the latest version of Java.

Signed-off-by: Graham <gpe@openrs2.org>
master
Graham 3 weeks ago
parent 67908be56e
commit 9cd2c25601
  1. 1
      archive/build.gradle.kts
  2. 2
      archive/src/main/kotlin/org/openrs2/archive/client/ClientImporter.kt
  3. 1
      asm/build.gradle.kts
  4. 2
      asm/src/main/kotlin/org/openrs2/asm/io/Pack200LibraryReader.kt
  5. 2
      asm/src/main/kotlin/org/openrs2/asm/io/Pack200LibraryWriter.kt
  6. 1
      compress-cli/build.gradle.kts
  7. 2
      compress-cli/src/main/kotlin/org/openrs2/compress/cli/pack200/Pack200Command.kt
  8. 2
      compress-cli/src/main/kotlin/org/openrs2/compress/cli/pack200/Unpack200Command.kt
  9. 1
      gradle/libs.versions.toml

@ -42,6 +42,7 @@ dependencies {
implementation(libs.jsoup)
implementation(libs.kotlin.coroutines.core)
implementation(libs.netty.handler)
implementation(libs.pack200)
implementation(libs.pecoff4j)
implementation(libs.postgres)
}

@ -17,6 +17,7 @@ import jakarta.inject.Inject
import jakarta.inject.Singleton
import net.fornwall.jelf.ElfFile
import net.fornwall.jelf.ElfSymbol
import org.glavo.pack200.Pack200
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.AbstractInsnNode
import org.objectweb.asm.tree.ClassNode
@ -55,7 +56,6 @@ import java.time.Month
import java.time.ZoneOffset
import java.util.jar.JarInputStream
import java.util.jar.JarOutputStream
import java.util.jar.Pack200
import kotlin.io.path.getLastModifiedTime
@Singleton

@ -15,6 +15,7 @@ dependencies {
implementation(projects.compress)
implementation(projects.crypto)
implementation(libs.cabParser)
implementation(libs.pack200)
}
publishing {

@ -1,12 +1,12 @@
package org.openrs2.asm.io
import org.glavo.pack200.Pack200
import org.objectweb.asm.tree.ClassNode
import org.openrs2.compress.gzip.Gzip
import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
import java.io.InputStream
import java.util.jar.JarOutputStream
import java.util.jar.Pack200
public object Pack200LibraryReader : LibraryReader {
override fun read(input: InputStream): Iterable<ClassNode> {

@ -1,5 +1,6 @@
package org.openrs2.asm.io
import org.glavo.pack200.Pack200
import org.objectweb.asm.tree.ClassNode
import org.openrs2.asm.classpath.ClassPath
import org.openrs2.compress.gzip.Gzip
@ -7,7 +8,6 @@ import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
import java.io.OutputStream
import java.util.jar.JarInputStream
import java.util.jar.Pack200
public object Pack200LibraryWriter : LibraryWriter {
override fun write(output: OutputStream, classPath: ClassPath, classes: Iterable<ClassNode>) {

@ -15,6 +15,7 @@ dependencies {
implementation(projects.compress)
implementation(projects.log)
implementation(projects.util)
implementation(libs.pack200)
}
publishing {

@ -6,9 +6,9 @@ import com.github.ajalt.clikt.parameters.types.defaultStdin
import com.github.ajalt.clikt.parameters.types.defaultStdout
import com.github.ajalt.clikt.parameters.types.inputStream
import com.github.ajalt.clikt.parameters.types.outputStream
import org.glavo.pack200.Pack200
import org.openrs2.compress.gzip.Gzip
import java.util.jar.JarInputStream
import java.util.jar.Pack200
public class Pack200Command : CliktCommand(name = "pack200") {
private val input by option().inputStream().defaultStdin()

@ -6,9 +6,9 @@ import com.github.ajalt.clikt.parameters.types.defaultStdin
import com.github.ajalt.clikt.parameters.types.defaultStdout
import com.github.ajalt.clikt.parameters.types.inputStream
import com.github.ajalt.clikt.parameters.types.outputStream
import org.glavo.pack200.Pack200
import org.openrs2.compress.gzip.Gzip
import java.util.jar.JarOutputStream
import java.util.jar.Pack200
public class Unpack200Command : CliktCommand(name = "unpack200") {
private val input by option().inputStream().defaultStdin()

@ -76,6 +76,7 @@ netty-codec-http = { module = "io.netty:netty-codec-http", version.ref = "netty"
netty-handler = { module = "io.netty:netty-handler", version.ref = "netty" }
netty-transport = { module = "io.netty:netty-transport", version.ref = "netty" }
openrs2-natives = { module = "org.openrs2:openrs2-natives-all", version = "3.2.0" }
pack200 = { module = "org.glavo:pack200", version = "0.3.0" }
pecoff4j = { module = "com.kichik.pecoff4j:pecoff4j", version = "0.4.1" }
postgres = { module = "org.postgresql:postgresql", version = "42.7.4" }
result-core = { module = "com.michael-bull.kotlin-result:kotlin-result", version = "2.0.0" }

Loading…
Cancel
Save