diff --git a/build.gradle b/build.gradle index 6710f064..e6bbd77f 100644 --- a/build.gradle +++ b/build.gradle @@ -58,12 +58,11 @@ repositories { } dependencies { - implementation "pro.gravit.launcher:launcher-core:5.5.4" - implementation "pro.gravit.launcher:launcher-modern-core:5.5.4" - implementation "pro.gravit.launcher:launcher-ws-api:5.5.4" - implementation "pro.gravit.launcher:launcher-client-api:5.5.4" - implementation "pro.gravit.launcher:launcher-client-start-api:5.5.4" - implementation "pro.gravit.launcher:launcher-client-starter-api:5.5.4" + implementation "pro.gravit.launcher:launcher-core:5.6.0-SNAPSHOT" + implementation "pro.gravit.launcher:launcher-ws-api:5.6.0-SNAPSHOT" + implementation "pro.gravit.launcher:launcher-client-api:5.6.0-SNAPSHOT" + implementation "pro.gravit.launcher:launcher-client-start-api:5.6.0-SNAPSHOT" + implementation "pro.gravit.launcher:launcher-client-starter-api:5.6.0-SNAPSHOT" implementation "pro.gravit.utils.enfs:enfs:2.0.1-SNAPSHOT" implementation 'io.netty:netty-codec-http:4.1.67.Final' implementation 'com.github.oshi:oshi-core:5.8.1' diff --git a/src/main/java/pro/gravit/launcher/client/JavaRuntimeModule.java b/src/main/java/pro/gravit/launcher/client/JavaRuntimeModule.java index d6f76ffd..3ce5b92a 100644 --- a/src/main/java/pro/gravit/launcher/client/JavaRuntimeModule.java +++ b/src/main/java/pro/gravit/launcher/client/JavaRuntimeModule.java @@ -1,19 +1,19 @@ package pro.gravit.launcher.client; import javafx.stage.Stage; -import pro.gravit.launcher.LauncherEngine; -import pro.gravit.launcher.client.events.ClientEngineInitPhase; -import pro.gravit.launcher.client.events.ClientExitPhase; -import pro.gravit.launcher.client.events.ClientPreGuiPhase; -import pro.gravit.launcher.client.events.ClientUnlockConsoleEvent; import pro.gravit.launcher.client.gui.JavaFXApplication; import pro.gravit.launcher.client.gui.service.OfflineService; -import pro.gravit.launcher.gui.RuntimeProvider; -import pro.gravit.launcher.modules.LauncherInitContext; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.modules.LauncherModuleInfo; -import pro.gravit.launcher.modules.events.OfflineModeEvent; -import pro.gravit.launcher.request.websockets.OfflineRequestService; +import pro.gravit.launcher.runtime.LauncherEngine; +import pro.gravit.launcher.runtime.client.events.ClientEngineInitPhase; +import pro.gravit.launcher.client.events.ClientExitPhase; +import pro.gravit.launcher.runtime.client.events.ClientPreGuiPhase; +import pro.gravit.launcher.client.events.ClientUnlockConsoleEvent; +import pro.gravit.launcher.runtime.gui.RuntimeProvider; +import pro.gravit.launcher.base.modules.LauncherInitContext; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModuleInfo; +import pro.gravit.launcher.base.modules.events.OfflineModeEvent; +import pro.gravit.launcher.base.request.websockets.OfflineRequestService; import pro.gravit.utils.Version; import pro.gravit.utils.helper.JVMHelper; import pro.gravit.utils.helper.LogHelper; diff --git a/src/main/java/pro/gravit/launcher/client/RuntimeSecurityService.java b/src/main/java/pro/gravit/launcher/client/RuntimeSecurityService.java index db3e0d97..29bde151 100644 --- a/src/main/java/pro/gravit/launcher/client/RuntimeSecurityService.java +++ b/src/main/java/pro/gravit/launcher/client/RuntimeSecurityService.java @@ -1,10 +1,10 @@ package pro.gravit.launcher.client; import pro.gravit.launcher.client.gui.JavaFXApplication; -import pro.gravit.launcher.request.secure.GetSecureLevelInfoRequest; -import pro.gravit.launcher.request.secure.HardwareReportRequest; -import pro.gravit.launcher.request.secure.VerifySecureLevelKeyRequest; -import pro.gravit.launcher.utils.HWIDProvider; +import pro.gravit.launcher.runtime.utils.HWIDProvider; +import pro.gravit.launcher.base.request.secure.GetSecureLevelInfoRequest; +import pro.gravit.launcher.base.request.secure.HardwareReportRequest; +import pro.gravit.launcher.base.request.secure.VerifySecureLevelKeyRequest; import pro.gravit.utils.helper.*; import java.io.IOException; diff --git a/src/main/java/pro/gravit/launcher/client/StdJavaRuntimeProvider.java b/src/main/java/pro/gravit/launcher/client/StdJavaRuntimeProvider.java index 7c50044d..842075fd 100644 --- a/src/main/java/pro/gravit/launcher/client/StdJavaRuntimeProvider.java +++ b/src/main/java/pro/gravit/launcher/client/StdJavaRuntimeProvider.java @@ -1,10 +1,10 @@ package pro.gravit.launcher.client; import javafx.application.Application; -import pro.gravit.launcher.LauncherEngine; import pro.gravit.launcher.client.gui.JavaFXApplication; -import pro.gravit.launcher.gui.RuntimeProvider; -import pro.gravit.launcher.utils.LauncherUpdater; +import pro.gravit.launcher.runtime.LauncherEngine; +import pro.gravit.launcher.runtime.gui.RuntimeProvider; +import pro.gravit.launcher.runtime.utils.LauncherUpdater; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.LogHelper; diff --git a/src/main/java/pro/gravit/launcher/client/gui/JavaFXApplication.java b/src/main/java/pro/gravit/launcher/client/gui/JavaFXApplication.java index 8eb5e640..7e403904 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/JavaFXApplication.java +++ b/src/main/java/pro/gravit/launcher/client/gui/JavaFXApplication.java @@ -6,11 +6,9 @@ import javafx.event.EventHandler; import javafx.stage.Stage; import javafx.stage.StageStyle; -import pro.gravit.launcher.*; -import pro.gravit.launcher.api.DialogService; +import pro.gravit.launcher.base.*; import pro.gravit.launcher.client.*; -import pro.gravit.launcher.client.events.ClientExitPhase; -import pro.gravit.launcher.client.events.ClientGuiPhase; +import pro.gravit.launcher.client.api.DialogService; import pro.gravit.launcher.client.gui.commands.RuntimeCommand; import pro.gravit.launcher.client.gui.commands.VersionCommand; import pro.gravit.launcher.client.gui.config.GuiModuleConfig; @@ -23,14 +21,20 @@ import pro.gravit.launcher.client.gui.stage.PrimaryStage; import pro.gravit.launcher.client.gui.utils.FXMLFactory; import pro.gravit.launcher.client.gui.utils.TriggerManager; -import pro.gravit.launcher.debug.DebugMain; -import pro.gravit.launcher.managers.ConsoleManager; -import pro.gravit.launcher.managers.SettingsManager; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.RequestService; -import pro.gravit.launcher.request.WebSocketEvent; -import pro.gravit.launcher.request.auth.AuthRequest; +import pro.gravit.launcher.runtime.LauncherEngine; +import pro.gravit.launcher.runtime.NewLauncherSettings; +import pro.gravit.launcher.runtime.client.DirBridge; +import pro.gravit.launcher.runtime.client.UserSettings; +import pro.gravit.launcher.client.events.ClientExitPhase; +import pro.gravit.launcher.runtime.client.events.ClientGuiPhase; +import pro.gravit.launcher.runtime.debug.DebugMain; +import pro.gravit.launcher.runtime.managers.ConsoleManager; +import pro.gravit.launcher.runtime.managers.SettingsManager; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.RequestService; +import pro.gravit.launcher.base.request.WebSocketEvent; +import pro.gravit.launcher.base.request.auth.AuthRequest; import pro.gravit.utils.command.BaseCommandCategory; import pro.gravit.utils.command.CommandCategory; import pro.gravit.utils.command.CommandHandler; @@ -138,7 +142,7 @@ public final void processRequest(String message, Requ public void start(Stage stage) { // If debugging try { - Class.forName("pro.gravit.launcher.debug.DebugMain", false, JavaFXApplication.class.getClassLoader()); + Class.forName("pro.gravit.launcher.runtime.debug.DebugMain", false, JavaFXApplication.class.getClassLoader()); if (DebugMain.IS_DEBUG.get()) { runtimeDirectory = IOHelper.WORKING_DIR.resolve("runtime"); debugMode = true; diff --git a/src/main/java/pro/gravit/launcher/client/gui/config/GuiModuleConfig.java b/src/main/java/pro/gravit/launcher/client/gui/config/GuiModuleConfig.java index fa661425..ffc93b28 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/config/GuiModuleConfig.java +++ b/src/main/java/pro/gravit/launcher/client/gui/config/GuiModuleConfig.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.client.gui.config; -import pro.gravit.launcher.LauncherInject; +import pro.gravit.launcher.core.LauncherInject; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/pro/gravit/launcher/client/gui/config/RuntimeSettings.java b/src/main/java/pro/gravit/launcher/client/gui/config/RuntimeSettings.java index b98a4e29..1c83f456 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/config/RuntimeSettings.java +++ b/src/main/java/pro/gravit/launcher/client/gui/config/RuntimeSettings.java @@ -1,12 +1,11 @@ package pro.gravit.launcher.client.gui.config; - -import pro.gravit.launcher.LauncherNetworkAPI; -import pro.gravit.launcher.client.DirBridge; -import pro.gravit.launcher.client.UserSettings; import pro.gravit.launcher.client.gui.service.JavaService; -import pro.gravit.launcher.events.request.GetAvailabilityAuthRequestEvent; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.request.auth.AuthRequest; +import pro.gravit.launcher.runtime.client.DirBridge; +import pro.gravit.launcher.runtime.client.UserSettings; +import pro.gravit.launcher.core.LauncherNetworkAPI; +import pro.gravit.launcher.base.events.request.GetAvailabilityAuthRequestEvent; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.request.auth.AuthRequest; import pro.gravit.utils.helper.JavaHelper; import java.nio.file.Path; diff --git a/src/main/java/pro/gravit/launcher/client/gui/config/StdSettingsManager.java b/src/main/java/pro/gravit/launcher/client/gui/config/StdSettingsManager.java index ac83a7a6..17c4cc2f 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/config/StdSettingsManager.java +++ b/src/main/java/pro/gravit/launcher/client/gui/config/StdSettingsManager.java @@ -1,8 +1,8 @@ package pro.gravit.launcher.client.gui.config; -import pro.gravit.launcher.NewLauncherSettings; import pro.gravit.launcher.client.JavaRuntimeModule; -import pro.gravit.launcher.managers.SettingsManager; +import pro.gravit.launcher.runtime.NewLauncherSettings; +import pro.gravit.launcher.runtime.managers.SettingsManager; public class StdSettingsManager extends SettingsManager { diff --git a/src/main/java/pro/gravit/launcher/client/gui/helper/EnFSHelper.java b/src/main/java/pro/gravit/launcher/client/gui/helper/EnFSHelper.java index c1428b9b..4600bdef 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/helper/EnFSHelper.java +++ b/src/main/java/pro/gravit/launcher/client/gui/helper/EnFSHelper.java @@ -1,7 +1,7 @@ package pro.gravit.launcher.client.gui.helper; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.LauncherConfig; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.LauncherConfig; import pro.gravit.launcher.client.gui.JavaFXApplication; import pro.gravit.launcher.client.gui.utils.RuntimeCryptedFile; import pro.gravit.utils.enfs.EnFS; diff --git a/src/main/java/pro/gravit/launcher/client/gui/impl/AbstractVisualComponent.java b/src/main/java/pro/gravit/launcher/client/gui/impl/AbstractVisualComponent.java index af63b15a..a88054f3 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/impl/AbstractVisualComponent.java +++ b/src/main/java/pro/gravit/launcher/client/gui/impl/AbstractVisualComponent.java @@ -14,8 +14,8 @@ import pro.gravit.launcher.client.gui.config.RuntimeSettings; import pro.gravit.launcher.client.gui.helper.LookupHelper; import pro.gravit.launcher.client.gui.utils.FXMLFactory; -import pro.gravit.launcher.request.RequestException; -import pro.gravit.launcher.request.auth.ExitRequest; +import pro.gravit.launcher.base.request.RequestException; +import pro.gravit.launcher.base.request.auth.ExitRequest; import pro.gravit.utils.helper.LogHelper; import java.util.concurrent.CompletableFuture; diff --git a/src/main/java/pro/gravit/launcher/client/gui/impl/GuiEventHandler.java b/src/main/java/pro/gravit/launcher/client/gui/impl/GuiEventHandler.java index a016eb03..180a945f 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/impl/GuiEventHandler.java +++ b/src/main/java/pro/gravit/launcher/client/gui/impl/GuiEventHandler.java @@ -7,12 +7,12 @@ import pro.gravit.launcher.client.gui.scenes.serverinfo.ServerInfoScene; import pro.gravit.launcher.client.gui.scenes.servermenu.ServerMenuScene; import pro.gravit.launcher.client.gui.scenes.settings.SettingsScene; -import pro.gravit.launcher.events.RequestEvent; -import pro.gravit.launcher.events.request.AuthRequestEvent; -import pro.gravit.launcher.events.request.ProfilesRequestEvent; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.request.RequestService; -import pro.gravit.launcher.request.WebSocketEvent; +import pro.gravit.launcher.base.events.RequestEvent; +import pro.gravit.launcher.base.events.request.AuthRequestEvent; +import pro.gravit.launcher.base.events.request.ProfilesRequestEvent; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.request.RequestService; +import pro.gravit.launcher.base.request.WebSocketEvent; import pro.gravit.utils.helper.LogHelper; import java.util.UUID; diff --git a/src/main/java/pro/gravit/launcher/client/gui/overlays/ProcessingOverlay.java b/src/main/java/pro/gravit/launcher/client/gui/overlays/ProcessingOverlay.java index 6039b14f..0c071152 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/overlays/ProcessingOverlay.java +++ b/src/main/java/pro/gravit/launcher/client/gui/overlays/ProcessingOverlay.java @@ -8,8 +8,8 @@ import pro.gravit.launcher.client.gui.impl.AbstractStage; import pro.gravit.launcher.client.gui.scenes.AbstractScene; import pro.gravit.launcher.client.gui.impl.ContextHelper; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.WebSocketEvent; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.WebSocketEvent; import pro.gravit.utils.helper.LogHelper; import java.io.IOException; diff --git a/src/main/java/pro/gravit/launcher/client/gui/overlays/UploadAssetOverlay.java b/src/main/java/pro/gravit/launcher/client/gui/overlays/UploadAssetOverlay.java index fc295c73..9e616aeb 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/overlays/UploadAssetOverlay.java +++ b/src/main/java/pro/gravit/launcher/client/gui/overlays/UploadAssetOverlay.java @@ -3,15 +3,15 @@ import javafx.scene.control.Button; import javafx.scene.control.CheckBox; import javafx.stage.FileChooser; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.base.Launcher; import pro.gravit.launcher.client.gui.JavaFXApplication; import pro.gravit.launcher.client.gui.helper.LookupHelper; -import pro.gravit.launcher.events.request.AssetUploadInfoRequestEvent; -import pro.gravit.launcher.profiles.Texture; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.RequestException; -import pro.gravit.launcher.request.cabinet.GetAssetUploadUrl; +import pro.gravit.launcher.core.LauncherNetworkAPI; +import pro.gravit.launcher.base.events.request.AssetUploadInfoRequestEvent; +import pro.gravit.launcher.base.profiles.Texture; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.RequestException; +import pro.gravit.launcher.base.request.cabinet.GetAssetUploadUrl; import pro.gravit.utils.helper.LogHelper; import pro.gravit.utils.helper.SecurityHelper; diff --git a/src/main/java/pro/gravit/launcher/client/gui/scenes/AbstractScene.java b/src/main/java/pro/gravit/launcher/client/gui/scenes/AbstractScene.java index 9b60a36e..159e330a 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/scenes/AbstractScene.java +++ b/src/main/java/pro/gravit/launcher/client/gui/scenes/AbstractScene.java @@ -8,8 +8,8 @@ import javafx.scene.control.MenuItem; import javafx.scene.layout.Pane; import javafx.scene.shape.Rectangle; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.LauncherConfig; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.LauncherConfig; import pro.gravit.launcher.client.gui.JavaFXApplication; import pro.gravit.launcher.client.gui.config.RuntimeSettings; import pro.gravit.launcher.client.gui.helper.LookupHelper; @@ -17,9 +17,9 @@ import pro.gravit.launcher.client.gui.impl.AbstractVisualComponent; import pro.gravit.launcher.client.gui.impl.ContextHelper; import pro.gravit.launcher.client.gui.overlays.AbstractOverlay; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.WebSocketEvent; -import pro.gravit.launcher.request.auth.ExitRequest; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.WebSocketEvent; +import pro.gravit.launcher.base.request.auth.ExitRequest; import pro.gravit.utils.helper.LogHelper; import java.util.function.Consumer; diff --git a/src/main/java/pro/gravit/launcher/client/gui/scenes/console/ConsoleScene.java b/src/main/java/pro/gravit/launcher/client/gui/scenes/console/ConsoleScene.java index 30f39efb..347e5665 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/scenes/console/ConsoleScene.java +++ b/src/main/java/pro/gravit/launcher/client/gui/scenes/console/ConsoleScene.java @@ -7,7 +7,7 @@ import pro.gravit.launcher.client.gui.JavaFXApplication; import pro.gravit.launcher.client.gui.helper.LookupHelper; import pro.gravit.launcher.client.gui.scenes.AbstractScene; -import pro.gravit.launcher.managers.ConsoleManager; +import pro.gravit.launcher.runtime.managers.ConsoleManager; import pro.gravit.utils.helper.LogHelper; public class ConsoleScene extends AbstractScene { diff --git a/src/main/java/pro/gravit/launcher/client/gui/scenes/debug/DebugScene.java b/src/main/java/pro/gravit/launcher/client/gui/scenes/debug/DebugScene.java index be86c49b..8d1a6be0 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/scenes/debug/DebugScene.java +++ b/src/main/java/pro/gravit/launcher/client/gui/scenes/debug/DebugScene.java @@ -5,8 +5,7 @@ import javafx.scene.control.TextArea; import javafx.scene.input.Clipboard; import javafx.scene.input.ClipboardContent; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.base.Launcher; import pro.gravit.launcher.client.JavaRuntimeModule; import pro.gravit.launcher.client.gui.JavaFXApplication; import pro.gravit.launcher.client.gui.helper.LookupHelper; diff --git a/src/main/java/pro/gravit/launcher/client/gui/scenes/login/LoginScene.java b/src/main/java/pro/gravit/launcher/client/gui/scenes/login/LoginScene.java index 2a165a54..f80621f7 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/scenes/login/LoginScene.java +++ b/src/main/java/pro/gravit/launcher/client/gui/scenes/login/LoginScene.java @@ -7,34 +7,32 @@ import javafx.scene.layout.Pane; import javafx.scene.text.Text; import javafx.util.StringConverter; -import pro.gravit.launcher.LauncherEngine; import pro.gravit.launcher.client.StdJavaRuntimeProvider; -import pro.gravit.launcher.client.events.ClientExitPhase; import pro.gravit.launcher.client.gui.JavaFXApplication; import pro.gravit.launcher.client.gui.helper.LookupHelper; import pro.gravit.launcher.client.gui.impl.AbstractVisualComponent; import pro.gravit.launcher.client.gui.overlays.AbstractOverlay; import pro.gravit.launcher.client.gui.scenes.AbstractScene; import pro.gravit.launcher.client.gui.scenes.login.methods.*; -import pro.gravit.launcher.client.gui.service.AuthService; -import pro.gravit.launcher.events.request.AuthRequestEvent; -import pro.gravit.launcher.events.request.GetAvailabilityAuthRequestEvent; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.profiles.Texture; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.RequestException; -import pro.gravit.launcher.request.WebSocketEvent; -import pro.gravit.launcher.request.auth.AuthRequest; -import pro.gravit.launcher.request.auth.GetAvailabilityAuthRequest; -import pro.gravit.launcher.request.auth.RefreshTokenRequest; -import pro.gravit.launcher.request.auth.details.AuthLoginOnlyDetails; -import pro.gravit.launcher.request.auth.details.AuthPasswordDetails; -import pro.gravit.launcher.request.auth.details.AuthTotpDetails; -import pro.gravit.launcher.request.auth.details.AuthWebViewDetails; -import pro.gravit.launcher.request.auth.password.*; -import pro.gravit.launcher.request.update.LauncherRequest; -import pro.gravit.launcher.request.update.ProfilesRequest; -import pro.gravit.launcher.utils.LauncherUpdater; +import pro.gravit.launcher.runtime.LauncherEngine; +import pro.gravit.launcher.client.events.ClientExitPhase; +import pro.gravit.launcher.runtime.utils.LauncherUpdater; +import pro.gravit.launcher.base.events.request.AuthRequestEvent; +import pro.gravit.launcher.base.events.request.GetAvailabilityAuthRequestEvent; +import pro.gravit.launcher.base.profiles.Texture; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.RequestException; +import pro.gravit.launcher.base.request.WebSocketEvent; +import pro.gravit.launcher.base.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.GetAvailabilityAuthRequest; +import pro.gravit.launcher.base.request.auth.RefreshTokenRequest; +import pro.gravit.launcher.base.request.auth.details.AuthLoginOnlyDetails; +import pro.gravit.launcher.base.request.auth.details.AuthPasswordDetails; +import pro.gravit.launcher.base.request.auth.details.AuthTotpDetails; +import pro.gravit.launcher.base.request.auth.details.AuthWebViewDetails; +import pro.gravit.launcher.base.request.auth.password.*; +import pro.gravit.launcher.base.request.update.LauncherRequest; +import pro.gravit.launcher.base.request.update.ProfilesRequest; import pro.gravit.utils.helper.LogHelper; import java.net.URL; diff --git a/src/main/java/pro/gravit/launcher/client/gui/scenes/login/methods/AbstractAuthMethod.java b/src/main/java/pro/gravit/launcher/client/gui/scenes/login/methods/AbstractAuthMethod.java index 73454ff9..3c02de8a 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/scenes/login/methods/AbstractAuthMethod.java +++ b/src/main/java/pro/gravit/launcher/client/gui/scenes/login/methods/AbstractAuthMethod.java @@ -1,7 +1,7 @@ package pro.gravit.launcher.client.gui.scenes.login.methods; import pro.gravit.launcher.client.gui.scenes.login.LoginScene; -import pro.gravit.launcher.events.request.GetAvailabilityAuthRequestEvent; +import pro.gravit.launcher.base.events.request.GetAvailabilityAuthRequestEvent; import java.util.concurrent.CompletableFuture; diff --git a/src/main/java/pro/gravit/launcher/client/gui/scenes/login/methods/LoginAndPasswordAuthMethod.java b/src/main/java/pro/gravit/launcher/client/gui/scenes/login/methods/LoginAndPasswordAuthMethod.java index a5ac7578..bf8008c4 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/scenes/login/methods/LoginAndPasswordAuthMethod.java +++ b/src/main/java/pro/gravit/launcher/client/gui/scenes/login/methods/LoginAndPasswordAuthMethod.java @@ -7,8 +7,8 @@ import pro.gravit.launcher.client.gui.impl.ContextHelper; import pro.gravit.launcher.client.gui.scenes.login.LoginAuthButtonComponent; import pro.gravit.launcher.client.gui.scenes.login.LoginScene; -import pro.gravit.launcher.request.auth.AuthRequest; -import pro.gravit.launcher.request.auth.details.AuthPasswordDetails; +import pro.gravit.launcher.base.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.details.AuthPasswordDetails; import pro.gravit.utils.helper.LogHelper; import java.util.concurrent.CompletableFuture; diff --git a/src/main/java/pro/gravit/launcher/client/gui/scenes/login/methods/LoginOnlyAuthMethod.java b/src/main/java/pro/gravit/launcher/client/gui/scenes/login/methods/LoginOnlyAuthMethod.java index 78dca367..0bcd8cc1 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/scenes/login/methods/LoginOnlyAuthMethod.java +++ b/src/main/java/pro/gravit/launcher/client/gui/scenes/login/methods/LoginOnlyAuthMethod.java @@ -8,7 +8,7 @@ import pro.gravit.launcher.client.gui.impl.ContextHelper; import pro.gravit.launcher.client.gui.scenes.login.LoginAuthButtonComponent; import pro.gravit.launcher.client.gui.scenes.login.LoginScene; -import pro.gravit.launcher.request.auth.details.AuthLoginOnlyDetails; +import pro.gravit.launcher.base.request.auth.details.AuthLoginOnlyDetails; import pro.gravit.utils.helper.LogHelper; import java.util.concurrent.CompletableFuture; diff --git a/src/main/java/pro/gravit/launcher/client/gui/scenes/login/methods/TotpAuthMethod.java b/src/main/java/pro/gravit/launcher/client/gui/scenes/login/methods/TotpAuthMethod.java index ede19c2e..56af4d6e 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/scenes/login/methods/TotpAuthMethod.java +++ b/src/main/java/pro/gravit/launcher/client/gui/scenes/login/methods/TotpAuthMethod.java @@ -6,8 +6,8 @@ import pro.gravit.launcher.client.gui.impl.AbstractVisualComponent; import pro.gravit.launcher.client.gui.impl.ContextHelper; import pro.gravit.launcher.client.gui.scenes.login.LoginScene; -import pro.gravit.launcher.request.auth.details.AuthTotpDetails; -import pro.gravit.launcher.request.auth.password.AuthTOTPPassword; +import pro.gravit.launcher.base.request.auth.details.AuthTotpDetails; +import pro.gravit.launcher.base.request.auth.password.AuthTOTPPassword; import java.util.concurrent.CompletableFuture; diff --git a/src/main/java/pro/gravit/launcher/client/gui/scenes/login/methods/WebAuthMethod.java b/src/main/java/pro/gravit/launcher/client/gui/scenes/login/methods/WebAuthMethod.java index 8ec53f94..6eab15e6 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/scenes/login/methods/WebAuthMethod.java +++ b/src/main/java/pro/gravit/launcher/client/gui/scenes/login/methods/WebAuthMethod.java @@ -10,8 +10,8 @@ import pro.gravit.launcher.client.gui.helper.LookupHelper; import pro.gravit.launcher.client.gui.overlays.AbstractOverlay; import pro.gravit.launcher.client.gui.scenes.login.LoginScene; -import pro.gravit.launcher.request.auth.details.AuthWebViewDetails; -import pro.gravit.launcher.request.auth.password.AuthCodePassword; +import pro.gravit.launcher.base.request.auth.details.AuthWebViewDetails; +import pro.gravit.launcher.base.request.auth.password.AuthCodePassword; import pro.gravit.utils.helper.LogHelper; import java.util.concurrent.CompletableFuture; diff --git a/src/main/java/pro/gravit/launcher/client/gui/scenes/options/OptionsScene.java b/src/main/java/pro/gravit/launcher/client/gui/scenes/options/OptionsScene.java index c94b7b84..e7ac8b1b 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/scenes/options/OptionsScene.java +++ b/src/main/java/pro/gravit/launcher/client/gui/scenes/options/OptionsScene.java @@ -8,6 +8,8 @@ import javafx.scene.layout.HBox; import javafx.scene.layout.Pane; import javafx.scene.layout.VBox; +import pro.gravit.launcher.base.events.request.GetAssetUploadUrlRequestEvent; +import pro.gravit.launcher.base.request.cabinet.AssetUploadInfoRequest; import pro.gravit.launcher.client.gui.JavaFXApplication; import pro.gravit.launcher.client.gui.config.DesignConstants; import pro.gravit.launcher.client.gui.helper.LookupHelper; @@ -15,12 +17,10 @@ import pro.gravit.launcher.client.gui.scenes.servermenu.ServerButton; import pro.gravit.launcher.client.gui.scenes.servermenu.ServerMenuScene; import pro.gravit.launcher.client.gui.utils.JavaFxUtils; -import pro.gravit.launcher.events.request.GetAssetUploadUrlRequestEvent; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.profiles.optional.OptionalFile; -import pro.gravit.launcher.profiles.optional.OptionalView; -import pro.gravit.launcher.request.cabinet.AssetUploadInfoRequest; import pro.gravit.utils.helper.LogHelper; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.optional.OptionalFile; +import pro.gravit.launcher.base.profiles.optional.OptionalView; import java.util.*; import java.util.function.Consumer; diff --git a/src/main/java/pro/gravit/launcher/client/gui/scenes/serverinfo/ServerInfoScene.java b/src/main/java/pro/gravit/launcher/client/gui/scenes/serverinfo/ServerInfoScene.java index 5e83622d..f1c910cd 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/scenes/serverinfo/ServerInfoScene.java +++ b/src/main/java/pro/gravit/launcher/client/gui/scenes/serverinfo/ServerInfoScene.java @@ -8,6 +8,8 @@ import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.layout.Pane; +import pro.gravit.launcher.base.events.request.GetAssetUploadUrlRequestEvent; +import pro.gravit.launcher.base.request.cabinet.AssetUploadInfoRequest; import pro.gravit.launcher.client.gui.JavaFXApplication; import pro.gravit.launcher.client.gui.config.DesignConstants; import pro.gravit.launcher.client.gui.helper.LookupHelper; @@ -15,9 +17,7 @@ import pro.gravit.launcher.client.gui.scenes.servermenu.ServerButton; import pro.gravit.launcher.client.gui.scenes.servermenu.ServerMenuScene; import pro.gravit.launcher.client.gui.utils.JavaFxUtils; -import pro.gravit.launcher.events.request.GetAssetUploadUrlRequestEvent; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.request.cabinet.AssetUploadInfoRequest; +import pro.gravit.launcher.base.profiles.ClientProfile; import pro.gravit.utils.helper.*; public class ServerInfoScene extends AbstractScene { diff --git a/src/main/java/pro/gravit/launcher/client/gui/scenes/servermenu/ServerButton.java b/src/main/java/pro/gravit/launcher/client/gui/scenes/servermenu/ServerButton.java index 83e9fcdc..045a3edd 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/scenes/servermenu/ServerButton.java +++ b/src/main/java/pro/gravit/launcher/client/gui/scenes/servermenu/ServerButton.java @@ -11,7 +11,7 @@ import pro.gravit.launcher.client.gui.helper.LookupHelper; import pro.gravit.launcher.client.gui.impl.AbstractVisualComponent; import pro.gravit.launcher.client.gui.utils.JavaFxUtils; -import pro.gravit.launcher.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.ClientProfile; import pro.gravit.utils.helper.LogHelper; import java.net.URL; diff --git a/src/main/java/pro/gravit/launcher/client/gui/scenes/servermenu/ServerMenuScene.java b/src/main/java/pro/gravit/launcher/client/gui/scenes/servermenu/ServerMenuScene.java index 32ade064..1f380227 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/scenes/servermenu/ServerMenuScene.java +++ b/src/main/java/pro/gravit/launcher/client/gui/scenes/servermenu/ServerMenuScene.java @@ -9,15 +9,15 @@ import javafx.scene.input.MouseButton; import javafx.scene.input.MouseEvent; import javafx.scene.layout.HBox; -import pro.gravit.launcher.client.ServerPinger; import pro.gravit.launcher.client.gui.JavaFXApplication; import pro.gravit.launcher.client.gui.config.DesignConstants; import pro.gravit.launcher.client.gui.helper.LookupHelper; import pro.gravit.launcher.client.gui.scenes.AbstractScene; import pro.gravit.launcher.client.gui.utils.JavaFxUtils; -import pro.gravit.launcher.events.request.GetAssetUploadUrlRequestEvent; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.request.cabinet.AssetUploadInfoRequest; +import pro.gravit.launcher.runtime.client.ServerPinger; +import pro.gravit.launcher.base.events.request.GetAssetUploadUrlRequestEvent; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.request.cabinet.AssetUploadInfoRequest; import pro.gravit.utils.helper.CommonHelper; import pro.gravit.utils.helper.LogHelper; diff --git a/src/main/java/pro/gravit/launcher/client/gui/scenes/settings/JavaSelectorComponent.java b/src/main/java/pro/gravit/launcher/client/gui/scenes/settings/JavaSelectorComponent.java index 64db684d..f7f57574 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/scenes/settings/JavaSelectorComponent.java +++ b/src/main/java/pro/gravit/launcher/client/gui/scenes/settings/JavaSelectorComponent.java @@ -8,7 +8,7 @@ import pro.gravit.launcher.client.gui.config.RuntimeSettings; import pro.gravit.launcher.client.gui.helper.LookupHelper; import pro.gravit.launcher.client.gui.service.JavaService; -import pro.gravit.launcher.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.ClientProfile; import pro.gravit.utils.helper.JavaHelper; import pro.gravit.utils.helper.LogHelper; diff --git a/src/main/java/pro/gravit/launcher/client/gui/scenes/settings/SettingsScene.java b/src/main/java/pro/gravit/launcher/client/gui/scenes/settings/SettingsScene.java index afc5a27c..df9e655e 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/scenes/settings/SettingsScene.java +++ b/src/main/java/pro/gravit/launcher/client/gui/scenes/settings/SettingsScene.java @@ -9,7 +9,8 @@ import javafx.stage.DirectoryChooser; import javafx.util.StringConverter; import oshi.SystemInfo; -import pro.gravit.launcher.client.DirBridge; +import pro.gravit.launcher.base.events.request.GetAssetUploadUrlRequestEvent; +import pro.gravit.launcher.base.request.cabinet.AssetUploadInfoRequest; import pro.gravit.launcher.client.gui.JavaFXApplication; import pro.gravit.launcher.client.gui.config.DesignConstants; import pro.gravit.launcher.client.gui.config.RuntimeSettings; @@ -19,9 +20,9 @@ import pro.gravit.launcher.client.gui.scenes.servermenu.ServerMenuScene; import pro.gravit.launcher.client.gui.stage.ConsoleStage; import pro.gravit.launcher.client.gui.utils.JavaFxUtils; -import pro.gravit.launcher.events.request.GetAssetUploadUrlRequestEvent; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.request.cabinet.AssetUploadInfoRequest; +import pro.gravit.launcher.client.gui.utils.SystemMemory; +import pro.gravit.launcher.runtime.client.DirBridge; +import pro.gravit.launcher.base.profiles.ClientProfile; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.JVMHelper; import pro.gravit.utils.helper.LogHelper; @@ -82,9 +83,12 @@ protected void doInit() { try { SystemInfo systemInfo = new SystemInfo(); maxSystemMemory = (systemInfo.getHardware().getMemory().getTotal() >> 20); - } catch (Throwable e) { - LogHelper.error(e); - maxSystemMemory = 2048; + } catch (Throwable ignored) { + try { + maxSystemMemory = SystemMemory.getPhysicalMemorySize(); + } catch (Throwable ignored1) { + maxSystemMemory = 2048; + } } ramSlider.setMax(Math.min(maxSystemMemory, getJavaMaxMemory())); diff --git a/src/main/java/pro/gravit/launcher/client/gui/scenes/update/UpdateScene.java b/src/main/java/pro/gravit/launcher/client/gui/scenes/update/UpdateScene.java index 1199e0d0..a6fcc56a 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/scenes/update/UpdateScene.java +++ b/src/main/java/pro/gravit/launcher/client/gui/scenes/update/UpdateScene.java @@ -5,14 +5,13 @@ import pro.gravit.launcher.client.gui.JavaFXApplication; import pro.gravit.launcher.client.gui.helper.LookupHelper; import pro.gravit.launcher.client.gui.scenes.AbstractScene; -import pro.gravit.launcher.hasher.FileNameMatcher; -import pro.gravit.launcher.hasher.HashedDir; -import pro.gravit.launcher.profiles.optional.OptionalView; +import pro.gravit.launcher.core.hasher.FileNameMatcher; +import pro.gravit.launcher.core.hasher.HashedDir; +import pro.gravit.launcher.base.profiles.optional.OptionalView; import pro.gravit.utils.helper.LogHelper; import java.nio.file.Path; import java.util.concurrent.CompletionException; -import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; public class UpdateScene extends AbstractScene { diff --git a/src/main/java/pro/gravit/launcher/client/gui/scenes/update/VisualDownloader.java b/src/main/java/pro/gravit/launcher/client/gui/scenes/update/VisualDownloader.java index b2cd5de7..a752d9e7 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/scenes/update/VisualDownloader.java +++ b/src/main/java/pro/gravit/launcher/client/gui/scenes/update/VisualDownloader.java @@ -3,18 +3,18 @@ import javafx.beans.property.DoubleProperty; import javafx.scene.control.Label; import javafx.scene.control.ProgressBar; +import pro.gravit.launcher.base.Downloader; import pro.gravit.launcher.client.gui.JavaFXApplication; import pro.gravit.launcher.client.gui.impl.ContextHelper; import pro.gravit.launcher.client.gui.utils.AssetIndexHelper; -import pro.gravit.launcher.hasher.FileNameMatcher; -import pro.gravit.launcher.hasher.HashedDir; -import pro.gravit.launcher.hasher.HashedEntry; -import pro.gravit.launcher.hasher.HashedFile; -import pro.gravit.launcher.modern.Downloader; -import pro.gravit.launcher.profiles.optional.OptionalView; -import pro.gravit.launcher.profiles.optional.actions.OptionalAction; -import pro.gravit.launcher.profiles.optional.actions.OptionalActionFile; -import pro.gravit.launcher.request.update.UpdateRequest; +import pro.gravit.launcher.core.hasher.FileNameMatcher; +import pro.gravit.launcher.core.hasher.HashedDir; +import pro.gravit.launcher.core.hasher.HashedEntry; +import pro.gravit.launcher.core.hasher.HashedFile; +import pro.gravit.launcher.base.profiles.optional.OptionalView; +import pro.gravit.launcher.base.profiles.optional.actions.OptionalAction; +import pro.gravit.launcher.base.profiles.optional.actions.OptionalActionFile; +import pro.gravit.launcher.base.request.update.UpdateRequest; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.LogHelper; diff --git a/src/main/java/pro/gravit/launcher/client/gui/service/AuthService.java b/src/main/java/pro/gravit/launcher/client/gui/service/AuthService.java index d90f3254..7a01eb8f 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/service/AuthService.java +++ b/src/main/java/pro/gravit/launcher/client/gui/service/AuthService.java @@ -1,14 +1,14 @@ package pro.gravit.launcher.client.gui.service; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.LauncherConfig; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.LauncherConfig; import pro.gravit.launcher.client.gui.JavaFXApplication; -import pro.gravit.launcher.events.request.AuthRequestEvent; -import pro.gravit.launcher.events.request.GetAvailabilityAuthRequestEvent; -import pro.gravit.launcher.profiles.PlayerProfile; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.auth.AuthRequest; -import pro.gravit.launcher.request.auth.password.*; +import pro.gravit.launcher.base.events.request.AuthRequestEvent; +import pro.gravit.launcher.base.events.request.GetAvailabilityAuthRequestEvent; +import pro.gravit.launcher.base.profiles.PlayerProfile; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.password.*; import pro.gravit.utils.helper.SecurityHelper; import java.util.ArrayList; diff --git a/src/main/java/pro/gravit/launcher/client/gui/service/JavaService.java b/src/main/java/pro/gravit/launcher/client/gui/service/JavaService.java index 1269672b..c65c0d9b 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/service/JavaService.java +++ b/src/main/java/pro/gravit/launcher/client/gui/service/JavaService.java @@ -1,8 +1,8 @@ package pro.gravit.launcher.client.gui.service; -import pro.gravit.launcher.client.DirBridge; import pro.gravit.launcher.client.gui.JavaFXApplication; -import pro.gravit.launcher.profiles.ClientProfile; +import pro.gravit.launcher.runtime.client.DirBridge; +import pro.gravit.launcher.base.profiles.ClientProfile; import pro.gravit.utils.helper.JVMHelper; import pro.gravit.utils.helper.JavaHelper; import pro.gravit.utils.helper.LogHelper; diff --git a/src/main/java/pro/gravit/launcher/client/gui/service/LaunchService.java b/src/main/java/pro/gravit/launcher/client/gui/service/LaunchService.java index 7d98acee..b1655577 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/service/LaunchService.java +++ b/src/main/java/pro/gravit/launcher/client/gui/service/LaunchService.java @@ -1,35 +1,28 @@ package pro.gravit.launcher.client.gui.service; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.LauncherEngine; -import pro.gravit.launcher.client.ClientLauncherProcess; -import pro.gravit.launcher.client.DirBridge; +import pro.gravit.launcher.base.Launcher; import pro.gravit.launcher.client.gui.JavaFXApplication; import pro.gravit.launcher.client.gui.config.RuntimeSettings; import pro.gravit.launcher.client.gui.impl.AbstractStage; import pro.gravit.launcher.client.gui.impl.ContextHelper; -import pro.gravit.launcher.client.gui.scenes.debug.DebugScene; -import pro.gravit.launcher.hasher.HashedDir; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.profiles.ClientProfileVersions; -import pro.gravit.launcher.profiles.optional.OptionalView; -import pro.gravit.launcher.request.auth.SetProfileRequest; +import pro.gravit.launcher.runtime.client.ClientLauncherProcess; +import pro.gravit.launcher.runtime.client.DirBridge; +import pro.gravit.launcher.core.hasher.HashedDir; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.ClientProfileVersions; +import pro.gravit.launcher.base.profiles.optional.OptionalView; +import pro.gravit.launcher.base.request.auth.SetProfileRequest; import pro.gravit.utils.helper.*; import java.io.EOFException; -import java.io.IOException; import java.io.InputStream; import java.net.InetSocketAddress; -import java.net.http.HttpResponse; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.List; import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; import java.util.function.Consumer; public class LaunchService { diff --git a/src/main/java/pro/gravit/launcher/client/gui/service/OfflineService.java b/src/main/java/pro/gravit/launcher/client/gui/service/OfflineService.java index 34235914..f4b6cfad 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/service/OfflineService.java +++ b/src/main/java/pro/gravit/launcher/client/gui/service/OfflineService.java @@ -1,17 +1,17 @@ package pro.gravit.launcher.client.gui.service; -import pro.gravit.launcher.ClientPermissions; -import pro.gravit.launcher.client.DirBridge; +import pro.gravit.launcher.base.ClientPermissions; import pro.gravit.launcher.client.gui.JavaFXApplication; -import pro.gravit.launcher.events.request.AuthRequestEvent; -import pro.gravit.launcher.events.request.ProfilesRequestEvent; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.profiles.PlayerProfile; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.auth.AuthRequest; -import pro.gravit.launcher.request.auth.password.AuthOAuthPassword; -import pro.gravit.launcher.request.update.ProfilesRequest; -import pro.gravit.launcher.request.websockets.OfflineRequestService; +import pro.gravit.launcher.runtime.client.DirBridge; +import pro.gravit.launcher.base.events.request.AuthRequestEvent; +import pro.gravit.launcher.base.events.request.ProfilesRequestEvent; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.PlayerProfile; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.password.AuthOAuthPassword; +import pro.gravit.launcher.base.request.update.ProfilesRequest; +import pro.gravit.launcher.base.request.websockets.OfflineRequestService; import pro.gravit.utils.helper.SecurityHelper; import java.nio.charset.StandardCharsets; diff --git a/src/main/java/pro/gravit/launcher/client/gui/service/PingService.java b/src/main/java/pro/gravit/launcher/client/gui/service/PingService.java index 958bfddc..c70d980f 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/service/PingService.java +++ b/src/main/java/pro/gravit/launcher/client/gui/service/PingService.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.client.gui.service; -import pro.gravit.launcher.client.ServerPinger; +import pro.gravit.launcher.runtime.client.ServerPinger; import java.util.Map; import java.util.concurrent.CompletableFuture; diff --git a/src/main/java/pro/gravit/launcher/client/gui/service/ProfilesService.java b/src/main/java/pro/gravit/launcher/client/gui/service/ProfilesService.java index 9c41795a..1bf8b0ef 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/service/ProfilesService.java +++ b/src/main/java/pro/gravit/launcher/client/gui/service/ProfilesService.java @@ -1,14 +1,14 @@ package pro.gravit.launcher.client.gui.service; import com.google.gson.reflect.TypeToken; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.LauncherNetworkAPI; -import pro.gravit.launcher.client.DirBridge; +import pro.gravit.launcher.base.Launcher; import pro.gravit.launcher.client.gui.JavaFXApplication; -import pro.gravit.launcher.events.request.ProfilesRequestEvent; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.profiles.optional.OptionalFile; -import pro.gravit.launcher.profiles.optional.OptionalView; +import pro.gravit.launcher.runtime.client.DirBridge; +import pro.gravit.launcher.core.LauncherNetworkAPI; +import pro.gravit.launcher.base.events.request.ProfilesRequestEvent; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.optional.OptionalFile; +import pro.gravit.launcher.base.profiles.optional.OptionalView; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.LogHelper; diff --git a/src/main/java/pro/gravit/launcher/client/gui/service/RuntimeDialogService.java b/src/main/java/pro/gravit/launcher/client/gui/service/RuntimeDialogService.java index dd09dc95..c7e9b789 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/service/RuntimeDialogService.java +++ b/src/main/java/pro/gravit/launcher/client/gui/service/RuntimeDialogService.java @@ -1,8 +1,8 @@ package pro.gravit.launcher.client.gui.service; -import pro.gravit.launcher.api.DialogService; +import pro.gravit.launcher.client.api.DialogService; import pro.gravit.launcher.client.gui.impl.MessageManager; -import pro.gravit.launcher.events.NotificationEvent; +import pro.gravit.launcher.base.events.NotificationEvent; import java.util.function.Consumer; diff --git a/src/main/java/pro/gravit/launcher/client/gui/utils/AssetIndexHelper.java b/src/main/java/pro/gravit/launcher/client/gui/utils/AssetIndexHelper.java index efb6e757..67a9c11c 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/utils/AssetIndexHelper.java +++ b/src/main/java/pro/gravit/launcher/client/gui/utils/AssetIndexHelper.java @@ -1,9 +1,9 @@ package pro.gravit.launcher.client.gui.utils; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.LauncherNetworkAPI; -import pro.gravit.launcher.hasher.HashedDir; -import pro.gravit.launcher.hasher.HashedEntry; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.core.LauncherNetworkAPI; +import pro.gravit.launcher.core.hasher.HashedDir; +import pro.gravit.launcher.core.hasher.HashedEntry; import pro.gravit.utils.helper.IOHelper; import java.io.IOException; diff --git a/src/main/java/pro/gravit/launcher/client/gui/utils/SystemMemory.java b/src/main/java/pro/gravit/launcher/client/gui/utils/SystemMemory.java new file mode 100644 index 00000000..a8850f33 --- /dev/null +++ b/src/main/java/pro/gravit/launcher/client/gui/utils/SystemMemory.java @@ -0,0 +1,10 @@ +package pro.gravit.launcher.client.gui.utils; + +import com.sun.management.OperatingSystemMXBean; + +public class SystemMemory { + private static final OperatingSystemMXBean systemMXBean = (OperatingSystemMXBean) java.lang.management.ManagementFactory.getOperatingSystemMXBean(); + public static long getPhysicalMemorySize() { + return systemMXBean.getTotalMemorySize(); + } +} diff --git a/src/main/java/pro/gravit/launcher/client/gui/utils/TriggerManager.java b/src/main/java/pro/gravit/launcher/client/gui/utils/TriggerManager.java index da2255dd..a81e5e9d 100644 --- a/src/main/java/pro/gravit/launcher/client/gui/utils/TriggerManager.java +++ b/src/main/java/pro/gravit/launcher/client/gui/utils/TriggerManager.java @@ -2,11 +2,11 @@ import pro.gravit.launcher.client.gui.JavaFXApplication; import pro.gravit.launcher.client.gui.config.RuntimeSettings; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.profiles.optional.OptionalFile; -import pro.gravit.launcher.profiles.optional.OptionalView; -import pro.gravit.launcher.profiles.optional.triggers.OptionalTrigger; -import pro.gravit.launcher.profiles.optional.triggers.OptionalTriggerContext; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.optional.OptionalFile; +import pro.gravit.launcher.base.profiles.optional.OptionalView; +import pro.gravit.launcher.base.profiles.optional.triggers.OptionalTrigger; +import pro.gravit.launcher.base.profiles.optional.triggers.OptionalTriggerContext; import pro.gravit.utils.helper.JavaHelper; import java.util.Locale;