mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-11 17:10:21 -07:00
Tired of Windows.
This commit is contained in:
parent
c0d6031741
commit
069fc956a9
1 changed files with 45 additions and 25 deletions
|
|
@ -418,9 +418,9 @@ public class Signlink implements Runnable {
|
||||||
throw new Exception();
|
throw new Exception();
|
||||||
}
|
}
|
||||||
String[] libs = createLibs(is64Bit ? 1 : 0);
|
String[] libs = createLibs(is64Bit ? 1 : 0);
|
||||||
// System.out.println("Trying to invoke libs");
|
//Windows has to load them this way because temporary files are illegal.
|
||||||
var7.invoke(runtime, var1.anObject977, libs[0]);
|
var7.invoke(runtime, var1.anObject977, method1448(this.gameName, this.anInt1215, libs[0]).toString());
|
||||||
var7.invoke(runtime, var1.anObject977, libs[1]);
|
var7.invoke(runtime, var1.anObject977, method1448(this.gameName, this.anInt1215, libs[1]).toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
var7.setAccessible(false);
|
var7.setAccessible(false);
|
||||||
|
|
@ -520,29 +520,49 @@ public class Signlink implements Runnable {
|
||||||
|
|
||||||
if(isGluegenRequired) glueGen = "libgluegen-rt_" + (is64Bit ? "64" : "32") + ".so";
|
if(isGluegenRequired) glueGen = "libgluegen-rt_" + (is64Bit ? "64" : "32") + ".so";
|
||||||
|
|
||||||
File joglLib = File.createTempFile("jogl","." + jogl.split("\\.")[1]);
|
if(archive >= 4) { //good, proper, correct Linux loading to allow multiple HD sessions
|
||||||
try (InputStream in = getClass().getResourceAsStream("/lib/" + jogl); OutputStream out = openOutputStream(joglLib)){
|
File joglLib = File.createTempFile("jogl", "." + jogl.split("\\.")[1]);
|
||||||
if(in == null) throw new FileNotFoundException("Needed library does not exist: " + jogl);
|
try (InputStream in = getClass().getResourceAsStream("/lib/" + jogl); OutputStream out = openOutputStream(joglLib)) {
|
||||||
copyFile(in, out);
|
if (in == null) throw new FileNotFoundException("Needed library does not exist: " + jogl);
|
||||||
joglLib.deleteOnExit();
|
|
||||||
filenames.add(joglLib.getAbsolutePath());
|
|
||||||
}
|
|
||||||
|
|
||||||
File awtLib = File.createTempFile("jogl_awt", "." + awt.split("\\.")[1]);
|
|
||||||
try (InputStream in = getClass().getResourceAsStream("/lib/" + awt); OutputStream out = openOutputStream(awtLib)){
|
|
||||||
if(in == null) throw new FileNotFoundException("Needed library does not exist: " + awt);
|
|
||||||
copyFile(in, out);
|
|
||||||
awtLib.deleteOnExit();
|
|
||||||
filenames.add(awtLib.getAbsolutePath());
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isGluegenRequired){
|
|
||||||
File glueLib = File.createTempFile("libgluegen", ".so");
|
|
||||||
try (InputStream in = getClass().getResourceAsStream("/lib/" + glueGen); OutputStream out = openOutputStream(glueLib)){
|
|
||||||
if(in == null) throw new FileNotFoundException("Needed library does not exist: " + glueGen);
|
|
||||||
copyFile(in, out);
|
copyFile(in, out);
|
||||||
glueLib.deleteOnExit();
|
joglLib.deleteOnExit();
|
||||||
filenames.add(glueLib.getAbsolutePath());
|
filenames.add(joglLib.getAbsolutePath());
|
||||||
|
}
|
||||||
|
|
||||||
|
File awtLib = File.createTempFile("jogl_awt", "." + awt.split("\\.")[1]);
|
||||||
|
try (InputStream in = getClass().getResourceAsStream("/lib/" + awt); OutputStream out = openOutputStream(awtLib)) {
|
||||||
|
if (in == null) throw new FileNotFoundException("Needed library does not exist: " + awt);
|
||||||
|
copyFile(in, out);
|
||||||
|
awtLib.deleteOnExit();
|
||||||
|
filenames.add(awtLib.getAbsolutePath());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isGluegenRequired) {
|
||||||
|
File glueLib = File.createTempFile("libgluegen", ".so");
|
||||||
|
try (InputStream in = getClass().getResourceAsStream("/lib/" + glueGen); OutputStream out = openOutputStream(glueLib)) {
|
||||||
|
if (in == null) throw new FileNotFoundException("Needed library does not exist: " + glueGen);
|
||||||
|
copyFile(in, out);
|
||||||
|
glueLib.deleteOnExit();
|
||||||
|
filenames.add(glueLib.getAbsolutePath());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else { //Shitty, fucking headass windows-specific loading that is backwards as fuck
|
||||||
|
File jogLib = method1448(this.gameName, this.anInt1215, jogl);
|
||||||
|
if(!jogLib.exists()){
|
||||||
|
try (InputStream in = getClass().getResourceAsStream("/lib/" + jogl); OutputStream out = openOutputStream(jogLib)) {
|
||||||
|
if (in == null) throw new FileNotFoundException("Needed library does not exist: " + jogl);
|
||||||
|
copyFile(in, out);
|
||||||
|
filenames.add(jogLib.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
File awtLib = method1448(this.gameName, this.anInt1215, awt);
|
||||||
|
if(!awtLib.exists()){
|
||||||
|
try (InputStream in = getClass().getResourceAsStream("/lib/" + awt); OutputStream out = openOutputStream(awtLib)) {
|
||||||
|
if (in == null) throw new FileNotFoundException("Needed library does not exist: " + awt);
|
||||||
|
copyFile(in, out);
|
||||||
|
filenames.add(awtLib.getName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue