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
|
||||
.factorypath
|
||||
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)
|
||||
);
|
||||
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)
|
||||
|
||||
@@ -127,7 +127,7 @@ tasks {
|
||||
|
||||
processResources {
|
||||
dependsOn(":injector:build")
|
||||
finalizedBy("filterResources")
|
||||
finalizedBy("filterResources", "packInjectedClient")
|
||||
}
|
||||
|
||||
register<Copy>("filterResources") {
|
||||
@@ -149,6 +149,12 @@ tasks {
|
||||
filteringCharset = "UTF-8"
|
||||
}
|
||||
|
||||
register<Copy>("packInjectedClient") {
|
||||
from("src/main/resources/")
|
||||
include("**/injected-client.oprs")
|
||||
into("${buildDir}/resources/main")
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes(mutableMapOf("Main-Class" to "net.runelite.client.RuneLite"))
|
||||
|
||||
@@ -262,20 +262,6 @@ public class RuneLite
|
||||
|
||||
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();
|
||||
|
||||
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
|
||||
// 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");
|
||||
InputStream initialStream = RuneLite.class.getResourceAsStream("injected-client.jar");
|
||||
if (oprsInjected.length() != RuneLite.class.getResource("injected-client.jar").getFile().length())
|
||||
InputStream initialStream = RuneLite.class.getResourceAsStream("injected-client.oprs");
|
||||
if (oprsInjected.length() != RuneLite.class.getResource("injected-client.oprs").getFile().length())
|
||||
FileUtils.copyInputStreamToFile(initialStream, oprsInjected);
|
||||
|
||||
classLoader = createJarClassLoader(oprsInjected);
|
||||
|
||||
Reference in New Issue
Block a user