mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
Compare commits
3 commits
88f1eaf750
...
4be299f6ca
Author | SHA1 | Date | |
---|---|---|---|
|
4be299f6ca | ||
|
ef4f14f9b4 | ||
|
d720328bc4 |
4 changed files with 26 additions and 1 deletions
|
@ -80,6 +80,7 @@ pack project(':LauncherAPI')
|
|||
bundle group: 'io.netty', name: 'netty-codec-http', version: rootProject['verNetty']
|
||||
bundle group: 'io.netty', name: 'netty-transport-classes-epoll', version: rootProject['verNetty']
|
||||
bundle group: 'io.netty', name: 'netty-transport-native-epoll', version: rootProject['verNetty'], classifier: 'linux-x86_64'
|
||||
bundle group: 'io.netty', name: 'netty-transport-native-epoll', version: rootProject['verNetty'], classifier: 'linux-aarch_64'
|
||||
bundle group: 'org.slf4j', name: 'slf4j-api', version: rootProject['verSlf4j']
|
||||
bundle group: 'com.mysql', name: 'mysql-connector-j', version: rootProject['verMySQLConn']
|
||||
bundle group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: rootProject['verMariaDBConn']
|
||||
|
|
|
@ -145,7 +145,22 @@ public void start(boolean pipeOutput) throws IOException, InterruptedException {
|
|||
if (params.profile.getClassLoaderConfig() == ClientProfile.ClassLoaderConfig.AGENT) {
|
||||
processArgs.add("-javaagent:".concat(IOHelper.getCodeSource(ClientLauncherEntryPoint.class).toAbsolutePath().toString()));
|
||||
} else if (params.profile.getClassLoaderConfig() == ClientProfile.ClassLoaderConfig.SYSTEM_ARGS) {
|
||||
systemClassPath.addAll(ClientLauncherEntryPoint.resolveClassPath(new HashSet<>(), workDir, params.actions, params.profile)
|
||||
Set<Path> ignorePath = new HashSet<>();
|
||||
var moduleConf = params.profile.getModuleConf();
|
||||
if(moduleConf != null) {
|
||||
if(moduleConf.modulePath != null && !moduleConf.modulePath.isEmpty()) {
|
||||
processArgs.add("-p");
|
||||
for(var e : moduleConf.modulePath) {
|
||||
ignorePath.add(Path.of(e));
|
||||
}
|
||||
processArgs.add(String.join(File.pathSeparator, moduleConf.modulePath));
|
||||
}
|
||||
if(moduleConf.modules != null && !moduleConf.modules.isEmpty()) {
|
||||
processArgs.add("--add-modules");
|
||||
processArgs.add(String.join(",", moduleConf.modules));
|
||||
}
|
||||
}
|
||||
systemClassPath.addAll(ClientLauncherEntryPoint.resolveClassPath(ignorePath, workDir, params.actions, params.profile)
|
||||
.map(Path::toString)
|
||||
.toList());
|
||||
}
|
||||
|
|
|
@ -54,6 +54,10 @@ private class LegacyClassLoader extends URLClassLoader {
|
|||
private final Map<String, Class<?>> classMap = new ConcurrentHashMap<>();
|
||||
private String nativePath;
|
||||
|
||||
static {
|
||||
ClassLoader.registerAsParallelCapable();
|
||||
}
|
||||
|
||||
private final List<String> packages = new ArrayList<>();
|
||||
public LegacyClassLoader(URL[] urls) {
|
||||
super(urls);
|
||||
|
|
|
@ -164,6 +164,11 @@ private class ModuleClassLoader extends URLClassLoader {
|
|||
private String nativePath;
|
||||
|
||||
private final List<String> packages = new ArrayList<>();
|
||||
|
||||
static {
|
||||
ClassLoader.registerAsParallelCapable();
|
||||
}
|
||||
|
||||
public ModuleClassLoader(URL[] urls, ClassLoader parent) {
|
||||
super("LAUNCHER", urls, parent);
|
||||
packages.add("pro.gravit.launcher.");
|
||||
|
|
Loading…
Reference in a new issue