From 9df116f9517b210c2f850ae539dbefcf5cdf0b9c Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sat, 4 Nov 2023 21:50:11 +0700 Subject: [PATCH 1/8] [FIX] MirrorHelper --- Launcher/build.gradle | 3 ++- .../java11/pro/gravit/utils/launch/ModuleLaunch.java | 9 +++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Launcher/build.gradle b/Launcher/build.gradle index 981b7c41..b2a0c82b 100644 --- a/Launcher/build.gradle +++ b/Launcher/build.gradle @@ -26,7 +26,8 @@ archiveClassifier.set('clean') manifest.attributes("Main-Class": mainClassName, "Premain-Class": mainAgentName, - "Multi-Release": "true") + "Multi-Release": "true", + "Automatic-Module-Name": "GravitLauncher") } tasks.register('sourcesJar', Jar) { diff --git a/LauncherCore/src/main/java11/pro/gravit/utils/launch/ModuleLaunch.java b/LauncherCore/src/main/java11/pro/gravit/utils/launch/ModuleLaunch.java index c1582557..dea2b3f4 100644 --- a/LauncherCore/src/main/java11/pro/gravit/utils/launch/ModuleLaunch.java +++ b/LauncherCore/src/main/java11/pro/gravit/utils/launch/ModuleLaunch.java @@ -39,7 +39,7 @@ public ClassLoaderControl init(List files, String nativePath, LaunchOption } catch (MalformedURLException ex) { throw new RuntimeException(ex); } - }).toArray(URL[]::new), BasicLaunch.class.getClassLoader()); + }).toArray(URL[]::new), ClassLoader.getPlatformClassLoader()); moduleClassLoader.nativePath = nativePath; { if(options.enableHacks) { @@ -163,14 +163,11 @@ private class ModuleClassLoader extends URLClassLoader { private String nativePath; private final List packages = new ArrayList<>(); - public ModuleClassLoader(URL[] urls) { - super(urls); + public ModuleClassLoader(URL[] urls, ClassLoader parent) { + super("LAUNCHER", urls, parent); packages.add("pro.gravit.launcher."); packages.add("pro.gravit.utils."); } - public ModuleClassLoader(URL[] urls, ClassLoader parent) { - super(urls, parent); - } @Override protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException { From 0d5d772141bcbbdf7ceb76edefaa1241158c9caa Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sat, 4 Nov 2023 21:50:31 +0700 Subject: [PATCH 2/8] [ANY] Update modules --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index 67462daf..f54534c3 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 67462dafa9b8de8e3d7366f495c959b9c2c037d5 +Subproject commit f54534c3d4172ce0657c9d18973a652048a7648e From 84a3845f1abc7b9eb2e7f2135f9888201d584126 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sat, 4 Nov 2023 21:51:18 +0700 Subject: [PATCH 3/8] [ANY] 5.5.2-dev --- LauncherCore/src/main/java/pro/gravit/utils/Version.java | 4 ++-- build.gradle | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/LauncherCore/src/main/java/pro/gravit/utils/Version.java b/LauncherCore/src/main/java/pro/gravit/utils/Version.java index 536aa8f1..4e7c8148 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/Version.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/Version.java @@ -6,9 +6,9 @@ public final class Version implements Comparable { public static final int MAJOR = 5; public static final int MINOR = 5; - public static final int PATCH = 1; + public static final int PATCH = 2; public static final int BUILD = 1; - public static final Version.Type RELEASE = Type.STABLE; + public static final Version.Type RELEASE = Type.DEV; public final int major; public final int minor; public final int patch; diff --git a/build.gradle b/build.gradle index e6ff1f44..4cf81dc0 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ id 'org.openjfx.javafxplugin' version '0.0.10' apply false } group = 'pro.gravit.launcher' -version = '5.5.1' +version = '5.5.2-SNAPSHOT' apply from: 'props.gradle' From a2167d483a91cb5c9dae3a029af9f2a6c26bc4c1 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Thu, 9 Nov 2023 14:49:25 +0700 Subject: [PATCH 4/8] [ANY] Update modules --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index f54534c3..e28983f8 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit f54534c3d4172ce0657c9d18973a652048a7648e +Subproject commit e28983f828be3ab713a57290495326692a51546c From 0482cfa9abcf176f2d2fcb5ba09ec7e1b738a73d Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Fri, 10 Nov 2023 00:32:40 +0700 Subject: [PATCH 5/8] [ANY] Update modules --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index e28983f8..a70de386 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit e28983f828be3ab713a57290495326692a51546c +Subproject commit a70de3865daff53f44fb93cb6c80df99e3cdc0a1 From 4720e4d106af8b590b9c3b65445424fc1eabd726 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sun, 19 Nov 2023 14:04:29 +0700 Subject: [PATCH 6/8] [FIX] Force exit JVM --- .../main/java/pro/gravit/launcher/server/ServerWrapper.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java index 6884ef9b..e9383ec4 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java @@ -203,6 +203,9 @@ public void run(String... args) throws Throwable { } } launch.launch(config.mainclass, config.mainmodule, Arrays.asList(real_args)); + if(!config.keepJVMAfterMainMethodCompleted) { + System.exit(0); + } } catch (Throwable e) { LogHelper.error(e); System.exit(-1); @@ -245,6 +248,7 @@ public static final class Config { public String address; public String serverName; public boolean autoloadLibraries; + public boolean keepJVMAfterMainMethodCompleted; public String logFile; public List classpath; public ClientProfile.ClassLoaderConfig classLoaderConfig; From 8f598a40c5d814a22cce8d85efb64ef96a42aadd Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sun, 19 Nov 2023 14:19:56 +0700 Subject: [PATCH 7/8] Revert "[FIX] Force exit JVM" This reverts commit 4720e4d106af8b590b9c3b65445424fc1eabd726. --- .../main/java/pro/gravit/launcher/server/ServerWrapper.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java index e9383ec4..6884ef9b 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java @@ -203,9 +203,6 @@ public void run(String... args) throws Throwable { } } launch.launch(config.mainclass, config.mainmodule, Arrays.asList(real_args)); - if(!config.keepJVMAfterMainMethodCompleted) { - System.exit(0); - } } catch (Throwable e) { LogHelper.error(e); System.exit(-1); @@ -248,7 +245,6 @@ public static final class Config { public String address; public String serverName; public boolean autoloadLibraries; - public boolean keepJVMAfterMainMethodCompleted; public String logFile; public List classpath; public ClientProfile.ClassLoaderConfig classLoaderConfig; From 0c2779f1c0ebf4b44c4043d3dd08db7154538116 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Mon, 20 Nov 2023 16:47:23 +0700 Subject: [PATCH 8/8] [ANY] 5.5.2 stable --- LauncherCore/src/main/java/pro/gravit/utils/Version.java | 2 +- build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LauncherCore/src/main/java/pro/gravit/utils/Version.java b/LauncherCore/src/main/java/pro/gravit/utils/Version.java index 4e7c8148..69a95013 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/Version.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/Version.java @@ -8,7 +8,7 @@ public final class Version implements Comparable { public static final int MINOR = 5; public static final int PATCH = 2; public static final int BUILD = 1; - public static final Version.Type RELEASE = Type.DEV; + public static final Version.Type RELEASE = Type.STABLE; public final int major; public final int minor; public final int patch; diff --git a/build.gradle b/build.gradle index 4cf81dc0..7c41c2e6 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ id 'org.openjfx.javafxplugin' version '0.0.10' apply false } group = 'pro.gravit.launcher' -version = '5.5.2-SNAPSHOT' +version = '5.5.2' apply from: 'props.gradle'