mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 03:31:15 +03:00
Merge branch 'release/5.3.5'
This commit is contained in:
commit
9c359747ea
13 changed files with 51 additions and 19 deletions
|
@ -186,7 +186,7 @@ task dumpClientLibs(type: Copy) {
|
|||
pom {
|
||||
name = 'GravitLauncher LaunchServer API'
|
||||
description = 'GravitLauncher LaunchServer Module API'
|
||||
url = 'https://launcher.gravit.pro'
|
||||
url = 'https://gravitlauncher.com'
|
||||
licenses {
|
||||
license {
|
||||
name = 'GNU General Public License, Version 3.0'
|
||||
|
@ -209,7 +209,7 @@ task dumpClientLibs(type: Copy) {
|
|||
scm {
|
||||
connection = 'scm:git:https://github.com/GravitLauncher/Launcher.git'
|
||||
developerConnection = 'scm:git:ssh://git@github.com:GravitLauncher/Launcher.git'
|
||||
url = 'https://launcher.gravit.pro/'
|
||||
url = 'https://gravitlauncher.com/'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
import pro.gravit.launchserver.manangers.LaunchServerGsonManager;
|
||||
import pro.gravit.launchserver.modules.impl.LaunchServerModulesManager;
|
||||
import pro.gravit.launchserver.socket.WebSocketService;
|
||||
import pro.gravit.utils.Version;
|
||||
import pro.gravit.utils.command.CommandHandler;
|
||||
import pro.gravit.utils.command.JLineCommandHandler;
|
||||
import pro.gravit.utils.command.StdCommandHandler;
|
||||
|
@ -33,6 +34,7 @@
|
|||
import java.nio.file.Path;
|
||||
import java.security.Security;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.util.List;
|
||||
|
||||
public class LaunchServerStarter {
|
||||
public static final boolean allowUnsigned = Boolean.getBoolean("launchserver.allowUnsigned");
|
||||
|
@ -86,6 +88,7 @@ public static void main(String[] args) throws Exception {
|
|||
modulesManager.initModules(null);
|
||||
registerAll();
|
||||
initGson(modulesManager);
|
||||
printExperimentalBranch();
|
||||
if (IOHelper.exists(dir.resolve("LaunchServer.conf"))) {
|
||||
configFile = dir.resolve("LaunchServer.conf");
|
||||
} else {
|
||||
|
@ -213,6 +216,26 @@ public static void registerAll() {
|
|||
OptionalTrigger.registerProviders();
|
||||
}
|
||||
|
||||
private static void printExperimentalBranch() {
|
||||
try(Reader reader = IOHelper.newReader(IOHelper.getResourceURL("experimental-build.json"))) {
|
||||
ExperimentalBuild info = Launcher.gsonManager.configGson.fromJson(reader, ExperimentalBuild.class);
|
||||
if(info.features == null || info.features.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
logger.warn("This is experimental build. Please do not use this in production");
|
||||
logger.warn("Experimental features: [{}]", String.join(",", info.features));
|
||||
for(var e : info.info) {
|
||||
logger.warn(e);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
logger.warn("Build information not found");
|
||||
}
|
||||
}
|
||||
|
||||
record ExperimentalBuild(List<String> features, List<String> info) {
|
||||
|
||||
}
|
||||
|
||||
public static void generateConfigIfNotExists(Path configFile, CommandHandler commandHandler, LaunchServer.LaunchServerEnv env) throws IOException {
|
||||
if (IOHelper.isFile(configFile))
|
||||
return;
|
||||
|
|
|
@ -45,7 +45,7 @@ public final class LaunchServerConfig {
|
|||
|
||||
public static LaunchServerConfig getDefault(LaunchServer.LaunchServerEnv env) {
|
||||
LaunchServerConfig newConfig = new LaunchServerConfig();
|
||||
newConfig.mirrors = new String[]{"https://mirror.gravit.pro/5.3.x/", "https://gravit-launcher-mirror.storage.googleapis.com/"};
|
||||
newConfig.mirrors = new String[]{"https://mirror.gravitlauncher.com/5.3.x/", "https://gravit-launcher-mirror.storage.googleapis.com/"};
|
||||
newConfig.launch4j = new LaunchServerConfig.ExeConf();
|
||||
newConfig.launch4j.enabled = false;
|
||||
newConfig.launch4j.copyright = "© GravitLauncher Team";
|
||||
|
@ -169,8 +169,11 @@ public void verify() {
|
|||
if (!updateMirror) {
|
||||
for (int i = 0; i < mirrors.length; ++i) {
|
||||
if ("https://mirror.gravit.pro/5.2.x/".equals(mirrors[i])) {
|
||||
logger.warn("Replace mirror 'https://mirror.gravit.pro/5.2.x/' to 'https://mirror.gravit.pro/5.3.x/'. If you really need to use original url, use '-Dlaunchserver.config.disableUpdateMirror=true'");
|
||||
mirrors[i] = "https://mirror.gravit.pro/5.3.x/";
|
||||
logger.warn("Replace mirror 'https://mirror.gravit.pro/5.2.x/' to 'https://mirror.gravitlauncher.com/5.3.x/'. If you really need to use original url, use '-Dlaunchserver.config.disableUpdateMirror=true'");
|
||||
mirrors[i] = "https://mirror.gravitlauncher.com/5.3.x/";
|
||||
} else if ("https://mirror.gravit.pro/5.3.x/".equals(mirrors[i])) {
|
||||
logger.warn("Replace mirror 'https://mirror.gravit.pro/5.3.x/' to 'https://mirror.gravitlauncher.com/5.3.x/'. If you really need to use original url, use '-Dlaunchserver.config.disableUpdateMirror=true'");
|
||||
mirrors[i] = "https://mirror.gravitlauncher.com/5.3.x/";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
4
LaunchServer/src/main/resources/experimental-build.json
Normal file
4
LaunchServer/src/main/resources/experimental-build.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"features": [],
|
||||
"info": []
|
||||
}
|
|
@ -81,7 +81,7 @@ task dumpLibs(type: Copy) {
|
|||
pom {
|
||||
name = 'GravitLauncher Client API'
|
||||
description = 'GravitLauncher Client Module API'
|
||||
url = 'https://launcher.gravit.pro'
|
||||
url = 'https://gravitlauncher.com'
|
||||
licenses {
|
||||
license {
|
||||
name = 'GNU General Public License, Version 3.0'
|
||||
|
@ -103,7 +103,7 @@ task dumpLibs(type: Copy) {
|
|||
scm {
|
||||
connection = 'scm:git:https://github.com/GravitLauncher/Launcher.git'
|
||||
developerConnection = 'scm:git:ssh://git@github.com:GravitLauncher/Launcher.git'
|
||||
url = 'https://launcher.gravit.pro/'
|
||||
url = 'https://gravitlauncher.com/'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ task javadocJar(type: Jar) {
|
|||
pom {
|
||||
name = 'GravitLauncher WebSocket API'
|
||||
description = 'GravitLauncher WebSocket Module API'
|
||||
url = 'https://launcher.gravit.pro'
|
||||
url = 'https://gravitlauncher.com'
|
||||
licenses {
|
||||
license {
|
||||
name = 'GNU General Public License, Version 3.0'
|
||||
|
@ -81,7 +81,7 @@ task javadocJar(type: Jar) {
|
|||
scm {
|
||||
connection = 'scm:git:https://github.com/GravitLauncher/Launcher.git'
|
||||
developerConnection = 'scm:git:ssh://git@github.com:GravitLauncher/Launcher.git'
|
||||
url = 'https://launcher.gravit.pro/'
|
||||
url = 'https://gravitlauncher.com/'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ task javadocJar(type: Jar) {
|
|||
pom {
|
||||
name = 'GravitLauncher Core Utils'
|
||||
description = 'GravitLauncher Core Utils'
|
||||
url = 'https://launcher.gravit.pro'
|
||||
url = 'https://gravitlauncher.com'
|
||||
licenses {
|
||||
license {
|
||||
name = 'GNU General Public License, Version 3.0'
|
||||
|
@ -87,7 +87,7 @@ task javadocJar(type: Jar) {
|
|||
scm {
|
||||
connection = 'scm:git:https://github.com/GravitLauncher/Launcher.git'
|
||||
developerConnection = 'scm:git:ssh://git@github.com:GravitLauncher/Launcher.git'
|
||||
url = 'https://launcher.gravit.pro/'
|
||||
url = 'https://gravitlauncher.com/'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ public final class Version implements Comparable<Version> {
|
|||
|
||||
public static final int MAJOR = 5;
|
||||
public static final int MINOR = 3;
|
||||
public static final int PATCH = 4;
|
||||
public static final int PATCH = 5;
|
||||
public static final int BUILD = 1;
|
||||
public static final Version.Type RELEASE = Type.STABLE;
|
||||
public final int major;
|
||||
|
|
|
@ -250,7 +250,7 @@ public static JavaVersion getByPath(Path jvmDir) throws IOException {
|
|||
arch = null;
|
||||
}
|
||||
} else {
|
||||
versionAndBuild = new JavaVersionAndBuild(isExistExtJavaLibrary(jvmDir, "jfxrt") ? 8 : 9, 0);
|
||||
versionAndBuild = new JavaVersionAndBuild(isExistExtJavaLibrary(jvmDir, "rt") ? 8 : 9, 0);
|
||||
}
|
||||
JavaVersion resultJavaVersion = new JavaVersion(jvmDir, versionAndBuild.version, versionAndBuild.build, arch, false);
|
||||
if (versionAndBuild.version <= 8) {
|
||||
|
@ -265,8 +265,10 @@ public static JavaVersion getByPath(Path jvmDir) throws IOException {
|
|||
|
||||
public static boolean isExistExtJavaLibrary(Path jvmDir, String name) {
|
||||
Path jrePath = jvmDir.resolve("lib").resolve("ext").resolve(name.concat(".jar"));
|
||||
Path jrePathLin = jvmDir.resolve("lib").resolve(name.concat(".jar"));
|
||||
Path jdkPath = jvmDir.resolve("jre").resolve("lib").resolve("ext").resolve(name.concat(".jar"));
|
||||
return IOHelper.isFile(jrePath) || IOHelper.isFile(jdkPath);
|
||||
Path jdkPathLin = jvmDir.resolve("jre").resolve("lib").resolve(name.concat(".jar"));
|
||||
return IOHelper.isFile(jrePath) || IOHelper.isFile(jdkPath) || IOHelper.isFile(jdkPathLin) || IOHelper.isFile(jrePathLin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
* [See license](LICENSE)
|
||||
* [See code of conduct](CODE_OF_CONDUCT.md)
|
||||
* [WIKI](https://launcher.gravit.pro)
|
||||
* [WIKI](https://gravitlauncher.com)
|
||||
* Get it (requires cURL):
|
||||
|
||||
```sh
|
||||
|
|
|
@ -82,7 +82,7 @@ pack project(':LauncherAPI')
|
|||
pom {
|
||||
name = 'GravitLauncher ServerWrapper API'
|
||||
description = 'GravitLauncher ServerWrapper Module API'
|
||||
url = 'https://launcher.gravit.pro'
|
||||
url = 'https://gravitlauncher.com'
|
||||
licenses {
|
||||
license {
|
||||
name = 'GNU General Public License, Version 3.0'
|
||||
|
@ -105,7 +105,7 @@ pack project(':LauncherAPI')
|
|||
scm {
|
||||
connection = 'scm:git:https://github.com/GravitLauncher/Launcher.git'
|
||||
developerConnection = 'scm:git:ssh://git@github.com:GravitLauncher/Launcher.git'
|
||||
url = 'https://launcher.gravit.pro/'
|
||||
url = 'https://gravitlauncher.com/'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
id 'org.openjfx.javafxplugin' version '0.0.10' apply false
|
||||
}
|
||||
group = 'pro.gravit.launcher'
|
||||
version = '5.3.4'
|
||||
version = '5.3.5'
|
||||
|
||||
apply from: 'props.gradle'
|
||||
|
||||
|
|
2
modules
2
modules
|
@ -1 +1 @@
|
|||
Subproject commit aba8a880bd644c211f6f6d6fdceedd21adf66ca6
|
||||
Subproject commit 614aea895f2d3ccbcf311b8058ab7a5f1dcd8602
|
Loading…
Reference in a new issue