From 93c5d6c56bd98da692dc20f0a43f586f2261969c Mon Sep 17 00:00:00 2001 From: Alessandro Autiero Date: Mon, 3 Jun 2024 16:27:52 +0200 Subject: [PATCH] Stuff --- cli/lib/src/game.dart | 2 +- cli/lib/src/reboot.dart | 6 +++--- common/lib/src/model/dll.dart | 2 +- common/lib/src/util/dll.dart | 1 + gui/dependencies/dlls/{memoryFix.dll => memory.dll} | Bin gui/lib/src/controller/settings_controller.dart | 2 +- gui/lib/src/util/dll.dart | 2 +- gui/lib/src/widget/game_start_button.dart | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) rename gui/dependencies/dlls/{memoryFix.dll => memory.dll} (100%) diff --git a/cli/lib/src/game.dart b/cli/lib/src/game.dart index 9703991..f3ad267 100644 --- a/cli/lib/src/game.dart +++ b/cli/lib/src/game.dart @@ -70,7 +70,7 @@ void _onGameOutput(String line, String dll, bool hosting, bool verbose) { _injectOrShowError("console.dll"); } - _injectOrShowError("memoryFix.dll"); + _injectOrShowError("memory.dll"); } } diff --git a/cli/lib/src/reboot.dart b/cli/lib/src/reboot.dart index c7538e3..93ca9c9 100644 --- a/cli/lib/src/reboot.dart +++ b/cli/lib/src/reboot.dart @@ -7,7 +7,7 @@ import 'package:reboot_common/common.dart'; // TODO: Use github const String _baseDownload = "https://cdn.discordapp.com/attachments/1095351875961901057/1110968021373169674/cobalt.dll"; const String _consoleDownload = "https://cdn.discordapp.com/attachments/1095351875961901057/1110968095033524234/console.dll"; -const String _memoryFixDownload = "https://cdn.discordapp.com/attachments/1095351875961901057/1110968141556756581/memoryFix.dll"; +const String _memoryFixDownload = "https://cdn.discordapp.com/attachments/1095351875961901057/1110968141556756581/memory.dll"; const String _embeddedConfigDownload = "https://cdn.discordapp.com/attachments/1026121175878881290/1040679319351066644/embedded.zip"; Future downloadRequiredDLLs() async { @@ -32,11 +32,11 @@ Future downloadRequiredDLLs() async { await craniumDll.writeAsBytes(response.bodyBytes); } - var memoryFixDll = File("${dllsDirectory.path}\\memoryFix.dll"); + var memoryFixDll = File("${dllsDirectory.path}\\memory.dll"); if(!memoryFixDll.existsSync()){ var response = await http.get(Uri.parse(_memoryFixDownload)); if(response.statusCode != 200){ - throw Exception("Cannot download memoryFix.dll"); + throw Exception("Cannot download memory.dll"); } await memoryFixDll.writeAsBytes(response.bodyBytes); diff --git a/common/lib/src/model/dll.dart b/common/lib/src/model/dll.dart index e02bea6..dcefa86 100644 --- a/common/lib/src/model/dll.dart +++ b/common/lib/src/model/dll.dart @@ -2,5 +2,5 @@ enum InjectableDll { console, cobalt, reboot, - memoryFix + memory } diff --git a/common/lib/src/util/dll.dart b/common/lib/src/util/dll.dart index f0e20d7..abdbd13 100644 --- a/common/lib/src/util/dll.dart +++ b/common/lib/src/util/dll.dart @@ -18,6 +18,7 @@ Future hasRebootDllUpdate(int? lastUpdateMs, {int hours = 24, bool force = } Future downloadCriticalDll(String name, String outputPath) async { + print("https://github.com/Auties00/reboot_launcher/raw/master/gui/dependencies/dlls/$name"); final response = await http.get(Uri.parse("https://github.com/Auties00/reboot_launcher/raw/master/gui/dependencies/dlls/$name")); if(response.statusCode != 200) { throw Exception("Cannot download $name: status code ${response.statusCode}"); diff --git a/gui/dependencies/dlls/memoryFix.dll b/gui/dependencies/dlls/memory.dll similarity index 100% rename from gui/dependencies/dlls/memoryFix.dll rename to gui/dependencies/dlls/memory.dll diff --git a/gui/lib/src/controller/settings_controller.dart b/gui/lib/src/controller/settings_controller.dart index 610cf8c..3f1a0f2 100644 --- a/gui/lib/src/controller/settings_controller.dart +++ b/gui/lib/src/controller/settings_controller.dart @@ -26,7 +26,7 @@ class SettingsController extends GetxController { gameServerDll = _createController("game_server", "reboot.dll"); unrealEngineConsoleDll = _createController("unreal_engine_console", "console.dll"); backendDll = _createController("backend", "cobalt.dll"); - memoryLeakDll = _createController("memory_leak", "memoryFix.dll"); + memoryLeakDll = _createController("memory_leak", "memory.dll"); gameServerPort = TextEditingController(text: _storage.read("game_server_port") ?? kDefaultGameServerPort); gameServerPort.addListener(() => _storage.write("game_server_port", gameServerPort.text)); width = _storage.read("width") ?? kDefaultWindowWidth; diff --git a/gui/lib/src/util/dll.dart b/gui/lib/src/util/dll.dart index 1346f52..4490d1c 100644 --- a/gui/lib/src/util/dll.dart +++ b/gui/lib/src/util/dll.dart @@ -88,7 +88,7 @@ extension InjectableDllExtension on InjectableDll { return settingsController.unrealEngineConsoleDll.text; case InjectableDll.cobalt: return settingsController.backendDll.text; - case InjectableDll.memoryFix: + case InjectableDll.memory: return settingsController.memoryLeakDll.text; } } diff --git a/gui/lib/src/widget/game_start_button.dart b/gui/lib/src/widget/game_start_button.dart index bb6db49..9b1275f 100644 --- a/gui/lib/src/widget/game_start_button.dart +++ b/gui/lib/src/widget/game_start_button.dart @@ -332,7 +332,7 @@ class _LaunchButtonState extends State { if(instance != null && !instance.launched) { instance.launched = true; instance.tokenError = false; - await _injectOrShowError(InjectableDll.memoryFix, host); + await _injectOrShowError(InjectableDll.memory, host); if(!host){ await _injectOrShowError(InjectableDll.console, host); _onGameClientInjected();