Rename unpacker.jar to unpackclass.jar

This is more consistent with the original jar name (unpackclass.pack).

Signed-off-by: Graham <gpe@openrs2.dev>
bzip2
Graham 5 years ago
parent 962b494a86
commit 4ec4ef84c2
  1. 2
      decompiler/src/main/java/dev/openrs2/decompiler/DecompileCommand.kt
  2. 2
      deob-ast/src/main/java/dev/openrs2/deob/ast/DeobfuscateAstCommand.kt
  3. 18
      deob/src/main/java/dev/openrs2/deob/Deobfuscator.kt
  4. 2
      deob/src/main/java/dev/openrs2/deob/remap/TypedRemapper.kt
  5. 2
      settings.gradle.kts

@ -15,7 +15,7 @@ class DecompileCommand : CliktCommand(name = "decompile") {
deobOutput.resolve("loader_gl.jar"),
deobOutput.resolve("signlink_gl.jar"),
deobOutput.resolve("unpack_gl.jar"),
deobOutput.resolve("unpacker_gl.jar")
deobOutput.resolve("unpackclass_gl.jar")
)
Decompiler(sources, ::getDestination).use {
it.run()

@ -14,7 +14,7 @@ class DeobfuscateAstCommand : CliktCommand(name = "deob-ast") {
Paths.get("nonfree/loader/src/main/java"),
Paths.get("nonfree/signlink/src/main/java"),
Paths.get("nonfree/unpack/src/main/java"),
Paths.get("nonfree/unpacker/src/main/java")
Paths.get("nonfree/unpackclass/src/main/java")
)
)
deobfuscator.run()

@ -43,8 +43,8 @@ class Deobfuscator(private val input: Path, private val output: Path) {
fun run() {
// read input jars/packs
logger.info { "Reading input jars" }
val unpacker = readJar(input.resolve("unpackclass.pack"))
val glUnpacker = Library(unpacker)
val unpackClass = readJar(input.resolve("unpackclass.pack"))
val glUnpackClass = Library(unpackClass)
val loader = readJar(input.resolve("loader.jar"))
val glLoader = readJar(input.resolve("loader_gl.jar"))
val gl = readPack(input.resolve("jaggl.pack200"))
@ -76,23 +76,23 @@ class Deobfuscator(private val input: Path, private val output: Path) {
glUnpack.add(glLoader.remove("unpack")!!)
// prefix remaining loader/unpacker classes (to avoid conflicts when we rename in the same classpath as the client)
logger.info { "Prefixing loader and unpacker class names" }
logger.info { "Prefixing loader and unpackclass class names" }
loader.remap(create(loader, "loader_"))
glLoader.remap(create(glLoader, "loader_"))
unpacker.remap(create(unpacker, "unpacker_"))
glUnpacker.remap(create(glUnpacker, "unpacker_"))
unpackClass.remap(create(unpackClass, "unpackclass_"))
glUnpackClass.remap(create(glUnpackClass, "unpackclass_"))
// bundle libraries together into a common classpath
val runtime = ClassLoader.getPlatformClassLoader()
val classPath = ClassPath(
runtime,
dependencies = emptyList(),
libraries = listOf(client, loader, signLink, unpack, unpacker)
libraries = listOf(client, loader, signLink, unpack, unpackClass)
)
val glClassPath = ClassPath(
runtime,
dependencies = listOf(gl),
libraries = listOf(glClient, glLoader, glSignLink, glUnpack, glUnpacker)
libraries = listOf(glClient, glLoader, glSignLink, glUnpack, glUnpackClass)
)
val unsignedClassPath = ClassPath(
runtime,
@ -128,14 +128,14 @@ class Deobfuscator(private val input: Path, private val output: Path) {
loader.writeJar(classPath, output.resolve("loader.jar"))
signLink.writeJar(classPath, output.resolve("signlink.jar"))
unpack.writeJar(classPath, output.resolve("unpack.jar"))
unpacker.writeJar(classPath, output.resolve("unpacker.jar"))
unpackClass.writeJar(classPath, output.resolve("unpackclass.jar"))
gl.writeJar(glClassPath, output.resolve("jaggl.jar"))
glClient.writeJar(glClassPath, output.resolve("runescape_gl.jar"))
glLoader.writeJar(glClassPath, output.resolve("loader_gl.jar"))
glSignLink.writeJar(glClassPath, output.resolve("signlink_gl.jar"))
glUnpack.writeJar(glClassPath, output.resolve("unpack_gl.jar"))
glUnpacker.writeJar(glClassPath, output.resolve("unpacker_gl.jar"))
glUnpackClass.writeJar(glClassPath, output.resolve("unpackclass_gl.jar"))
unsignedClient.writeJar(unsignedClassPath, output.resolve("runescape_unsigned.jar"))
}

@ -79,7 +79,7 @@ class TypedRemapper private constructor(
}
private fun verifyMapping(name: String, mappedName: String) {
val originalName = name.replace("^(?:loader|unpacker)_".toRegex(), "")
val originalName = name.replace("^(?:loader|unpackclass)_".toRegex(), "")
if (originalName.length > MAX_OBFUSCATED_NAME_LEN && originalName != mappedName) {
logger.warn { "Remapping probably unobfuscated name $originalName to $mappedName" }
}

@ -27,6 +27,6 @@ if (Files.exists(rootProject.projectDir.toPath().resolve("nonfree/build.gradle.k
"nonfree:loader",
"nonfree:signlink",
"nonfree:unpack",
"nonfree:unpacker"
"nonfree:unpackclass"
)
}

Loading…
Cancel
Save