Rename dev.openrs2 package to org.openrs2

Signed-off-by: Graham <gpe@openrs2.org>
Graham 4 years ago
parent 6cda83b4bc
commit ce5b76ef0f
  1. 4
      .idea/runConfigurations/AstDeobfuscator.xml
  2. 4
      .idea/runConfigurations/Bundler.xml
  3. 4
      .idea/runConfigurations/Decompiler.xml
  4. 4
      .idea/runConfigurations/Deobfuscator.xml
  5. 4
      .idea/runConfigurations/GameServer.xml
  6. 4
      .idea/runConfigurations/org_openrs2.xml
  7. 2
      all/build.gradle.kts
  8. 18
      all/src/main/java/org/openrs2/Command.kt
  9. 2
      archive/build.gradle.kts
  10. 8
      archive/src/main/java/org/openrs2/archive/ArchiveCommand.kt
  11. 8
      archive/src/main/java/org/openrs2/archive/ArchiveModule.kt
  12. 8
      archive/src/main/java/org/openrs2/archive/DatabaseProvider.kt
  13. 2
      archive/src/main/java/org/openrs2/archive/cache/CacheCommand.kt
  14. 8
      archive/src/main/java/org/openrs2/archive/cache/CacheExporter.kt
  15. 22
      archive/src/main/java/org/openrs2/archive/cache/CacheImporter.kt
  16. 6
      archive/src/main/java/org/openrs2/archive/cache/ExportCommand.kt
  17. 6
      archive/src/main/java/org/openrs2/archive/cache/ImportCommand.kt
  18. 4
      archive/src/main/java/org/openrs2/archive/key/BruteForceCommand.kt
  19. 4
      archive/src/main/java/org/openrs2/archive/key/HexKeyReader.kt
  20. 4
      archive/src/main/java/org/openrs2/archive/key/ImportCommand.kt
  21. 6
      archive/src/main/java/org/openrs2/archive/key/JsonKeyReader.kt
  22. 10
      archive/src/main/java/org/openrs2/archive/key/KeyBruteForcer.kt
  23. 2
      archive/src/main/java/org/openrs2/archive/key/KeyCommand.kt
  24. 6
      archive/src/main/java/org/openrs2/archive/key/KeyImporter.kt
  25. 4
      archive/src/main/java/org/openrs2/archive/key/KeyReader.kt
  26. 4
      archive/src/main/java/org/openrs2/archive/key/TextKeyReader.kt
  27. 4
      archive/src/main/java/org/openrs2/archive/name/GenerateCommand.kt
  28. 4
      archive/src/main/java/org/openrs2/archive/name/ImportCommand.kt
  29. 2
      archive/src/main/java/org/openrs2/archive/name/NameCommand.kt
  30. 6
      archive/src/main/java/org/openrs2/archive/name/NameImporter.kt
  31. 2
      asm/src/main/java/org/openrs2/asm/AsmJacksonModule.kt
  32. 2
      asm/src/main/java/org/openrs2/asm/AsmModule.kt
  33. 2
      asm/src/main/java/org/openrs2/asm/ClassForNameUtils.kt
  34. 2
      asm/src/main/java/org/openrs2/asm/ClassNameExtensions.kt
  35. 4
      asm/src/main/java/org/openrs2/asm/ClassNodeRemapper.kt
  36. 2
      asm/src/main/java/org/openrs2/asm/ClassVersionUtils.kt
  37. 2
      asm/src/main/java/org/openrs2/asm/InsnListUtils.kt
  38. 2
      asm/src/main/java/org/openrs2/asm/InsnMatcher.kt
  39. 2
      asm/src/main/java/org/openrs2/asm/InsnNodeUtils.kt
  40. 2
      asm/src/main/java/org/openrs2/asm/MemberDesc.kt
  41. 2
      asm/src/main/java/org/openrs2/asm/MemberRef.kt
  42. 2
      asm/src/main/java/org/openrs2/asm/MemberRefDeserializer.kt
  43. 2
      asm/src/main/java/org/openrs2/asm/MemberRefKeyDeserializer.kt
  44. 2
      asm/src/main/java/org/openrs2/asm/MethodNodeUtils.kt
  45. 2
      asm/src/main/java/org/openrs2/asm/NopClassVisitor.kt
  46. 2
      asm/src/main/java/org/openrs2/asm/StackMetadata.kt
  47. 4
      asm/src/main/java/org/openrs2/asm/classpath/AsmClassMetadata.kt
  48. 4
      asm/src/main/java/org/openrs2/asm/classpath/ClassMetadata.kt
  49. 12
      asm/src/main/java/org/openrs2/asm/classpath/ClassPath.kt
  50. 2
      asm/src/main/java/org/openrs2/asm/classpath/ExtendedRemapper.kt
  51. 2
      asm/src/main/java/org/openrs2/asm/classpath/JsrInliner.kt
  52. 8
      asm/src/main/java/org/openrs2/asm/classpath/Library.kt
  53. 10
      asm/src/main/java/org/openrs2/asm/classpath/LibraryRemapper.kt
  54. 6
      asm/src/main/java/org/openrs2/asm/classpath/ReflectionClassMetadata.kt
  55. 2
      asm/src/main/java/org/openrs2/asm/classpath/StackFrameClassWriter.kt
  56. 2
      asm/src/main/java/org/openrs2/asm/filter/AnyClassFilter.kt
  57. 2
      asm/src/main/java/org/openrs2/asm/filter/AnyMemberFilter.kt
  58. 2
      asm/src/main/java/org/openrs2/asm/filter/ClassFilter.kt
  59. 2
      asm/src/main/java/org/openrs2/asm/filter/Glob.kt
  60. 2
      asm/src/main/java/org/openrs2/asm/filter/GlobClassFilter.kt
  61. 4
      asm/src/main/java/org/openrs2/asm/filter/GlobMemberFilter.kt
  62. 4
      asm/src/main/java/org/openrs2/asm/filter/MemberFilter.kt
  63. 2
      asm/src/main/java/org/openrs2/asm/filter/UnionClassFilter.kt
  64. 2
      asm/src/main/java/org/openrs2/asm/filter/UnionMemberFilter.kt
  65. 10
      asm/src/main/java/org/openrs2/asm/io/AbstractJarLibraryWriter.kt
  66. 6
      asm/src/main/java/org/openrs2/asm/io/JarLibraryReader.kt
  67. 4
      asm/src/main/java/org/openrs2/asm/io/JarLibraryWriter.kt
  68. 2
      asm/src/main/java/org/openrs2/asm/io/LibraryReader.kt
  69. 4
      asm/src/main/java/org/openrs2/asm/io/LibraryWriter.kt
  70. 4
      asm/src/main/java/org/openrs2/asm/io/ManifestJarLibraryWriter.kt
  71. 4
      asm/src/main/java/org/openrs2/asm/io/Pack200LibraryReader.kt
  72. 6
      asm/src/main/java/org/openrs2/asm/io/Pack200LibraryWriter.kt
  73. 2
      asm/src/main/java/org/openrs2/asm/io/PackClassLibraryReader.kt
  74. 4
      asm/src/main/java/org/openrs2/asm/io/PackClassLibraryWriter.kt
  75. 12
      asm/src/main/java/org/openrs2/asm/io/SignedJarLibraryWriter.kt
  76. 8
      asm/src/main/java/org/openrs2/asm/transform/Transformer.kt
  77. 2
      buffer/src/main/java/org/openrs2/buffer/BufferModule.kt
  78. 2
      buffer/src/main/java/org/openrs2/buffer/ByteBufExtensions.kt
  79. 2
      buffer/src/main/java/org/openrs2/buffer/ReferenceCountedExtensions.kt
  80. 2
      buffer/src/test/java/org/openrs2/buffer/ByteBufExtensionsTest.kt
  81. 4
      buildSrc/src/main/java/Versions.kt
  82. 4
      bundler/build.gradle.kts
  83. 2
      bundler/src/main/java/org/openrs2/bundler/BundleCommand.kt
  84. 28
      bundler/src/main/java/org/openrs2/bundler/Bundler.kt
  85. 34
      bundler/src/main/java/org/openrs2/bundler/BundlerModule.kt
  86. 2
      bundler/src/main/java/org/openrs2/bundler/BundlerQualifier.kt
  87. 10
      bundler/src/main/java/org/openrs2/bundler/Resource.kt
  88. 16
      bundler/src/main/java/org/openrs2/bundler/transform/BufferSizeTransformer.kt
  89. 10
      bundler/src/main/java/org/openrs2/bundler/transform/CachePathTransformer.kt
  90. 10
      bundler/src/main/java/org/openrs2/bundler/transform/DomainTransformer.kt
  91. 36
      bundler/src/main/java/org/openrs2/bundler/transform/HighDpiTransformer.kt
  92. 10
      bundler/src/main/java/org/openrs2/bundler/transform/HostCheckTransformer.kt
  93. 10
      bundler/src/main/java/org/openrs2/bundler/transform/LoadLibraryTransformer.kt
  94. 10
      bundler/src/main/java/org/openrs2/bundler/transform/MacResizeTransformer.kt
  95. 12
      bundler/src/main/java/org/openrs2/bundler/transform/MemoryAllocationTransformer.kt
  96. 10
      bundler/src/main/java/org/openrs2/bundler/transform/NameTransformer.kt
  97. 16
      bundler/src/main/java/org/openrs2/bundler/transform/PlatformDetectionTransformer.kt
  98. 8
      bundler/src/main/java/org/openrs2/bundler/transform/PublicKeyTransformer.kt
  99. 14
      bundler/src/main/java/org/openrs2/bundler/transform/ResourceTransformer.kt
  100. 8
      bundler/src/main/java/org/openrs2/bundler/transform/RightClickTransformer.kt
  101. Some files were not shown because too many files have changed in this diff Show More

@ -1,12 +1,12 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="AstDeobfuscator" type="JetRunConfigurationType" factoryName="Kotlin">
<configuration default="false" name="AstDeobfuscator" type="JetRunConfigurationType">
<module name="openrs2.deob-ast.main" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="MAIN_CLASS_NAME" value="dev.openrs2.deob.ast.DeobfuscateAstCommandKt" />
<option name="MAIN_CLASS_NAME" value="org.openrs2.deob.ast.DeobfuscateAstCommandKt" />
<option name="WORKING_DIRECTORY" value="" />
<method v="2">
<option name="Make" enabled="true" />

@ -1,12 +1,12 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Bundler" type="JetRunConfigurationType" factoryName="Kotlin">
<configuration default="false" name="Bundler" type="JetRunConfigurationType">
<module name="openrs2.bundler.main" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="MAIN_CLASS_NAME" value="dev.openrs2.bundler.BundleCommandKt" />
<option name="MAIN_CLASS_NAME" value="org.openrs2.bundler.BundleCommandKt" />
<option name="WORKING_DIRECTORY" value="" />
<method v="2">
<option name="Make" enabled="true" />

@ -1,12 +1,12 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Decompiler" type="JetRunConfigurationType" factoryName="Kotlin">
<configuration default="false" name="Decompiler" type="JetRunConfigurationType">
<module name="openrs2.decompiler.main" />
<option name="VM_PARAMETERS" value="-Xmx3G" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="MAIN_CLASS_NAME" value="dev.openrs2.decompiler.DecompileCommandKt" />
<option name="MAIN_CLASS_NAME" value="org.openrs2.decompiler.DecompileCommandKt" />
<option name="WORKING_DIRECTORY" value="" />
<method v="2">
<option name="Make" enabled="true" />

@ -1,12 +1,12 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Deobfuscator" type="JetRunConfigurationType" factoryName="Kotlin">
<configuration default="false" name="Deobfuscator" type="JetRunConfigurationType">
<module name="openrs2.deob.main" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="MAIN_CLASS_NAME" value="dev.openrs2.deob.DeobfuscateCommandKt" />
<option name="MAIN_CLASS_NAME" value="org.openrs2.deob.DeobfuscateCommandKt" />
<option name="WORKING_DIRECTORY" value="" />
<method v="2">
<option name="Make" enabled="true" />

@ -1,12 +1,12 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="GameServer" type="JetRunConfigurationType" factoryName="Kotlin">
<configuration default="false" name="GameServer" type="JetRunConfigurationType">
<module name="openrs2.game.main" />
<option name="VM_PARAMETERS" value="-Dio.netty.leakDetection.level=PARANOID" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="MAIN_CLASS_NAME" value="dev.openrs2.game.GameCommandKt" />
<option name="MAIN_CLASS_NAME" value="org.openrs2.game.GameCommandKt" />
<option name="WORKING_DIRECTORY" value="" />
<method v="2">
<option name="Make" enabled="true" />

@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="dev.openrs2" type="JUnit" factoryName="JUnit">
<configuration default="false" name="org.openrs2" type="JUnit" factoryName="JUnit">
<useClassPathOnly />
<extension name="coverage">
<pattern>
@ -7,7 +7,7 @@
<option name="ENABLED" value="true" />
</pattern>
</extension>
<option name="PACKAGE_NAME" value="dev.openrs2" />
<option name="PACKAGE_NAME" value="org.openrs2" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />

@ -11,7 +11,7 @@ plugins {
application {
applicationName = "openrs2"
mainClassName = "dev.openrs2.CommandKt"
mainClassName = "org.openrs2.CommandKt"
}
dependencies {

@ -1,15 +1,15 @@
package dev.openrs2
package org.openrs2
import com.github.ajalt.clikt.core.NoOpCliktCommand
import com.github.ajalt.clikt.core.subcommands
import dev.openrs2.archive.ArchiveCommand
import dev.openrs2.bundler.BundleCommand
import dev.openrs2.compress.cli.CompressCommand
import dev.openrs2.crc32.Crc32Command
import dev.openrs2.decompiler.DecompileCommand
import dev.openrs2.deob.DeobfuscateCommand
import dev.openrs2.deob.ast.DeobfuscateAstCommand
import dev.openrs2.game.GameCommand
import org.openrs2.archive.ArchiveCommand
import org.openrs2.bundler.BundleCommand
import org.openrs2.compress.cli.CompressCommand
import org.openrs2.crc32.Crc32Command
import org.openrs2.decompiler.DecompileCommand
import org.openrs2.deob.DeobfuscateCommand
import org.openrs2.deob.ast.DeobfuscateAstCommand
import org.openrs2.game.GameCommand
public fun main(args: Array<String>): Unit = Command().main(args)

@ -5,7 +5,7 @@ plugins {
}
application {
mainClassName = "dev.openrs2.archive.ArchiveCommandKt"
mainClassName = "org.openrs2.archive.ArchiveCommandKt"
}
dependencies {

@ -1,10 +1,10 @@
package dev.openrs2.archive
package org.openrs2.archive
import com.github.ajalt.clikt.core.NoOpCliktCommand
import com.github.ajalt.clikt.core.subcommands
import dev.openrs2.archive.cache.CacheCommand
import dev.openrs2.archive.key.KeyCommand
import dev.openrs2.archive.name.NameCommand
import org.openrs2.archive.cache.CacheCommand
import org.openrs2.archive.key.KeyCommand
import org.openrs2.archive.name.NameCommand
public fun main(args: Array<String>): Unit = ArchiveCommand().main(args)

@ -1,10 +1,10 @@
package dev.openrs2.archive
package org.openrs2.archive
import com.google.inject.AbstractModule
import com.google.inject.Scopes
import dev.openrs2.buffer.BufferModule
import dev.openrs2.db.Database
import dev.openrs2.json.JsonModule
import org.openrs2.buffer.BufferModule
import org.openrs2.db.Database
import org.openrs2.json.JsonModule
public object ArchiveModule : AbstractModule() {
override fun configure() {

@ -1,8 +1,8 @@
package dev.openrs2.archive
package org.openrs2.archive
import dev.openrs2.db.Database
import dev.openrs2.db.PostgresDeadlockDetector
import org.flywaydb.core.Flyway
import org.openrs2.db.Database
import org.openrs2.db.PostgresDeadlockDetector
import org.postgresql.ds.PGSimpleDataSource
import javax.inject.Provider
@ -14,7 +14,7 @@ public class DatabaseProvider : Provider<Database> {
Flyway.configure()
.dataSource(dataSource)
.locations("classpath:/dev/openrs2/archive")
.locations("classpath:/org/openrs2/archive")
.load()
.migrate()

@ -1,4 +1,4 @@
package dev.openrs2.archive.cache
package org.openrs2.archive.cache
import com.github.ajalt.clikt.core.NoOpCliktCommand
import com.github.ajalt.clikt.core.subcommands

@ -1,10 +1,10 @@
package dev.openrs2.archive.cache
package org.openrs2.archive.cache
import dev.openrs2.buffer.use
import dev.openrs2.cache.Store
import dev.openrs2.db.Database
import io.netty.buffer.ByteBufAllocator
import io.netty.buffer.Unpooled
import org.openrs2.buffer.use
import org.openrs2.cache.Store
import org.openrs2.db.Database
import javax.inject.Inject
import javax.inject.Singleton

@ -1,18 +1,18 @@
package dev.openrs2.archive.cache
import dev.openrs2.buffer.crc32
import dev.openrs2.buffer.use
import dev.openrs2.cache.Js5Archive
import dev.openrs2.cache.Js5Compression
import dev.openrs2.cache.Js5Index
import dev.openrs2.cache.Store
import dev.openrs2.cache.VersionTrailer
import dev.openrs2.crypto.Whirlpool
import dev.openrs2.db.Database
package org.openrs2.archive.cache
import io.netty.buffer.ByteBuf
import io.netty.buffer.ByteBufAllocator
import io.netty.buffer.ByteBufUtil
import io.netty.buffer.DefaultByteBufHolder
import org.openrs2.buffer.crc32
import org.openrs2.buffer.use
import org.openrs2.cache.Js5Archive
import org.openrs2.cache.Js5Compression
import org.openrs2.cache.Js5Index
import org.openrs2.cache.Store
import org.openrs2.cache.VersionTrailer
import org.openrs2.crypto.Whirlpool
import org.openrs2.db.Database
import java.io.IOException
import java.sql.Connection
import java.sql.Types

@ -1,13 +1,13 @@
package dev.openrs2.archive.cache
package org.openrs2.archive.cache
import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.parameters.arguments.argument
import com.github.ajalt.clikt.parameters.types.long
import com.github.ajalt.clikt.parameters.types.path
import com.google.inject.Guice
import dev.openrs2.archive.ArchiveModule
import dev.openrs2.cache.DiskStore
import kotlinx.coroutines.runBlocking
import org.openrs2.archive.ArchiveModule
import org.openrs2.cache.DiskStore
public class ExportCommand : CliktCommand(name = "export") {
private val id by argument().long()

@ -1,12 +1,12 @@
package dev.openrs2.archive.cache
package org.openrs2.archive.cache
import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.parameters.arguments.argument
import com.github.ajalt.clikt.parameters.types.path
import com.google.inject.Guice
import dev.openrs2.archive.ArchiveModule
import dev.openrs2.cache.Store
import kotlinx.coroutines.runBlocking
import org.openrs2.archive.ArchiveModule
import org.openrs2.cache.Store
public class ImportCommand : CliktCommand(name = "import") {
private val input by argument().path(

@ -1,9 +1,9 @@
package dev.openrs2.archive.key
package org.openrs2.archive.key
import com.github.ajalt.clikt.core.CliktCommand
import com.google.inject.Guice
import dev.openrs2.archive.ArchiveModule
import kotlinx.coroutines.runBlocking
import org.openrs2.archive.ArchiveModule
public class BruteForceCommand : CliktCommand(name = "brute-force") {
override fun run(): Unit = runBlocking {

@ -1,6 +1,6 @@
package dev.openrs2.archive.key
package org.openrs2.archive.key
import dev.openrs2.crypto.XteaKey
import org.openrs2.crypto.XteaKey
import java.io.InputStream
public object HexKeyReader : KeyReader {

@ -1,11 +1,11 @@
package dev.openrs2.archive.key
package org.openrs2.archive.key
import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.parameters.arguments.argument
import com.github.ajalt.clikt.parameters.types.path
import com.google.inject.Guice
import dev.openrs2.archive.ArchiveModule
import kotlinx.coroutines.runBlocking
import org.openrs2.archive.ArchiveModule
public class ImportCommand : CliktCommand(name = "import") {
private val input by argument().path(

@ -1,8 +1,8 @@
package dev.openrs2.archive.key
package org.openrs2.archive.key
import com.fasterxml.jackson.databind.ObjectMapper
import dev.openrs2.crypto.XteaKey
import dev.openrs2.json.Json
import org.openrs2.crypto.XteaKey
import org.openrs2.json.Json
import java.io.InputStream
import javax.inject.Inject
import javax.inject.Singleton

@ -1,10 +1,10 @@
package dev.openrs2.archive.key
package org.openrs2.archive.key
import dev.openrs2.buffer.use
import dev.openrs2.cache.Js5Compression
import dev.openrs2.crypto.XteaKey
import dev.openrs2.db.Database
import io.netty.buffer.Unpooled
import org.openrs2.buffer.use
import org.openrs2.cache.Js5Compression
import org.openrs2.crypto.XteaKey
import org.openrs2.db.Database
import java.sql.Connection
import java.sql.Types
import javax.inject.Inject

@ -1,4 +1,4 @@
package dev.openrs2.archive.key
package org.openrs2.archive.key
import com.github.ajalt.clikt.core.NoOpCliktCommand
import com.github.ajalt.clikt.core.subcommands

@ -1,7 +1,7 @@
package dev.openrs2.archive.key
package org.openrs2.archive.key
import dev.openrs2.crypto.XteaKey
import dev.openrs2.db.Database
import org.openrs2.crypto.XteaKey
import org.openrs2.db.Database
import java.nio.file.Files
import java.nio.file.Path
import javax.inject.Inject

@ -1,6 +1,6 @@
package dev.openrs2.archive.key
package org.openrs2.archive.key
import dev.openrs2.crypto.XteaKey
import org.openrs2.crypto.XteaKey
import java.io.InputStream
public interface KeyReader {

@ -1,6 +1,6 @@
package dev.openrs2.archive.key
package org.openrs2.archive.key
import dev.openrs2.crypto.XteaKey
import org.openrs2.crypto.XteaKey
import java.io.InputStream
public object TextKeyReader : KeyReader {

@ -1,9 +1,9 @@
package dev.openrs2.archive.name
package org.openrs2.archive.name
import com.github.ajalt.clikt.core.CliktCommand
import com.google.inject.Guice
import dev.openrs2.archive.ArchiveModule
import kotlinx.coroutines.runBlocking
import org.openrs2.archive.ArchiveModule
public class GenerateCommand : CliktCommand(name = "generate") {
override fun run(): Unit = runBlocking {

@ -1,12 +1,12 @@
package dev.openrs2.archive.name
package org.openrs2.archive.name
import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.parameters.options.option
import com.github.ajalt.clikt.parameters.types.defaultStdin
import com.github.ajalt.clikt.parameters.types.inputStream
import com.google.inject.Guice
import dev.openrs2.archive.ArchiveModule
import kotlinx.coroutines.runBlocking
import org.openrs2.archive.ArchiveModule
public class ImportCommand : CliktCommand(name = "import") {
private val input by option().inputStream().defaultStdin()

@ -1,4 +1,4 @@
package dev.openrs2.archive.name
package org.openrs2.archive.name
import com.github.ajalt.clikt.core.NoOpCliktCommand
import com.github.ajalt.clikt.core.subcommands

@ -1,7 +1,7 @@
package dev.openrs2.archive.name
package org.openrs2.archive.name
import dev.openrs2.db.Database
import dev.openrs2.util.krHashCode
import org.openrs2.db.Database
import org.openrs2.util.krHashCode
import javax.inject.Inject
import javax.inject.Singleton

@ -1,4 +1,4 @@
package dev.openrs2.asm
package org.openrs2.asm
import com.fasterxml.jackson.databind.module.SimpleModule
import javax.inject.Singleton

@ -1,4 +1,4 @@
package dev.openrs2.asm
package org.openrs2.asm
import com.fasterxml.jackson.databind.Module
import com.google.inject.AbstractModule

@ -1,4 +1,4 @@
package dev.openrs2.asm
package org.openrs2.asm
import org.objectweb.asm.commons.Remapper
import org.objectweb.asm.tree.AbstractInsnNode

@ -1,4 +1,4 @@
package dev.openrs2.asm
package org.openrs2.asm
public fun String.toBinaryClassName(): String {
return replace('/', '.')

@ -1,6 +1,5 @@
package dev.openrs2.asm
package org.openrs2.asm
import dev.openrs2.asm.classpath.ExtendedRemapper
import org.objectweb.asm.Type
import org.objectweb.asm.commons.Remapper
import org.objectweb.asm.tree.AbstractInsnNode
@ -17,6 +16,7 @@ import org.objectweb.asm.tree.MultiANewArrayInsnNode
import org.objectweb.asm.tree.ParameterNode
import org.objectweb.asm.tree.TryCatchBlockNode
import org.objectweb.asm.tree.TypeInsnNode
import org.openrs2.asm.classpath.ExtendedRemapper
public fun ClassNode.remap(remapper: ExtendedRemapper) {
val originalName = name

@ -1,4 +1,4 @@
package dev.openrs2.asm
package org.openrs2.asm
public object ClassVersionUtils {
private fun swapWords(v: Int): Int {

@ -1,4 +1,4 @@
package dev.openrs2.asm
package org.openrs2.asm
import org.objectweb.asm.tree.AbstractInsnNode
import org.objectweb.asm.tree.InsnList

@ -1,4 +1,4 @@
package dev.openrs2.asm
package org.openrs2.asm
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.AbstractInsnNode

@ -1,4 +1,4 @@
package dev.openrs2.asm
package org.openrs2.asm
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.AbstractInsnNode

@ -1,4 +1,4 @@
package dev.openrs2.asm
package org.openrs2.asm
import org.objectweb.asm.tree.FieldInsnNode
import org.objectweb.asm.tree.FieldNode

@ -1,4 +1,4 @@
package dev.openrs2.asm
package org.openrs2.asm
import org.objectweb.asm.tree.ClassNode
import org.objectweb.asm.tree.FieldInsnNode

@ -1,4 +1,4 @@
package dev.openrs2.asm
package org.openrs2.asm
import com.fasterxml.jackson.core.JsonParser
import com.fasterxml.jackson.databind.DeserializationContext

@ -1,4 +1,4 @@
package dev.openrs2.asm
package org.openrs2.asm
import com.fasterxml.jackson.databind.DeserializationContext
import com.fasterxml.jackson.databind.KeyDeserializer

@ -1,4 +1,4 @@
package dev.openrs2.asm
package org.openrs2.asm
import org.objectweb.asm.Opcodes
import org.objectweb.asm.Type

@ -1,4 +1,4 @@
package dev.openrs2.asm
package org.openrs2.asm
import org.objectweb.asm.ClassVisitor
import org.objectweb.asm.Opcodes

@ -1,4 +1,4 @@
package dev.openrs2.asm
package org.openrs2.asm
import org.objectweb.asm.Opcodes
import org.objectweb.asm.Type

@ -1,8 +1,8 @@
package dev.openrs2.asm.classpath
package org.openrs2.asm.classpath
import dev.openrs2.asm.MemberDesc
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.ClassNode
import org.openrs2.asm.MemberDesc
public class AsmClassMetadata(
private val classPath: ClassPath,

@ -1,6 +1,6 @@
package dev.openrs2.asm.classpath
package org.openrs2.asm.classpath
import dev.openrs2.asm.MemberDesc
import org.openrs2.asm.MemberDesc
public abstract class ClassMetadata {
public abstract val name: String

@ -1,13 +1,13 @@
package dev.openrs2.asm.classpath
package org.openrs2.asm.classpath
import dev.openrs2.asm.MemberDesc
import dev.openrs2.asm.MemberRef
import dev.openrs2.asm.toBinaryClassName
import dev.openrs2.util.collect.DisjointSet
import dev.openrs2.util.collect.ForestDisjointSet
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.AbstractInsnNode
import org.objectweb.asm.tree.ClassNode
import org.openrs2.asm.MemberDesc
import org.openrs2.asm.MemberRef
import org.openrs2.asm.toBinaryClassName
import org.openrs2.util.collect.DisjointSet
import org.openrs2.util.collect.ForestDisjointSet
import java.util.IdentityHashMap
public class ClassPath(

@ -1,4 +1,4 @@
package dev.openrs2.asm.classpath
package org.openrs2.asm.classpath
import org.objectweb.asm.commons.Remapper
import org.objectweb.asm.tree.AbstractInsnNode

@ -1,4 +1,4 @@
package dev.openrs2.asm.classpath
package org.openrs2.asm.classpath
import org.objectweb.asm.ClassVisitor
import org.objectweb.asm.MethodVisitor

@ -1,10 +1,10 @@
package dev.openrs2.asm.classpath
package org.openrs2.asm.classpath
import com.github.michaelbull.logging.InlineLogger
import dev.openrs2.asm.io.LibraryReader
import dev.openrs2.asm.io.LibraryWriter
import dev.openrs2.util.io.useAtomicOutputStream
import org.objectweb.asm.tree.ClassNode
import org.openrs2.asm.io.LibraryReader
import org.openrs2.asm.io.LibraryWriter
import org.openrs2.util.io.useAtomicOutputStream
import java.nio.file.Files
import java.nio.file.Path
import java.util.SortedMap

@ -1,9 +1,5 @@
package dev.openrs2.asm.classpath
package org.openrs2.asm.classpath
import dev.openrs2.asm.ClassVersionUtils
import dev.openrs2.asm.MemberRef
import dev.openrs2.asm.nextReal
import dev.openrs2.asm.remap
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.ClassNode
import org.objectweb.asm.tree.FieldInsnNode
@ -11,6 +7,10 @@ import org.objectweb.asm.tree.FieldNode
import org.objectweb.asm.tree.InsnList
import org.objectweb.asm.tree.InsnNode
import org.objectweb.asm.tree.MethodNode
import org.openrs2.asm.ClassVersionUtils
import org.openrs2.asm.MemberRef
import org.openrs2.asm.nextReal
import org.openrs2.asm.remap
import java.util.SortedMap
import java.util.TreeMap
import kotlin.math.max

@ -1,8 +1,8 @@
package dev.openrs2.asm.classpath
package org.openrs2.asm.classpath
import dev.openrs2.asm.MemberDesc
import dev.openrs2.asm.toInternalClassName
import org.objectweb.asm.Type
import org.openrs2.asm.MemberDesc
import org.openrs2.asm.toInternalClassName
private val Class<*>.asmName: String
get() = name.toInternalClassName()

@ -1,4 +1,4 @@
package dev.openrs2.asm.classpath
package org.openrs2.asm.classpath
import org.objectweb.asm.ClassWriter

@ -1,4 +1,4 @@
package dev.openrs2.asm.filter
package org.openrs2.asm.filter
public object AnyClassFilter : ClassFilter {
override fun matches(name: String): Boolean {

@ -1,4 +1,4 @@
package dev.openrs2.asm.filter
package org.openrs2.asm.filter
public object AnyMemberFilter : MemberFilter {
override fun matches(owner: String, name: String, desc: String): Boolean {

@ -1,4 +1,4 @@
package dev.openrs2.asm.filter
package org.openrs2.asm.filter
public interface ClassFilter {
public fun matches(name: String): Boolean

@ -1,4 +1,4 @@
package dev.openrs2.asm.filter
package org.openrs2.asm.filter
public object Glob {
public fun compile(pattern: String): Regex {

@ -1,4 +1,4 @@
package dev.openrs2.asm.filter
package org.openrs2.asm.filter
import com.fasterxml.jackson.annotation.JsonIgnore

@ -1,7 +1,7 @@
package dev.openrs2.asm.filter
package org.openrs2.asm.filter
import com.fasterxml.jackson.annotation.JsonIgnore
import dev.openrs2.asm.MemberRef
import org.openrs2.asm.MemberRef
public class GlobMemberFilter(@Suppress("CanBeParameter") private val patterns: List<MemberRef>) : MemberFilter {
private data class CompiledPattern(val owner: Regex, val name: Regex, val desc: Regex)

@ -1,6 +1,6 @@
package dev.openrs2.asm.filter
package org.openrs2.asm.filter
import dev.openrs2.asm.MemberRef
import org.openrs2.asm.MemberRef
public interface MemberFilter {
public fun matches(owner: String, name: String, desc: String): Boolean

@ -1,4 +1,4 @@
package dev.openrs2.asm.filter
package org.openrs2.asm.filter
public class UnionClassFilter(vararg filters: ClassFilter) : ClassFilter {
private val filters = filters.toList()

@ -1,4 +1,4 @@
package dev.openrs2.asm.filter
package org.openrs2.asm.filter
public class UnionMemberFilter(vararg filters: MemberFilter) : MemberFilter {
private val filters = filters.toList()

@ -1,13 +1,13 @@
package dev.openrs2.asm.io
package org.openrs2.asm.io
import dev.openrs2.asm.ClassVersionUtils
import dev.openrs2.asm.NopClassVisitor
import dev.openrs2.asm.classpath.ClassPath
import dev.openrs2.asm.classpath.StackFrameClassWriter
import org.objectweb.asm.ClassWriter
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.ClassNode
import org.objectweb.asm.util.CheckClassAdapter
import org.openrs2.asm.ClassVersionUtils
import org.openrs2.asm.NopClassVisitor
import org.openrs2.asm.classpath.ClassPath
import org.openrs2.asm.classpath.StackFrameClassWriter
import java.io.OutputStream
import java.util.jar.JarEntry
import java.util.jar.JarOutputStream

@ -1,9 +1,9 @@
package dev.openrs2.asm.io
package org.openrs2.asm.io
import dev.openrs2.asm.classpath.JsrInliner
import dev.openrs2.util.io.entries
import org.objectweb.asm.ClassReader
import org.objectweb.asm.tree.ClassNode
import org.openrs2.asm.classpath.JsrInliner
import org.openrs2.util.io.entries
import java.io.InputStream
import java.util.jar.JarInputStream

@ -1,6 +1,6 @@
package dev.openrs2.asm.io
package org.openrs2.asm.io
import dev.openrs2.util.io.DeterministicJarOutputStream
import org.openrs2.util.io.DeterministicJarOutputStream
import java.io.OutputStream
import java.util.jar.JarOutputStream

@ -1,4 +1,4 @@
package dev.openrs2.asm.io
package org.openrs2.asm.io
import org.objectweb.asm.tree.ClassNode
import java.io.InputStream

@ -1,7 +1,7 @@
package dev.openrs2.asm.io
package org.openrs2.asm.io
import dev.openrs2.asm.classpath.ClassPath
import org.objectweb.asm.tree.ClassNode
import org.openrs2.asm.classpath.ClassPath
import java.io.OutputStream
public interface LibraryWriter {

@ -1,6 +1,6 @@
package dev.openrs2.asm.io
package org.openrs2.asm.io
import dev.openrs2.util.io.DeterministicJarOutputStream
import org.openrs2.util.io.DeterministicJarOutputStream
import java.io.OutputStream
import java.util.jar.JarOutputStream
import java.util.jar.Manifest

@ -1,7 +1,7 @@
package dev.openrs2.asm.io
package org.openrs2.asm.io
import dev.openrs2.compress.gzip.Gzip
import org.objectweb.asm.tree.ClassNode
import org.openrs2.compress.gzip.Gzip
import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
import java.io.InputStream

@ -1,8 +1,8 @@
package dev.openrs2.asm.io
package org.openrs2.asm.io
import dev.openrs2.asm.classpath.ClassPath
import dev.openrs2.compress.gzip.Gzip
import org.objectweb.asm.tree.ClassNode
import org.openrs2.asm.classpath.ClassPath
import org.openrs2.compress.gzip.Gzip
import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
import java.io.OutputStream

@ -1,4 +1,4 @@
package dev.openrs2.asm.io
package org.openrs2.asm.io
import org.objectweb.asm.tree.ClassNode
import java.io.InputStream

@ -1,7 +1,7 @@
package dev.openrs2.asm.io
package org.openrs2.asm.io
import dev.openrs2.asm.classpath.ClassPath
import org.objectweb.asm.tree.ClassNode
import org.openrs2.asm.classpath.ClassPath
import java.io.OutputStream
public object PackClassLibraryWriter : LibraryWriter {

@ -1,11 +1,11 @@
package dev.openrs2.asm.io
package org.openrs2.asm.io
import dev.openrs2.asm.classpath.ClassPath
import dev.openrs2.crypto.Pkcs12KeyStore
import dev.openrs2.util.io.DeterministicJarOutputStream
import dev.openrs2.util.io.entries
import dev.openrs2.util.io.useTempFile
import org.objectweb.asm.tree.ClassNode
import org.openrs2.asm.classpath.ClassPath
import org.openrs2.crypto.Pkcs12KeyStore
import org.openrs2.util.io.DeterministicJarOutputStream
import org.openrs2.util.io.entries
import org.openrs2.util.io.useTempFile
import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
import java.io.InputStream

@ -1,11 +1,11 @@
package dev.openrs2.asm.transform
package org.openrs2.asm.transform
import dev.openrs2.asm.classpath.ClassPath
import dev.openrs2.asm.classpath.Library
import dev.openrs2.asm.hasCode
import org.objectweb.asm.tree.ClassNode
import org.objectweb.asm.tree.FieldNode
import org.objectweb.asm.tree.MethodNode
import org.openrs2.asm.classpath.ClassPath
import org.openrs2.asm.classpath.Library
import org.openrs2.asm.hasCode
public abstract class Transformer {
public open fun transform(classPath: ClassPath) {

@ -1,4 +1,4 @@
package dev.openrs2.buffer
package org.openrs2.buffer
import com.google.inject.AbstractModule
import io.netty.buffer.ByteBufAllocator

@ -1,4 +1,4 @@
package dev.openrs2.buffer
package org.openrs2.buffer
import com.google.common.base.Preconditions
import io.netty.buffer.ByteBuf

@ -1,4 +1,4 @@
package dev.openrs2.buffer
package org.openrs2.buffer
import io.netty.util.ReferenceCounted

@ -1,4 +1,4 @@
package dev.openrs2.buffer
package org.openrs2.buffer
import io.netty.buffer.ByteBufAllocator
import io.netty.buffer.Unpooled

@ -7,7 +7,7 @@ object Versions {
const val dependencyLicenseReport = "1.14"
const val dokka = "1.4.10"
const val fastutil = "8.4.2"
const val fernflower = "1.0.4-SNAPSHOT"
const val fernflower = "1.1.0"
const val flyway = "7.0.0"
const val guava = "29.0-jre"
const val guice = "4.2.3"
@ -24,7 +24,7 @@ object Versions {
const val kotlinter = "3.2.0"
const val logback = "1.2.3"
const val netty = "4.1.52.Final"
const val openrs2Natives = "2.0.1"
const val openrs2Natives = "3.0.0"
const val postgres = "42.2.16"
const val shadowPlugin = "6.0.0"
const val versionsPlugin = "0.33.0"

@ -5,7 +5,7 @@ plugins {
}
application {
mainClassName = "dev.openrs2.bundler.BundleCommandKt"
mainClassName = "org.openrs2.bundler.BundleCommandKt"
}
dependencies {
@ -15,7 +15,7 @@ dependencies {
implementation(project(":conf"))
implementation(project(":crypto"))
implementation("dev.openrs2:openrs2-natives-all:${Versions.openrs2Natives}")
implementation("org.openrs2:openrs2-natives-all:${Versions.openrs2Natives}")
}
publishing {

@ -1,4 +1,4 @@
package dev.openrs2.bundler
package org.openrs2.bundler
import com.github.ajalt.clikt.core.CliktCommand
import com.google.inject.Guice

@ -1,19 +1,19 @@
package dev.openrs2.bundler
package org.openrs2.bundler
import com.github.michaelbull.logging.InlineLogger
import dev.openrs2.asm.classpath.ClassPath
import dev.openrs2.asm.classpath.Library
import dev.openrs2.asm.io.JarLibraryReader
import dev.openrs2.asm.io.JarLibraryWriter
import dev.openrs2.asm.io.ManifestJarLibraryWriter
import dev.openrs2.asm.io.Pack200LibraryReader
import dev.openrs2.asm.io.Pack200LibraryWriter
import dev.openrs2.asm.io.PackClassLibraryWriter
import dev.openrs2.asm.io.SignedJarLibraryWriter
import dev.openrs2.asm.transform.Transformer
import dev.openrs2.bundler.transform.ResourceTransformer
import dev.openrs2.conf.Config
import dev.openrs2.crypto.Pkcs12KeyStore
import org.openrs2.asm.classpath.ClassPath
import org.openrs2.asm.classpath.Library
import org.openrs2.asm.io.JarLibraryReader
import org.openrs2.asm.io.JarLibraryWriter
import org.openrs2.asm.io.ManifestJarLibraryWriter
import org.openrs2.asm.io.Pack200LibraryReader
import org.openrs2.asm.io.Pack200LibraryWriter
import org.openrs2.asm.io.PackClassLibraryWriter
import org.openrs2.asm.io.SignedJarLibraryWriter
import org.openrs2.asm.transform.Transformer
import org.openrs2.bundler.transform.ResourceTransformer
import org.openrs2.conf.Config
import org.openrs2.crypto.Pkcs12KeyStore
import java.nio.file.Files
import java.nio.file.Path
import java.util.jar.Attributes

@ -1,23 +1,23 @@
package dev.openrs2.bundler
package org.openrs2.bundler
import com.google.inject.AbstractModule
import com.google.inject.multibindings.Multibinder
import dev.openrs2.asm.transform.Transformer
import dev.openrs2.bundler.transform.BufferSizeTransformer
import dev.openrs2.bundler.transform.CachePathTransformer
import dev.openrs2.bundler.transform.DomainTransformer
import dev.openrs2.bundler.transform.HighDpiTransformer
import dev.openrs2.bundler.transform.HostCheckTransformer
import dev.openrs2.bundler.transform.LoadLibraryTransformer
import dev.openrs2.bundler.transform.MacResizeTransformer
import dev.openrs2.bundler.transform.MemoryAllocationTransformer
import dev.openrs2.bundler.transform.NameTransformer
import dev.openrs2.bundler.transform.PlatformDetectionTransformer
import dev.openrs2.bundler.transform.PublicKeyTransformer
import dev.openrs2.bundler.transform.RightClickTransformer
import dev.openrs2.bundler.transform.TypoTransformer
import dev.openrs2.conf.ConfigModule
import dev.openrs2.crypto.CryptoModule
import org.openrs2.asm.transform.Transformer
import org.openrs2.bundler.transform.BufferSizeTransformer
import org.openrs2.bundler.transform.CachePathTransformer
import org.openrs2.bundler.transform.DomainTransformer
import org.openrs2.bundler.transform.HighDpiTransformer
import org.openrs2.bundler.transform.HostCheckTransformer
import org.openrs2.bundler.transform.LoadLibraryTransformer
import org.openrs2.bundler.transform.MacResizeTransformer
import org.openrs2.bundler.transform.MemoryAllocationTransformer
import org.openrs2.bundler.transform.NameTransformer
import org.openrs2.bundler.transform.PlatformDetectionTransformer
import org.openrs2.bundler.transform.PublicKeyTransformer
import org.openrs2.bundler.transform.RightClickTransformer
import org.openrs2.bundler.transform.TypoTransformer
import org.openrs2.conf.ConfigModule
import org.openrs2.crypto.CryptoModule
public object BundlerModule : AbstractModule() {
override fun configure() {

@ -1,4 +1,4 @@
package dev.openrs2.bundler
package org.openrs2.bundler
import javax.inject.Qualifier

@ -1,9 +1,9 @@
package dev.openrs2.bundler
package org.openrs2.bundler
import com.github.michaelbull.logging.InlineLogger
import dev.openrs2.asm.classpath.ClassPath
import dev.openrs2.asm.classpath.Library
import dev.openrs2.asm.io.LibraryWriter
import org.openrs2.asm.classpath.ClassPath
import org.openrs2.asm.classpath.Library
import org.openrs2.asm.io.LibraryWriter
import java.io.ByteArrayOutputStream
import java.nio.file.Files
import java.nio.file.Path
@ -80,7 +80,7 @@ public class Resource(
}
private fun compressNative(source: String, destination: String, resource: String): Resource {
val path = "/dev/openrs2/natives/$resource"
val path = "/org/openrs2/natives/$resource"
val uncompressed = Resource::class.java.getResourceAsStream(path).use { it.readBytes() }
return compress(source, destination, uncompressed)
}

@ -1,17 +1,17 @@
package dev.openrs2.bundler.transform
package org.openrs2.bundler.transform
import com.github.michaelbull.logging.InlineLogger
import dev.openrs2.asm.InsnMatcher
import dev.openrs2.asm.MemberRef
import dev.openrs2.asm.classpath.ClassPath
import dev.openrs2.asm.classpath.Library
import dev.openrs2.asm.hasCode
import dev.openrs2.asm.toAbstractInsnNode
import dev.openrs2.asm.transform.Transformer
import org.objectweb.asm.tree.ClassNode
import org.objectweb.asm.tree.FieldInsnNode
import org.objectweb.asm.tree.LdcInsnNode
import org.objectweb.asm.tree.MethodNode
import org.openrs2.asm.InsnMatcher
import org.openrs2.asm.MemberRef
import org.openrs2.asm.classpath.ClassPath
import org.openrs2.asm.classpath.Library
import org.openrs2.asm.hasCode
import org.openrs2.asm.toAbstractInsnNode
import org.openrs2.asm.transform.Transformer
import javax.inject.Singleton
@Singleton

@ -1,13 +1,13 @@
package dev.openrs2.bundler.transform
package org.openrs2.bundler.transform
import com.github.michaelbull.logging.InlineLogger
import dev.openrs2.asm.classpath.ClassPath
import dev.openrs2.asm.classpath.Library
import dev.openrs2.asm.transform.Transformer
import dev.openrs2.conf.Config
import org.objectweb.asm.tree.ClassNode
import org.objectweb.asm.tree.LdcInsnNode
import org.objectweb.asm.tree.MethodNode
import org.openrs2.asm.classpath.ClassPath
import org.openrs2.asm.classpath.Library
import org.openrs2.asm.transform.Transformer
import org.openrs2.conf.Config
import javax.inject.Inject
import javax.inject.Singleton

@ -1,13 +1,13 @@
package dev.openrs2.bundler.transform
package org.openrs2.bundler.transform
import com.github.michaelbull.logging.InlineLogger
import dev.openrs2.asm.classpath.ClassPath
import dev.openrs2.asm.classpath.Library
import dev.openrs2.asm.transform.Transformer
import dev.openrs2.conf.Config
import org.objectweb.asm.tree.ClassNode
import org.objectweb.asm.tree.LdcInsnNode
import org.objectweb.asm.tree.MethodNode
import org.openrs2.asm.classpath.ClassPath
import org.openrs2.asm.classpath.Library
import org.openrs2.asm.transform.Transformer
import org.openrs2.conf.Config
import javax.inject.Inject
import javax.inject.Singleton

@ -1,13 +1,6 @@
package dev.openrs2.bundler.transform
package org.openrs2.bundler.transform
import com.github.michaelbull.logging.InlineLogger
import dev.openrs2.asm.InsnMatcher
import dev.openrs2.asm.classpath.ClassPath
import dev.openrs2.asm.classpath.Library
import dev.openrs2.asm.getExpression
import dev.openrs2.asm.previousReal
import dev.openrs2.asm.stackMetadata
import dev.openrs2.asm.transform.Transformer
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.AbstractInsnNode
import org.objectweb.asm.tree.ClassNode
@ -23,6 +16,13 @@ import org.objectweb.asm.tree.MethodNode
import org.objectweb.asm.tree.ParameterNode
import org.objectweb.asm.tree.TypeInsnNode
import org.objectweb.asm.tree.VarInsnNode
import org.openrs2.asm.InsnMatcher
import org.openrs2.asm.classpath.ClassPath
import org.openrs2.asm.classpath.Library
import org.openrs2.asm.getExpression
import org.openrs2.asm.previousReal
import org.openrs2.asm.stackMetadata
import org.openrs2.asm.transform.Transformer
import javax.inject.Singleton
import kotlin.math.max
@ -225,12 +225,14 @@ public class HighDpiTransformer : Transformer() {
list.add(VarInsnNode(Opcodes.ALOAD, graphicsVar))
list.add(TypeInsnNode(Opcodes.CHECKCAST, "java/awt/Graphics2D"))
list.add(MethodInsnNode(
Opcodes.INVOKEVIRTUAL,
"java/awt/Graphics2D",
"getTransform",
"()Ljava/awt/geom/AffineTransform;"
))
list.add(
MethodInsnNode(
Opcodes.INVOKEVIRTUAL,
"java/awt/Graphics2D",
"getTransform",
"()Ljava/awt/geom/AffineTransform;"
)
)
list.add(MethodInsnNode(Opcodes.INVOKEVIRTUAL, "java/awt/geom/AffineTransform", "getScaleX", "()D"))
list.add(FieldInsnNode(Opcodes.PUTSTATIC, gameShell, "canvasScale", "D"))
list.add(JumpInsnNode(Opcodes.GOTO, endLabel))
@ -349,9 +351,11 @@ public class HighDpiTransformer : Transformer() {
private val GL_CONTEXTS = setOf("javax/media/opengl/GLContext", "gl!javax/media/opengl/GLContext")
private val GET_GL_DESCRIPTORS = setOf("()Ljavax/media/opengl/GL;", "()Lgl!javax/media/opengl/GL;")
private val DRAW_PIXELS_MATCHER = InsnMatcher.compile("""
private val DRAW_PIXELS_MATCHER = InsnMatcher.compile(
"""
ALOAD ILOAD ILOAD LDC GETSTATIC IFEQ LDC GOTO SIPUSH ALOAD INVOKESTATIC INVOKEINTERFACE
""".trimIndent())
""".trimIndent()
)
private val GET_GL_MATCHER = InsnMatcher.compile("GETSTATIC INVOKEVIRTUAL PUTSTATIC")
private val SET_CANVAS_VISIBLE_MATCHER = InsnMatcher.compile("GETSTATIC ICONST_1 INVOKEVIRTUAL")
}

@ -1,16 +1,16 @@
package dev.openrs2.bundler.transform
package org.openrs2.bundler.transform
import com.github.michaelbull.logging.InlineLogger
import dev.openrs2.asm.InsnMatcher
import dev.openrs2.asm.classpath.ClassPath
import dev.openrs2.asm.classpath.Library
import dev.openrs2.asm.transform.Transformer
import org.objectweb.asm.Opcodes
import org.objectweb.asm.Type
import org.objectweb.asm.tree.ClassNode
import org.objectweb.asm.tree.InsnNode
import org.objectweb.asm.tree.MethodInsnNode
import org.objectweb.asm.tree.MethodNode
import org.openrs2.asm.InsnMatcher
import org.openrs2.asm.classpath.ClassPath
import org.openrs2.asm.classpath.Library
import org.openrs2.asm.transform.Transformer
import javax.inject.Singleton
@Singleton

@ -1,15 +1,15 @@
package dev.openrs2.bundler.transform
package org.openrs2.bundler.transform
import com.github.michaelbull.logging.InlineLogger
import dev.openrs2.asm.InsnMatcher
import dev.openrs2.asm.classpath.ClassPath
import dev.openrs2.asm.classpath.Library
import dev.openrs2.asm.transform.Transformer
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.ClassNode
import org.objectweb.asm.tree.JumpInsnNode
import org.objectweb.asm.tree.LdcInsnNode
import org.objectweb.asm.tree.MethodNode
import org.openrs2.asm.InsnMatcher
import org.openrs2.asm.classpath.ClassPath
import org.openrs2.asm.classpath.Library
import org.openrs2.asm.transform.Transformer
import javax.inject.Singleton
@Singleton

@ -1,10 +1,6 @@
package dev.openrs2.bundler.transform
package org.openrs2.bundler.transform
import com.github.michaelbull.logging.InlineLogger
import dev.openrs2.asm.InsnMatcher
import dev.openrs2.asm.classpath.ClassPath
import dev.openrs2.asm.classpath.Library
import dev.openrs2.asm.transform.Transformer
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.ClassNode
import org.objectweb.asm.tree.FieldInsnNode
@ -12,6 +8,10 @@ import org.objectweb.asm.tree.JumpInsnNode
import org.objectweb.asm.tree.LdcInsnNode
import org.objectweb.asm.tree.MethodInsnNode
import org.objectweb.asm.tree.MethodNode
import org.openrs2.asm.InsnMatcher
import org.openrs2.asm.classpath.ClassPath
import org.openrs2.asm.classpath.Library
import org.openrs2.asm.transform.Transformer
import javax.inject.Singleton
@Singleton

@ -1,17 +1,17 @@
package dev.openrs2.bundler.transform
package org.openrs2.bundler.transform
import com.github.michaelbull.logging.InlineLogger
import dev.openrs2.asm.InsnMatcher
import dev.openrs2.asm.classpath.ClassPath
import dev.openrs2.asm.classpath.Library
import dev.openrs2.asm.replaceExpression
import dev.openrs2.asm.transform.Transformer
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.ClassNode
import org.objectweb.asm.tree.InsnNode
import org.objectweb.asm.tree.MethodInsnNode
import org.objectweb.asm.tree.MethodNode
import org.objectweb.asm.tree.VarInsnNode
import org.openrs2.asm.InsnMatcher
import org.openrs2.asm.classpath.ClassPath
import org.openrs2.asm.classpath.Library
import org.openrs2.asm.replaceExpression
import org.openrs2.asm.transform.Transformer
import javax.inject.Singleton
@Singleton

@ -1,13 +1,13 @@
package dev.openrs2.bundler.transform
package org.openrs2.bundler.transform
import com.github.michaelbull.logging.InlineLogger
import dev.openrs2.asm.classpath.ClassPath
import dev.openrs2.asm.classpath.Library
import dev.openrs2.asm.transform.Transformer
import dev.openrs2.conf.Config
import org.objectweb.asm.tree.ClassNode
import org.objectweb.asm.tree.LdcInsnNode
import org.objectweb.asm.tree.MethodNode
import org.openrs2.asm.classpath.ClassPath
import org.openrs2.asm.classpath.Library
import org.openrs2.asm.transform.Transformer
import org.openrs2.conf.Config
import javax.inject.Inject
import javax.inject.Singleton

@ -1,13 +1,6 @@
package dev.openrs2.bundler.transform
package org.openrs2.bundler.transform
import com.github.michaelbull.logging.InlineLogger
import dev.openrs2.asm.InsnMatcher
import dev.openrs2.asm.MemberRef
import dev.openrs2.asm.classpath.ClassPath
import dev.openrs2.asm.classpath.Library
import dev.openrs2.asm.intConstant
import dev.openrs2.asm.toAbstractInsnNode
import dev.openrs2.asm.transform.Transformer
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.AbstractInsnNode
import org.objectweb.asm.tree.ClassNode
@ -19,6 +12,13 @@ import org.objectweb.asm.tree.LdcInsnNode
import org.objectweb.asm.tree.MethodInsnNode
import org.objectweb.asm.tree.MethodNode
import org.objectweb.asm.tree.VarInsnNode
import org.openrs2.asm.InsnMatcher
import org.openrs2.asm.MemberRef
import org.openrs2.asm.classpath.ClassPath
import org.openrs2.asm.classpath.Library
import org.openrs2.asm.intConstant
import org.openrs2.asm.toAbstractInsnNode
import org.openrs2.asm.transform.Transformer
import javax.inject.Singleton
@Singleton

@ -1,13 +1,13 @@
package dev.openrs2.bundler.transform
package org.openrs2.bundler.transform
import com.github.michaelbull.logging.InlineLogger
import dev.openrs2.asm.classpath.ClassPath
import dev.openrs2.asm.classpath.Library
import dev.openrs2.asm.transform.Transformer
import org.bouncycastle.crypto.params.RSAPrivateCrtKeyParameters
import org.objectweb.asm.tree.ClassNode
import org.objectweb.asm.tree.LdcInsnNode
import org.objectweb.asm.tree.MethodNode
import org.openrs2.asm.classpath.ClassPath
import org.openrs2.asm.classpath.Library
import org.openrs2.asm.transform.Transformer
import javax.inject.Inject
import javax.inject.Singleton

@ -1,12 +1,6 @@
package dev.openrs2.bundler.transform
package org.openrs2.bundler.transform
import com.github.michaelbull.logging.InlineLogger
import dev.openrs2.asm.InsnMatcher
import dev.openrs2.asm.classpath.ClassPath
import dev.openrs2.asm.classpath.Library
import dev.openrs2.asm.toAbstractInsnNode
import dev.openrs2.asm.transform.Transformer
import dev.openrs2.bundler.Resource
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.ClassNode
import org.objectweb.asm.tree.InsnList
@ -16,6 +10,12 @@ import org.objectweb.asm.tree.LdcInsnNode
import org.objectweb.asm.tree.MethodInsnNode
import org.objectweb.asm.tree.MethodNode
import org.objectweb.asm.tree.TypeInsnNode
import org.openrs2.asm.InsnMatcher
import org.openrs2.asm.classpath.ClassPath
import org.openrs2.asm.classpath.Library
import org.openrs2.asm.toAbstractInsnNode
import org.openrs2.asm.transform.Transformer
import org.openrs2.bundler.Resource
public class ResourceTransformer(
private val resources: List<Resource>? = null,

@ -1,9 +1,6 @@
package dev.openrs2.bundler.transform
package org.openrs2.bundler.transform
import com.github.michaelbull.logging.InlineLogger
import dev.openrs2.asm.classpath.ClassPath
import dev.openrs2.asm.classpath.Library
import dev.openrs2.asm.transform.Transformer
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.ClassNode
import org.objectweb.asm.tree.FieldInsnNode
@ -11,6 +8,9 @@ import org.objectweb.asm.tree.InsnList
import org.objectweb.asm.tree.InsnNode
import org.objectweb.asm.tree.MethodInsnNode
import org.objectweb.asm.tree.MethodNode
import org.openrs2.asm.classpath.ClassPath
import org.openrs2.asm.classpath.Library
import org.openrs2.asm.transform.Transformer
import javax.inject.Singleton
@Singleton

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save