fix shading injected client, remove assertion mandate
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -24,3 +24,4 @@ runelite-client/dependencies.txt
|
|||||||
.vscode
|
.vscode
|
||||||
.factorypath
|
.factorypath
|
||||||
hs_err_pid*.log
|
hs_err_pid*.log
|
||||||
|
/runelite-client/src/main/resources/net/runelite/client/injected-client.oprs
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class Injector extends InjectData implements InjectTaskHandler
|
|||||||
new RSApi(rsapi)
|
new RSApi(rsapi)
|
||||||
);
|
);
|
||||||
inject();
|
inject();
|
||||||
save(new File("../runelite-client/src/main/resources/net/runelite/client/injected-client.jar"));
|
save(new File("../runelite-client/src/main/resources/net/runelite/client/injected-client.oprs"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ tasks {
|
|||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
dependsOn(":injector:build")
|
dependsOn(":injector:build")
|
||||||
finalizedBy("filterResources")
|
finalizedBy("filterResources", "packInjectedClient")
|
||||||
}
|
}
|
||||||
|
|
||||||
register<Copy>("filterResources") {
|
register<Copy>("filterResources") {
|
||||||
@@ -149,6 +149,12 @@ tasks {
|
|||||||
filteringCharset = "UTF-8"
|
filteringCharset = "UTF-8"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
register<Copy>("packInjectedClient") {
|
||||||
|
from("src/main/resources/")
|
||||||
|
include("**/injected-client.oprs")
|
||||||
|
into("${buildDir}/resources/main")
|
||||||
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
attributes(mutableMapOf("Main-Class" to "net.runelite.client.RuneLite"))
|
attributes(mutableMapOf("Main-Class" to "net.runelite.client.RuneLite"))
|
||||||
|
|||||||
@@ -262,20 +262,6 @@ public class RuneLite
|
|||||||
|
|
||||||
final boolean developerMode = true;
|
final boolean developerMode = true;
|
||||||
|
|
||||||
if (developerMode)
|
|
||||||
{
|
|
||||||
boolean assertions = false;
|
|
||||||
assert assertions = true;
|
|
||||||
if (!assertions)
|
|
||||||
{
|
|
||||||
SwingUtilities.invokeLater(() ->
|
|
||||||
new FatalErrorDialog("Developers should enable assertions; Add `-ea` to your JVM arguments`")
|
|
||||||
.addBuildingGuide()
|
|
||||||
.open());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
PROFILES_DIR.mkdirs();
|
PROFILES_DIR.mkdirs();
|
||||||
|
|
||||||
log.info("RuneLite {} (launcher version {}) starting up, args: {}",
|
log.info("RuneLite {} (launcher version {}) starting up, args: {}",
|
||||||
|
|||||||
@@ -139,8 +139,8 @@ public class ClientLoader implements Supplier<Applet>
|
|||||||
// create the classloader for the jar while we hold the lock, and eagerly load and link all classes
|
// create the classloader for the jar while we hold the lock, and eagerly load and link all classes
|
||||||
// in the jar. Otherwise the jar can change on disk and can break future classloads.
|
// in the jar. Otherwise the jar can change on disk and can break future classloads.
|
||||||
File oprsInjected = new File(System.getProperty("user.home") + "/.openosrs/cache/injected-client.jar");
|
File oprsInjected = new File(System.getProperty("user.home") + "/.openosrs/cache/injected-client.jar");
|
||||||
InputStream initialStream = RuneLite.class.getResourceAsStream("injected-client.jar");
|
InputStream initialStream = RuneLite.class.getResourceAsStream("injected-client.oprs");
|
||||||
if (oprsInjected.length() != RuneLite.class.getResource("injected-client.jar").getFile().length())
|
if (oprsInjected.length() != RuneLite.class.getResource("injected-client.oprs").getFile().length())
|
||||||
FileUtils.copyInputStreamToFile(initialStream, oprsInjected);
|
FileUtils.copyInputStreamToFile(initialStream, oprsInjected);
|
||||||
|
|
||||||
classLoader = createJarClassLoader(oprsInjected);
|
classLoader = createJarClassLoader(oprsInjected);
|
||||||
|
|||||||
Reference in New Issue
Block a user