forked from openrs2/openrs2
Closes #116. This commit also changes the output directory from nonfree/var/cache/bundle to nonfree/var/cache/client. Signed-off-by: Graham <gpe@openrs2.org>
parent
30828308b2
commit
c24d9ceb35
@ -1,12 +1,12 @@ |
|||||||
<component name="ProjectRunConfigurationManager"> |
<component name="ProjectRunConfigurationManager"> |
||||||
<configuration default="false" name="Bundler" type="JetRunConfigurationType"> |
<configuration default="false" name="Patcher" type="JetRunConfigurationType"> |
||||||
<module name="openrs2.bundler.main" /> |
<module name="openrs2.patcher.main" /> |
||||||
<option name="VM_PARAMETERS" value="" /> |
<option name="VM_PARAMETERS" value="" /> |
||||||
<option name="PROGRAM_PARAMETERS" value="" /> |
<option name="PROGRAM_PARAMETERS" value="" /> |
||||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> |
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> |
||||||
<option name="ALTERNATIVE_JRE_PATH" /> |
<option name="ALTERNATIVE_JRE_PATH" /> |
||||||
<option name="PASS_PARENT_ENVS" value="true" /> |
<option name="PASS_PARENT_ENVS" value="true" /> |
||||||
<option name="MAIN_CLASS_NAME" value="org.openrs2.bundler.BundleCommandKt" /> |
<option name="MAIN_CLASS_NAME" value="org.openrs2.patcher.PatchCommandKt" /> |
||||||
<option name="WORKING_DIRECTORY" value="" /> |
<option name="WORKING_DIRECTORY" value="" /> |
||||||
<method v="2"> |
<method v="2"> |
||||||
<option name="Make" enabled="true" /> |
<option name="Make" enabled="true" /> |
@ -1,15 +0,0 @@ |
|||||||
package org.openrs2.bundler |
|
||||||
|
|
||||||
import com.github.ajalt.clikt.core.CliktCommand |
|
||||||
import com.google.inject.Guice |
|
||||||
import java.nio.file.Paths |
|
||||||
|
|
||||||
public fun main(args: Array<String>): Unit = BundleCommand().main(args) |
|
||||||
|
|
||||||
public class BundleCommand : CliktCommand(name = "bundle") { |
|
||||||
override fun run() { |
|
||||||
val injector = Guice.createInjector(BundlerModule) |
|
||||||
val bundler = injector.getInstance(Bundler::class.java) |
|
||||||
bundler.run(Paths.get("nonfree/lib"), Paths.get("nonfree/var/cache/bundle"), Paths.get("etc/loader.p12")) |
|
||||||
} |
|
||||||
} |
|
@ -0,0 +1,15 @@ |
|||||||
|
package org.openrs2.patcher |
||||||
|
|
||||||
|
import com.github.ajalt.clikt.core.CliktCommand |
||||||
|
import com.google.inject.Guice |
||||||
|
import java.nio.file.Paths |
||||||
|
|
||||||
|
public fun main(args: Array<String>): Unit = PatchCommand().main(args) |
||||||
|
|
||||||
|
public class PatchCommand : CliktCommand(name = "patch") { |
||||||
|
override fun run() { |
||||||
|
val injector = Guice.createInjector(PatcherModule) |
||||||
|
val patcher = injector.getInstance(Patcher::class.java) |
||||||
|
patcher.run(Paths.get("nonfree/lib"), Paths.get("nonfree/var/cache/client"), Paths.get("etc/loader.p12")) |
||||||
|
} |
||||||
|
} |
@ -1,30 +1,30 @@ |
|||||||
package org.openrs2.bundler |
package org.openrs2.patcher |
||||||
|
|
||||||
import com.google.inject.AbstractModule |
import com.google.inject.AbstractModule |
||||||
import com.google.inject.multibindings.Multibinder |
import com.google.inject.multibindings.Multibinder |
||||||
import org.openrs2.asm.transform.Transformer |
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.conf.ConfigModule |
||||||
import org.openrs2.crypto.CryptoModule |
import org.openrs2.crypto.CryptoModule |
||||||
|
import org.openrs2.patcher.transform.BufferSizeTransformer |
||||||
|
import org.openrs2.patcher.transform.CachePathTransformer |
||||||
|
import org.openrs2.patcher.transform.DomainTransformer |
||||||
|
import org.openrs2.patcher.transform.HighDpiTransformer |
||||||
|
import org.openrs2.patcher.transform.HostCheckTransformer |
||||||
|
import org.openrs2.patcher.transform.LoadLibraryTransformer |
||||||
|
import org.openrs2.patcher.transform.MacResizeTransformer |
||||||
|
import org.openrs2.patcher.transform.MemoryAllocationTransformer |
||||||
|
import org.openrs2.patcher.transform.NameTransformer |
||||||
|
import org.openrs2.patcher.transform.PlatformDetectionTransformer |
||||||
|
import org.openrs2.patcher.transform.PublicKeyTransformer |
||||||
|
import org.openrs2.patcher.transform.RightClickTransformer |
||||||
|
import org.openrs2.patcher.transform.TypoTransformer |
||||||
|
|
||||||
public object BundlerModule : AbstractModule() { |
public object PatcherModule : AbstractModule() { |
||||||
override fun configure() { |
override fun configure() { |
||||||
install(ConfigModule) |
install(ConfigModule) |
||||||
install(CryptoModule) |
install(CryptoModule) |
||||||
|
|
||||||
val binder = Multibinder.newSetBinder(binder(), Transformer::class.java, BundlerQualifier::class.java) |
val binder = Multibinder.newSetBinder(binder(), Transformer::class.java, PatcherQualifier::class.java) |
||||||
binder.addBinding().to(BufferSizeTransformer::class.java) |
binder.addBinding().to(BufferSizeTransformer::class.java) |
||||||
binder.addBinding().to(CachePathTransformer::class.java) |
binder.addBinding().to(CachePathTransformer::class.java) |
||||||
binder.addBinding().to(HostCheckTransformer::class.java) |
binder.addBinding().to(HostCheckTransformer::class.java) |
@ -1,8 +1,8 @@ |
|||||||
package org.openrs2.bundler |
package org.openrs2.patcher |
||||||
|
|
||||||
import javax.inject.Qualifier |
import javax.inject.Qualifier |
||||||
|
|
||||||
@Qualifier |
@Qualifier |
||||||
@Retention(AnnotationRetention.RUNTIME) |
@Retention(AnnotationRetention.RUNTIME) |
||||||
@Target(AnnotationTarget.FIELD, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.FUNCTION) |
@Target(AnnotationTarget.FIELD, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.FUNCTION) |
||||||
public annotation class BundlerQualifier |
public annotation class PatcherQualifier |
@ -1,4 +1,4 @@ |
|||||||
package org.openrs2.bundler |
package org.openrs2.patcher |
||||||
|
|
||||||
import com.github.michaelbull.logging.InlineLogger |
import com.github.michaelbull.logging.InlineLogger |
||||||
import org.openrs2.asm.classpath.ClassPath |
import org.openrs2.asm.classpath.ClassPath |
@ -1,4 +1,4 @@ |
|||||||
package org.openrs2.bundler.transform |
package org.openrs2.patcher.transform |
||||||
|
|
||||||
import com.github.michaelbull.logging.InlineLogger |
import com.github.michaelbull.logging.InlineLogger |
||||||
import org.objectweb.asm.tree.ClassNode |
import org.objectweb.asm.tree.ClassNode |
@ -1,4 +1,4 @@ |
|||||||
package org.openrs2.bundler.transform |
package org.openrs2.patcher.transform |
||||||
|
|
||||||
import com.github.michaelbull.logging.InlineLogger |
import com.github.michaelbull.logging.InlineLogger |
||||||
import org.objectweb.asm.tree.ClassNode |
import org.objectweb.asm.tree.ClassNode |
@ -1,4 +1,4 @@ |
|||||||
package org.openrs2.bundler.transform |
package org.openrs2.patcher.transform |
||||||
|
|
||||||
import com.github.michaelbull.logging.InlineLogger |
import com.github.michaelbull.logging.InlineLogger |
||||||
import org.objectweb.asm.tree.ClassNode |
import org.objectweb.asm.tree.ClassNode |
@ -1,4 +1,4 @@ |
|||||||
package org.openrs2.bundler.transform |
package org.openrs2.patcher.transform |
||||||
|
|
||||||
import com.github.michaelbull.logging.InlineLogger |
import com.github.michaelbull.logging.InlineLogger |
||||||
import org.objectweb.asm.Opcodes |
import org.objectweb.asm.Opcodes |
@ -1,4 +1,4 @@ |
|||||||
package org.openrs2.bundler.transform |
package org.openrs2.patcher.transform |
||||||
|
|
||||||
import com.github.michaelbull.logging.InlineLogger |
import com.github.michaelbull.logging.InlineLogger |
||||||
import org.objectweb.asm.Opcodes |
import org.objectweb.asm.Opcodes |
@ -1,4 +1,4 @@ |
|||||||
package org.openrs2.bundler.transform |
package org.openrs2.patcher.transform |
||||||
|
|
||||||
import com.github.michaelbull.logging.InlineLogger |
import com.github.michaelbull.logging.InlineLogger |
||||||
import org.objectweb.asm.Opcodes |
import org.objectweb.asm.Opcodes |
@ -1,4 +1,4 @@ |
|||||||
package org.openrs2.bundler.transform |
package org.openrs2.patcher.transform |
||||||
|
|
||||||
import com.github.michaelbull.logging.InlineLogger |
import com.github.michaelbull.logging.InlineLogger |
||||||
import org.objectweb.asm.Opcodes |
import org.objectweb.asm.Opcodes |
@ -1,4 +1,4 @@ |
|||||||
package org.openrs2.bundler.transform |
package org.openrs2.patcher.transform |
||||||
|
|
||||||
import com.github.michaelbull.logging.InlineLogger |
import com.github.michaelbull.logging.InlineLogger |
||||||
import org.objectweb.asm.Opcodes |
import org.objectweb.asm.Opcodes |
@ -1,4 +1,4 @@ |
|||||||
package org.openrs2.bundler.transform |
package org.openrs2.patcher.transform |
||||||
|
|
||||||
import com.github.michaelbull.logging.InlineLogger |
import com.github.michaelbull.logging.InlineLogger |
||||||
import org.objectweb.asm.tree.ClassNode |
import org.objectweb.asm.tree.ClassNode |
@ -1,4 +1,4 @@ |
|||||||
package org.openrs2.bundler.transform |
package org.openrs2.patcher.transform |
||||||
|
|
||||||
import com.github.michaelbull.logging.InlineLogger |
import com.github.michaelbull.logging.InlineLogger |
||||||
import org.objectweb.asm.Opcodes |
import org.objectweb.asm.Opcodes |
@ -1,4 +1,4 @@ |
|||||||
package org.openrs2.bundler.transform |
package org.openrs2.patcher.transform |
||||||
|
|
||||||
import com.github.michaelbull.logging.InlineLogger |
import com.github.michaelbull.logging.InlineLogger |
||||||
import org.bouncycastle.crypto.params.RSAPrivateCrtKeyParameters |
import org.bouncycastle.crypto.params.RSAPrivateCrtKeyParameters |
@ -1,4 +1,4 @@ |
|||||||
package org.openrs2.bundler.transform |
package org.openrs2.patcher.transform |
||||||
|
|
||||||
import com.github.michaelbull.logging.InlineLogger |
import com.github.michaelbull.logging.InlineLogger |
||||||
import org.objectweb.asm.Opcodes |
import org.objectweb.asm.Opcodes |
@ -1,4 +1,4 @@ |
|||||||
package org.openrs2.bundler.transform |
package org.openrs2.patcher.transform |
||||||
|
|
||||||
import com.github.michaelbull.logging.InlineLogger |
import com.github.michaelbull.logging.InlineLogger |
||||||
import org.objectweb.asm.tree.ClassNode |
import org.objectweb.asm.tree.ClassNode |
Loading…
Reference in new issue