mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-01-09 00:59:44 +03:00
Some fixes.
This commit is contained in:
parent
f011b08b12
commit
329f38b1cc
3 changed files with 19 additions and 0 deletions
|
@ -48,6 +48,9 @@ public String[] buildConfig(Path inputJar, Path outputJar)
|
|||
confStrs.add("-obfuscationdictionary \'" + words.toFile().getName() + "\'");
|
||||
confStrs.add("-injar \'" + inputJar.toAbsolutePath() + "\'");
|
||||
confStrs.add("-outjar \'" + outputJar.toAbsolutePath() + "\'");
|
||||
srv.launcherBinary.coreLibs.stream()
|
||||
.map(e -> "-libraryjars \'" + e.toAbsolutePath().toString() + "\'")
|
||||
.forEach(confStrs::add);
|
||||
confStrs.add("-classobfuscationdictionary \'" + words.toFile().getName() + "\'");
|
||||
confStrs.add(readConf());
|
||||
return confStrs.toArray(new String[0]);
|
||||
|
|
|
@ -117,6 +117,14 @@ public Path process(Path inputJar) throws IOException {
|
|||
try (ZipOutputStream output = new ZipOutputStream(IOHelper.newOutput(outputJar));
|
||||
JAConfigurator jaConfigurator = new JAConfigurator(AutogenConfig.class.getName(), this)) {
|
||||
jaConfigurator.pool.insertClassPath(inputJar.toFile().getAbsolutePath());
|
||||
server.launcherBinary.coreLibs.stream().map(e -> e.toFile().getAbsolutePath())
|
||||
.forEach(t -> {
|
||||
try {
|
||||
jaConfigurator.pool.appendClassPath(t);
|
||||
} catch (NotFoundException e2) {
|
||||
LogHelper.error(e2);
|
||||
}
|
||||
});
|
||||
BuildContext context = new BuildContext(output, jaConfigurator, this);
|
||||
server.buildHookManager.hook(context);
|
||||
jaConfigurator.setAddress(server.config.getAddress());
|
||||
|
@ -129,6 +137,13 @@ public Path process(Path inputJar) throws IOException {
|
|||
jaConfigurator.setEnv(server.config.env);
|
||||
server.buildHookManager.registerAllClientModuleClass(jaConfigurator);
|
||||
reader.getCp().add(new JarFile(inputJar.toFile()));
|
||||
server.launcherBinary.coreLibs.forEach(e -> {
|
||||
try {
|
||||
reader.getCp().add(new JarFile(e.toFile()));
|
||||
} catch (IOException e1) {
|
||||
LogHelper.error(e1);
|
||||
}
|
||||
});
|
||||
try (ZipInputStream input = new ZipInputStream(IOHelper.newInput(inputJar))) {
|
||||
ZipEntry e = input.getNextEntry();
|
||||
while (e != null) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
-libraryjars '<java.home>/lib/rt.jar'
|
||||
-libraryjars '<java.home>/lib/jce.jar'
|
||||
-libraryjars '<java.home>/lib/ext/nashorn.jar'
|
||||
-libraryjars '<java.home>/lib/ext/jfxrt.jar'
|
||||
-keepattributes SourceFile,LineNumberTable
|
||||
-renamesourcefileattribute Source
|
||||
|
||||
|
|
Loading…
Reference in a new issue