mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
Обновление JAConfigurator
This commit is contained in:
parent
abcf980844
commit
aedddbff0d
2 changed files with 9 additions and 1 deletions
|
@ -41,12 +41,19 @@ public void close() {
|
||||||
ctClass.defrost();
|
ctClass.defrost();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CtClass getCtClass() {
|
||||||
|
return ctClass;
|
||||||
|
}
|
||||||
|
|
||||||
public byte[] getBytecode() throws IOException, CannotCompileException {
|
public byte[] getBytecode() throws IOException, CannotCompileException {
|
||||||
|
return ctClass.toBytecode();
|
||||||
|
}
|
||||||
|
public void compile() throws CannotCompileException {
|
||||||
body.append("}");
|
body.append("}");
|
||||||
moduleBody.append("}");
|
moduleBody.append("}");
|
||||||
ctConstructor.setBody(body.toString());
|
ctConstructor.setBody(body.toString());
|
||||||
initModuleMethod.insertAfter(moduleBody.toString());
|
initModuleMethod.insertAfter(moduleBody.toString());
|
||||||
return ctClass.toBytecode();
|
if(ctClass.isFrozen()) ctClass.defrost();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getZipEntryPath() {
|
public String getZipEntryPath() {
|
||||||
|
|
|
@ -229,6 +229,7 @@ private void stdBuild() throws IOException {
|
||||||
output.write(launcherConfigBytes);
|
output.write(launcherConfigBytes);
|
||||||
ZipEntry e = newZipEntry(jaConfigurator.getZipEntryPath());
|
ZipEntry e = newZipEntry(jaConfigurator.getZipEntryPath());
|
||||||
output.putNextEntry(e);
|
output.putNextEntry(e);
|
||||||
|
jaConfigurator.compile();
|
||||||
output.write(jaConfigurator.getBytecode());
|
output.write(jaConfigurator.getBytecode());
|
||||||
server.buildHookManager.postHook(context);
|
server.buildHookManager.postHook(context);
|
||||||
} catch (CannotCompileException | NotFoundException e) {
|
} catch (CannotCompileException | NotFoundException e) {
|
||||||
|
|
Loading…
Reference in a new issue