|
|
@ -6,6 +6,32 @@ import java.io.Closeable |
|
|
|
import java.nio.file.Path |
|
|
|
import java.nio.file.Path |
|
|
|
import java.nio.file.Paths |
|
|
|
import java.nio.file.Paths |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private fun getDestination(archive: String): Path { |
|
|
|
|
|
|
|
var dir = archive.replace(Regex("(?:_gl)?[.]jar$"), "") |
|
|
|
|
|
|
|
when (dir) { |
|
|
|
|
|
|
|
"runescape" -> dir = "client" |
|
|
|
|
|
|
|
"jaggl" -> dir = "gl" |
|
|
|
|
|
|
|
"jaggl_dri" -> dir = "gl-dri" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return Paths.get("nonfree").resolve(dir).resolve("src/main/java") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fun main() { |
|
|
|
|
|
|
|
val deobOutput = Paths.get("nonfree/code/deob") |
|
|
|
|
|
|
|
val sources = listOf( |
|
|
|
|
|
|
|
deobOutput.resolve("runescape_gl.jar"), |
|
|
|
|
|
|
|
deobOutput.resolve("jaggl.jar"), |
|
|
|
|
|
|
|
deobOutput.resolve("jaggl_dri.jar"), |
|
|
|
|
|
|
|
deobOutput.resolve("loader_gl.jar"), |
|
|
|
|
|
|
|
deobOutput.resolve("signlink_gl.jar"), |
|
|
|
|
|
|
|
deobOutput.resolve("unpack_gl.jar"), |
|
|
|
|
|
|
|
deobOutput.resolve("unpacker_gl.jar") |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
Decompiler(sources, ::getDestination).use { |
|
|
|
|
|
|
|
it.run() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
class Decompiler( |
|
|
|
class Decompiler( |
|
|
|
private val sources: List<Path>, |
|
|
|
private val sources: List<Path>, |
|
|
|
destination: (String) -> Path |
|
|
|
destination: (String) -> Path |
|
|
@ -30,32 +56,5 @@ class Decompiler( |
|
|
|
IFernflowerPreferences.INDENT_STRING to "\t", |
|
|
|
IFernflowerPreferences.INDENT_STRING to "\t", |
|
|
|
IFernflowerPreferences.SYNTHETIC_NOT_SET to "1" |
|
|
|
IFernflowerPreferences.SYNTHETIC_NOT_SET to "1" |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
private fun getDestination(archive: String): Path { |
|
|
|
|
|
|
|
var dir = archive.replace(Regex("(?:_gl)?[.]jar$"), "") |
|
|
|
|
|
|
|
when (dir) { |
|
|
|
|
|
|
|
"runescape" -> dir = "client" |
|
|
|
|
|
|
|
"jaggl" -> dir = "gl" |
|
|
|
|
|
|
|
"jaggl_dri" -> dir = "gl-dri" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return Paths.get("nonfree").resolve(dir).resolve("src/main/java") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@JvmStatic |
|
|
|
|
|
|
|
fun main(args: Array<String>) { |
|
|
|
|
|
|
|
val deobOutput = Paths.get("nonfree/code/deob") |
|
|
|
|
|
|
|
val sources = listOf( |
|
|
|
|
|
|
|
deobOutput.resolve("runescape_gl.jar"), |
|
|
|
|
|
|
|
deobOutput.resolve("jaggl.jar"), |
|
|
|
|
|
|
|
deobOutput.resolve("jaggl_dri.jar"), |
|
|
|
|
|
|
|
deobOutput.resolve("loader_gl.jar"), |
|
|
|
|
|
|
|
deobOutput.resolve("signlink_gl.jar"), |
|
|
|
|
|
|
|
deobOutput.resolve("unpack_gl.jar"), |
|
|
|
|
|
|
|
deobOutput.resolve("unpacker_gl.jar") |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
Decompiler(sources, this::getDestination).use { |
|
|
|
|
|
|
|
it.run() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|