diff --git a/archive/README.md b/archive/README.md deleted file mode 100644 index 8991a13..0000000 --- a/archive/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Builds Archive - -Builds are stored on a Cloudflare R2 instance at `https://builds.rebootfn.org/versions.json`. -If you want to move them to another AWS-compatible object storage, run: -``` -python move.py -``` -and provide the required parameters. \ No newline at end of file diff --git a/archive/move.py b/archive/move.py deleted file mode 100644 index e3caf17..0000000 --- a/archive/move.py +++ /dev/null @@ -1,66 +0,0 @@ -import argparse -import os -import requests -import boto3 - -from concurrent.futures import ThreadPoolExecutor, as_completed -from urllib.parse import urlparse - -def upload_url_to_s3(s3_client, bucket_name, url, object_key): - response = requests.get(url, stream=True, verify=False, headers={"Cookie": "_c_t_c=1"}) - response.raise_for_status() - s3_client.upload_fileobj(response.raw, bucket_name, object_key) - return url, object_key - -def derive_key_from_url(url, prefix=None): - parsed = urlparse(url) - filename = os.path.basename(parsed.path) - if prefix: - return f"{prefix}/{filename}" - else: - return filename - -def main(): - parser = argparse.ArgumentParser(description="Upload multiple URLs from versions.txt to an S3 bucket concurrently.") - parser.add_argument('--bucket', required=True, help="Name of the S3 bucket.") - parser.add_argument('--concurrency', required=True, type=int, help="Number of concurrent uploads.") - parser.add_argument('--versions-file', default='versions.txt', help="File containing one URL per line.") - parser.add_argument('--access-key', required=True, help="AWS Access Key ID.") - parser.add_argument('--secret-key', required=True, help="AWS Secret Access Key.") - parser.add_argument('--endpoint-url', required=True, help="Custom endpoint URL for S3 or S3-compatible storage.") - args = parser.parse_args() - - bucket_name = args.bucket - concurrency = args.concurrency - versions_file = args.versions_file - access_key = args.access_key - secret_key = args.secret_key - endpoint_url = args.endpoint_url - - with open(versions_file, 'r') as f: - urls = [line.strip() for line in f if line.strip()] - - print(f"Uploading {len(urls)} files...") - s3_params = {} - if access_key and secret_key: - s3_params['aws_access_key_id'] = access_key - s3_params['aws_secret_access_key'] = secret_key - if endpoint_url: - s3_params['endpoint_url'] = endpoint_url - - s3 = boto3.client('s3', **s3_params) - - futures = [] - with ThreadPoolExecutor(max_workers=concurrency) as executor: - for url in urls: - object_key = derive_key_from_url(url) - futures.append(executor.submit(upload_url_to_s3, s3, bucket_name, url, object_key)) - for future in as_completed(futures): - try: - uploaded_url, uploaded_key = future.result() - print(f"Uploaded: {uploaded_url}") - except Exception as e: - print(f"Error uploading: {e}") - -if __name__ == "__main__": - main() diff --git a/archive/versions.txt b/archive/versions.txt deleted file mode 100644 index f092152..0000000 --- a/archive/versions.txt +++ /dev/null @@ -1,85 +0,0 @@ -https://builds.rebootfn.org/1.7.2.zip -https://builds.rebootfn.org/1.8.rar -https://builds.rebootfn.org/1.8.1.rar -https://builds.rebootfn.org/1.8.2.rar -https://builds.rebootfn.org/1.9.rar -https://builds.rebootfn.org/1.9.1.rar -https://builds.rebootfn.org/1.10.rar -https://builds.rebootfn.org/1.11.zip -https://builds.rebootfn.org/2.1.0.zip -https://builds.rebootfn.org/2.2.0.rar -https://builds.rebootfn.org/2.3.rar -https://builds.rebootfn.org/2.4.0.zip -https://builds.rebootfn.org/2.4.2.zip -https://builds.rebootfn.org/2.5.0.rar -https://builds.rebootfn.org/3.0.zip -https://builds.rebootfn.org/3.1.rar -https://builds.rebootfn.org/3.1.1.zip -https://builds.rebootfn.org/3.2.zip -https://builds.rebootfn.org/3.3.rar -https://builds.rebootfn.org/3.5.rar -https://builds.rebootfn.org/3.6.zip -https://builds.rebootfn.org/4.0.zip -https://builds.rebootfn.org/4.1.zip -https://builds.rebootfn.org/4.2.zip -https://builds.rebootfn.org/4.4.rar -https://builds.rebootfn.org/4.5.rar -https://builds.rebootfn.org/5.00.rar -https://builds.rebootfn.org/5.0.1.rar -https://builds.rebootfn.org/5.10.rar -https://builds.rebootfn.org/5.21.rar -https://builds.rebootfn.org/5.30.rar -https://builds.rebootfn.org/5.40.rar -https://builds.rebootfn.org/6.00.rar -https://builds.rebootfn.org/6.01.rar -https://builds.rebootfn.org/6.1.1.rar -https://builds.rebootfn.org/6.02.rar -https://builds.rebootfn.org/6.2.1.rar -https://builds.rebootfn.org/6.10.rar -https://builds.rebootfn.org/6.10.1.rar -https://builds.rebootfn.org/6.10.2.rar -https://builds.rebootfn.org/6.21.rar -https://builds.rebootfn.org/6.22.rar -https://builds.rebootfn.org/6.30.rar -https://builds.rebootfn.org/6.31.rar -https://builds.rebootfn.org/7.00.rar -https://builds.rebootfn.org/7.10.rar -https://builds.rebootfn.org/7.20.rar -https://builds.rebootfn.org/7.30.zip -https://builds.rebootfn.org/7.40.rar -https://builds.rebootfn.org/8.00.zip -https://builds.rebootfn.org/8.20.rar -https://builds.rebootfn.org/8.30.rar -https://builds.rebootfn.org/8.40.zip -https://builds.rebootfn.org/8.50.zip -https://builds.rebootfn.org/8.51.rar -https://builds.rebootfn.org/9.00.zip -https://builds.rebootfn.org/9.01.zip -https://builds.rebootfn.org/9.10.rar -https://builds.rebootfn.org/9.21.zip -https://builds.rebootfn.org/9.30.zip -https://builds.rebootfn.org/9.40.zip -https://builds.rebootfn.org/9.41.rar -https://builds.rebootfn.org/10.00.zip -https://builds.rebootfn.org/10.10.zip -https://builds.rebootfn.org/10.20.zip -https://builds.rebootfn.org/10.31.zip -https://builds.rebootfn.org/10.40.rar -https://builds.rebootfn.org/11.00.zip -https://builds.rebootfn.org/11.31.rar -https://builds.rebootfn.org/12.00.rar -https://builds.rebootfn.org/12.21.zip -https://builds.rebootfn.org/12.50.zip -https://builds.rebootfn.org/12.61.zip -https://builds.rebootfn.org/13.00.rar -https://builds.rebootfn.org/13.40.zip -https://builds.rebootfn.org/14.00.rar -https://builds.rebootfn.org/14.40.rar -https://builds.rebootfn.org/14.60.rar -https://builds.rebootfn.org/15.30.rar -https://builds.rebootfn.org/16.40.rar -https://builds.rebootfn.org/17.30.zip -https://builds.rebootfn.org/17.50.zip -https://builds.rebootfn.org/18.40.zip -https://builds.rebootfn.org/19.10.rar -https://builds.rebootfn.org/20.40.zip \ No newline at end of file diff --git a/common/lib/src/constant/game.dart b/common/lib/src/constant/game.dart index c84c875..9d4537d 100644 --- a/common/lib/src/constant/game.dart +++ b/common/lib/src/constant/game.dart @@ -22,4 +22,5 @@ const List kCannotConnectErrors = [ "UOnlineAccountCommon::ForceLogout" ]; const String kGameFinishedLine = "PlayersLeft: 1"; -const String kDisplayInitializedLine = "Display"; +const String kDisplayLine = "Display"; +const String kDisplayInitializedLine = "Initialized"; \ No newline at end of file diff --git a/common/lib/src/util/build.dart b/common/lib/src/util/build.dart index 544cf12..4db15c4 100644 --- a/common/lib/src/util/build.dart +++ b/common/lib/src/util/build.dart @@ -13,37 +13,99 @@ import 'package:http/http.dart' as http; const String kStopBuildDownloadSignal = "kill"; -final Uri _archiveSourceUrl = Uri.parse("https://builds.rebootfn.org/versions.json"); final int _ariaPort = 6800; final Uri _ariaEndpoint = Uri.parse('http://localhost:$_ariaPort/jsonrpc'); final Duration _ariaMaxSpawnTime = const Duration(seconds: 10); final String _ariaSecret = "RebootLauncher"; final RegExp _rarProgressRegex = RegExp("^((100)|(\\d{1,2}(.\\d*)?))%\$"); +final List downloadableBuilds = [ + FortniteBuild(version: Version.parse("1.7.2"), link: "https://public.simplyblk.xyz/1.7.2.zip", available: true), + FortniteBuild(version: Version.parse("1.8"), link: "https://public.simplyblk.xyz/1.8.rar", available: true), + FortniteBuild(version: Version.parse("1.8.1"), link: "https://public.simplyblk.xyz/1.8.1.rar", available: true), + FortniteBuild(version: Version.parse("1.8.2"), link: "https://public.simplyblk.xyz/1.8.2.rar", available: true), + FortniteBuild(version: Version.parse("1.9"), link: "https://public.simplyblk.xyz/1.9.rar", available: true), + FortniteBuild(version: Version.parse("1.9.1"), link: "https://public.simplyblk.xyz/1.9.1.rar", available: true), + FortniteBuild(version: Version.parse("1.10"), link: "https://public.simplyblk.xyz/1.10.rar", available: true), + FortniteBuild(version: Version.parse("1.11"), link: "https://public.simplyblk.xyz/1.11.zip", available: true), + FortniteBuild(version: Version.parse("2.1.0"), link: "https://public.simplyblk.xyz/2.1.0.zip", available: true), + FortniteBuild(version: Version.parse("2.2.0"), link: "https://public.simplyblk.xyz/2.2.0.rar", available: true), + FortniteBuild(version: Version.parse("2.3"), link: "https://public.simplyblk.xyz/2.3.rar", available: true), + FortniteBuild(version: Version.parse("2.4.0"), link: "https://public.simplyblk.xyz/2.4.0.zip", available: true), + FortniteBuild(version: Version.parse("2.4.2"), link: "https://public.simplyblk.xyz/2.4.2.zip", available: true), + FortniteBuild(version: Version.parse("2.5.0"), link: "https://public.simplyblk.xyz/2.5.0.rar", available: true), + FortniteBuild(version: Version.parse("3.0"), link: "https://public.simplyblk.xyz/3.0.zip", available: true), + FortniteBuild(version: Version.parse("3.1"), link: "https://public.simplyblk.xyz/3.1.rar", available: true), + FortniteBuild(version: Version.parse("3.1.1"), link: "https://public.simplyblk.xyz/3.1.1.zip", available: true), + FortniteBuild(version: Version.parse("3.2"), link: "https://public.simplyblk.xyz/3.2.zip", available: true), + FortniteBuild(version: Version.parse("3.3"), link: "https://public.simplyblk.xyz/3.3.rar", available: true), + FortniteBuild(version: Version.parse("3.5"), link: "https://public.simplyblk.xyz/3.5.rar", available: true), + FortniteBuild(version: Version.parse("3.6"), link: "https://public.simplyblk.xyz/3.6.zip", available: true), + FortniteBuild(version: Version.parse("4.0"), link: "https://public.simplyblk.xyz/4.0.zip", available: true), + FortniteBuild(version: Version.parse("4.1"), link: "https://public.simplyblk.xyz/4.1.zip", available: true), + FortniteBuild(version: Version.parse("4.2"), link: "https://public.simplyblk.xyz/4.2.zip", available: true), + FortniteBuild(version: Version.parse("4.4"), link: "https://public.simplyblk.xyz/4.4.rar", available: true), + FortniteBuild(version: Version.parse("4.5"), link: "https://public.simplyblk.xyz/4.5.rar", available: true), + FortniteBuild(version: Version.parse("5.00"), link: "https://public.simplyblk.xyz/5.00.rar", available: true), + FortniteBuild(version: Version.parse("5.0.1"), link: "https://public.simplyblk.xyz/5.0.1.rar", available: true), + FortniteBuild(version: Version.parse("5.10"), link: "https://public.simplyblk.xyz/5.10.rar", available: true), + FortniteBuild(version: Version.parse("5.21"), link: "https://public.simplyblk.xyz/5.21.rar", available: true), + FortniteBuild(version: Version.parse("5.30"), link: "https://public.simplyblk.xyz/5.30.rar", available: true), + FortniteBuild(version: Version.parse("5.40"), link: "https://public.simplyblk.xyz/5.40.rar", available: true), + FortniteBuild(version: Version.parse("6.00"), link: "https://public.simplyblk.xyz/6.00.rar", available: true), + FortniteBuild(version: Version.parse("6.01"), link: "https://public.simplyblk.xyz/6.01.rar", available: true), + FortniteBuild(version: Version.parse("6.1.1"), link: "https://public.simplyblk.xyz/6.1.1.rar", available: true), + FortniteBuild(version: Version.parse("6.02"), link: "https://public.simplyblk.xyz/6.02.rar", available: true), + FortniteBuild(version: Version.parse("6.2.1"), link: "https://public.simplyblk.xyz/6.2.1.rar", available: true), + FortniteBuild(version: Version.parse("6.10"), link: "https://public.simplyblk.xyz/6.10.rar", available: true), + FortniteBuild(version: Version.parse("6.10.1"), link: "https://public.simplyblk.xyz/6.10.1.rar", available: true), + FortniteBuild(version: Version.parse("6.10.2"), link: "https://public.simplyblk.xyz/6.10.2.rar", available: true), + FortniteBuild(version: Version.parse("6.21"), link: "https://public.simplyblk.xyz/6.21.rar", available: true), + FortniteBuild(version: Version.parse("6.22"), link: "https://public.simplyblk.xyz/6.22.rar", available: true), + FortniteBuild(version: Version.parse("6.30"), link: "https://public.simplyblk.xyz/6.30.rar", available: true), + FortniteBuild(version: Version.parse("6.31"), link: "https://public.simplyblk.xyz/6.31.rar", available: true), + FortniteBuild(version: Version.parse("7.00"), link: "https://public.simplyblk.xyz/7.00.rar", available: true), + FortniteBuild(version: Version.parse("7.10"), link: "https://public.simplyblk.xyz/7.10.rar", available: true), + FortniteBuild(version: Version.parse("7.20"), link: "https://public.simplyblk.xyz/7.20.rar", available: true), + FortniteBuild(version: Version.parse("7.30"), link: "https://public.simplyblk.xyz/7.30.zip", available: true), + FortniteBuild(version: Version.parse("7.40"), link: "https://public.simplyblk.xyz/7.40.rar", available: true), + FortniteBuild(version: Version.parse("8.00"), link: "https://public.simplyblk.xyz/8.00.zip", available: true), + FortniteBuild(version: Version.parse("8.20"), link: "https://public.simplyblk.xyz/8.20.rar", available: true), + FortniteBuild(version: Version.parse("8.30"), link: "https://public.simplyblk.xyz/8.30.rar", available: true), + FortniteBuild(version: Version.parse("8.40"), link: "https://public.simplyblk.xyz/8.40.zip", available: true), + FortniteBuild(version: Version.parse("8.50"), link: "https://public.simplyblk.xyz/8.50.zip", available: true), + FortniteBuild(version: Version.parse("8.51"), link: "https://public.simplyblk.xyz/8.51.rar", available: true), + FortniteBuild(version: Version.parse("9.00"), link: "https://public.simplyblk.xyz/9.00.zip", available: true), + FortniteBuild(version: Version.parse("9.01"), link: "https://public.simplyblk.xyz/9.01.zip", available: true), + FortniteBuild(version: Version.parse("9.10"), link: "https://public.simplyblk.xyz/9.10.rar", available: true), + FortniteBuild(version: Version.parse("9.21"), link: "https://public.simplyblk.xyz/9.21.zip", available: true), + FortniteBuild(version: Version.parse("9.30"), link: "https://public.simplyblk.xyz/9.30.zip", available: true), + FortniteBuild(version: Version.parse("9.40"), link: "https://public.simplyblk.xyz/9.40.zip", available: true), + FortniteBuild(version: Version.parse("9.41"), link: "https://public.simplyblk.xyz/9.41.rar", available: true), + FortniteBuild(version: Version.parse("10.00"), link: "https://public.simplyblk.xyz/10.00.zip", available: true), + FortniteBuild(version: Version.parse("10.10"), link: "https://public.simplyblk.xyz/10.10.zip", available: true), + FortniteBuild(version: Version.parse("10.20"), link: "https://public.simplyblk.xyz/10.20.zip", available: true), + FortniteBuild(version: Version.parse("10.31"), link: "https://public.simplyblk.xyz/10.31.zip", available: true), + FortniteBuild(version: Version.parse("10.40"), link: "https://public.simplyblk.xyz/10.40.rar", available: true), + FortniteBuild(version: Version.parse("11.00"), link: "https://public.simplyblk.xyz/11.00.zip", available: true), + FortniteBuild(version: Version.parse("11.31"), link: "https://public.simplyblk.xyz/11.31.rar", available: true), + FortniteBuild(version: Version.parse("12.00"), link: "https://public.simplyblk.xyz/12.00.rar", available: true), + FortniteBuild(version: Version.parse("12.21"), link: "https://public.simplyblk.xyz/12.21.zip", available: true), + FortniteBuild(version: Version.parse("12.50"), link: "https://public.simplyblk.xyz/12.50.zip", available: true), + FortniteBuild(version: Version.parse("12.61"), link: "https://public.simplyblk.xyz/12.61.zip", available: true), + FortniteBuild(version: Version.parse("13.00"), link: "https://public.simplyblk.xyz/13.00.rar", available: true), + FortniteBuild(version: Version.parse("13.40"), link: "https://public.simplyblk.xyz/13.40.zip", available: true), + FortniteBuild(version: Version.parse("14.00"), link: "https://public.simplyblk.xyz/14.00.rar", available: true), + FortniteBuild(version: Version.parse("14.40"), link: "https://public.simplyblk.xyz/14.40.rar", available: true), + FortniteBuild(version: Version.parse("14.60"), link: "https://public.simplyblk.xyz/14.60.rar", available: true), + FortniteBuild(version: Version.parse("15.30"), link: "https://public.simplyblk.xyz/15.30.rar", available: true), + FortniteBuild(version: Version.parse("16.40"), link: "https://public.simplyblk.xyz/16.40.rar", available: true), + FortniteBuild(version: Version.parse("17.30"), link: "https://public.simplyblk.xyz/17.30.zip", available: true), + FortniteBuild(version: Version.parse("17.50"), link: "https://public.simplyblk.xyz/17.50.zip", available: true), + FortniteBuild(version: Version.parse("18.40"), link: "https://public.simplyblk.xyz/18.40.zip", available: true), + FortniteBuild(version: Version.parse("19.10"), link: "https://public.simplyblk.xyz/19.10.rar", available: true), + FortniteBuild(version: Version.parse("20.40"), link: "https://public.simplyblk.xyz/20.40.zip", available: true), +]; -Future> fetchBuilds(ignored) async { - final response = await http.get(_archiveSourceUrl); - if (response.statusCode != 200) { - return []; - } - - return jsonDecode(response.body) - .map((entry) { - try { - final fileUrl = entry as String; - final fileName = Uri.parse(fileUrl).pathSegments.last; - final fileNameWithoutExtension = path.basenameWithoutExtension(fileName); - return FortniteBuild( - version: Version.parse(fileNameWithoutExtension), - link: entry, - available: true - ); - }catch(_) { - return null; - } - }) - .whereType() - .toList(); -} Future downloadArchiveBuild(FortniteBuildDownloadOptions options) async { final fileName = options.build.link.substring(options.build.link.lastIndexOf("/") + 1); @@ -150,7 +212,8 @@ Future _startAriaServer() async { "--rpc-allow-origin-all", "--rpc-secret=$_ariaSecret", "--rpc-listen-port=$_ariaPort", - "--file-allocation=none" + "--file-allocation=none", + "--check-certificate=false" ], window: false ); diff --git a/common/lib/src/util/dll.dart b/common/lib/src/util/dll.dart index 9a101db..bbfa5c6 100644 --- a/common/lib/src/util/dll.dart +++ b/common/lib/src/util/dll.dart @@ -25,7 +25,7 @@ Future downloadDependency(InjectableDll dll, String outputPath) async { case InjectableDll.console: name = "console.dll"; case InjectableDll.auth: - name = "starfall.dll"; + name = "cobalt.dll"; case InjectableDll.memoryLeak: name = "memory.dll"; case InjectableDll.gameServer: diff --git a/common/lib/src/util/process.dart b/common/lib/src/util/process.dart index d7e526a..714a0b4 100644 --- a/common/lib/src/util/process.dart +++ b/common/lib/src/util/process.dart @@ -264,17 +264,13 @@ void handleGameOutput({ }else if(line.contains(kGameFinishedLine) && host) { log("[FORTNITE_OUTPUT_HANDLER] Detected match end: $line"); onMatchEnd(); - }else if(line.contains(kDisplayInitializedLine) && host) { + }else if(line.contains(kDisplayLine) && line.contains(kDisplayInitializedLine) && host) { log("[FORTNITE_OUTPUT_HANDLER] Detected display attach: $line"); onDisplayAttached(); } } String _parseUsername(String username, bool host) { - if(host) { - return "Player${Random().nextInt(1000)}"; - } - if (username.isEmpty) { return kDefaultPlayerName; } diff --git a/gui/dependencies/dlls/cobalt.dll b/gui/dependencies/dlls/cobalt.dll new file mode 100644 index 0000000..ae744d8 Binary files /dev/null and b/gui/dependencies/dlls/cobalt.dll differ diff --git a/gui/lib/src/controller/backend_controller.dart b/gui/lib/src/controller/backend_controller.dart index 70166d0..207cd38 100644 --- a/gui/lib/src/controller/backend_controller.dart +++ b/gui/lib/src/controller/backend_controller.dart @@ -357,7 +357,6 @@ class BackendController extends GetxController { severity: InfoBarSeverity.success ); case ServerResultType.startError: - print(event.stackTrace); return _showRebootInfoBar( type.value == ServerType.local ? translations.localServerError(event.error ?? translations.unknownError) : translations.startServerError(event.error ?? translations.unknownError), severity: InfoBarSeverity.error, diff --git a/gui/lib/src/controller/dll_controller.dart b/gui/lib/src/controller/dll_controller.dart index e8017fe..0b54843 100644 --- a/gui/lib/src/controller/dll_controller.dart +++ b/gui/lib/src/controller/dll_controller.dart @@ -16,8 +16,7 @@ class DllController extends GetxController { static const String storageName = "v2_dll_storage"; late final GetStorage? _storage; - late final String originalDll; - late final TextEditingController gameServerDll; + late final TextEditingController customGameServerDll; late final TextEditingController unrealEngineConsoleDll; late final TextEditingController backendDll; late final TextEditingController memoryLeakDll; @@ -32,7 +31,7 @@ class DllController extends GetxController { DllController() { _storage = appWithNoStorage ? null : GetStorage(storageName); - gameServerDll = _createController("game_server", InjectableDll.gameServer); + customGameServerDll = _createController("game_server", InjectableDll.gameServer); unrealEngineConsoleDll = _createController("unreal_engine_console", InjectableDll.console); backendDll = _createController("backend", InjectableDll.auth); memoryLeakDll = _createController("memory_leak", InjectableDll.memoryLeak); @@ -59,7 +58,7 @@ class DllController extends GetxController { } void resetGame() { - gameServerDll.text = getDefaultDllPath(InjectableDll.gameServer); + customGameServerDll.text = getDefaultDllPath(InjectableDll.gameServer); unrealEngineConsoleDll.text = getDefaultDllPath(InjectableDll.console); backendDll.text = getDefaultDllPath(InjectableDll.auth); } @@ -148,7 +147,7 @@ class DllController extends GetxController { switch(dll){ case InjectableDll.gameServer: if(customGameServer.value) { - return (File(gameServerDll.text), true); + return (File(customGameServerDll.text), true); } return (version.major >= 20 ? rebootAboveS20DllFile : rebootBeforeS20DllFile, false); @@ -171,7 +170,7 @@ class DllController extends GetxController { case InjectableDll.auth: return backendDll; case InjectableDll.gameServer: - return gameServerDll; + return customGameServerDll; case InjectableDll.memoryLeak: return memoryLeakDll; } @@ -182,7 +181,7 @@ class DllController extends GetxController { case InjectableDll.console: return "${dllsDirectory.path}\\console.dll"; case InjectableDll.auth: - return "${dllsDirectory.path}\\starfall.dll"; + return "${dllsDirectory.path}\\cobalt.dll"; case InjectableDll.gameServer: return "${dllsDirectory.path}\\reboot.dll"; case InjectableDll.memoryLeak: diff --git a/gui/lib/src/widget/game/game_start_button.dart b/gui/lib/src/widget/game/game_start_button.dart index c7da027..18c1a0e 100644 --- a/gui/lib/src/widget/game/game_start_button.dart +++ b/gui/lib/src/widget/game/game_start_button.dart @@ -250,7 +250,7 @@ class _LaunchButtonState extends State { log("[${host ? 'HOST' : 'GAME'}] Generating instance args..."); final gameArgs = createRebootArgs( host ? _hostingController.accountUsername.text : _gameController.username.text, - host ? _hostingController.accountPassword.text :_gameController.password.text, + host ? _hostingController.accountPassword.text : _gameController.password.text, host, hostType, false, @@ -495,6 +495,7 @@ class _LaunchButtonState extends State { const Duration(days: 1) ); this._pingOperation = pingOperation; + _gameServerInfoBar?.close(); _gameServerInfoBar = showRebootInfoBar( translations.checkGameServerFixMessage(gameServerPort), action: Button( @@ -508,8 +509,9 @@ class _LaunchButtonState extends State { final result = await pingOperation.future; _gameServerInfoBar?.close(); return result; - }finally { + }catch(_) { _gameServerInfoBar?.close(); + return false; } } diff --git a/gui/lib/src/widget/message/version.dart b/gui/lib/src/widget/message/version.dart index 26334e0..69262fb 100644 --- a/gui/lib/src/widget/message/version.dart +++ b/gui/lib/src/widget/message/version.dart @@ -35,18 +35,12 @@ class _AddVersionDialogState extends State { final Rxn _progress = Rxn(); final RxInt _speed = RxInt(0); - late Future> _fetchFuture; - SendPort? _downloadPort; Object? _error; StackTrace? _stackTrace; @override void initState() { - _fetchFuture = compute(fetchBuilds, null).then((value) { - _updateFormDefaults(); - return value; - }); super.initState(); } @@ -60,6 +54,7 @@ class _AddVersionDialogState extends State { void _cancelDownload() { _downloadPort?.send(kStopBuildDownloadSignal); WindowsTaskbar.setProgressMode(TaskbarProgressMode.noProgress); + stopDownloadServer(); } @override @@ -68,28 +63,10 @@ class _AddVersionDialogState extends State { child: Obx(() { switch(_status.value){ case _DownloadStatus.form: - return FutureBuilder( - future: _fetchFuture, - builder: (context, snapshot) { - if (snapshot.hasError) { - WidgetsBinding.instance.addPostFrameCallback((_) => _onDownloadError(snapshot.error, snapshot.stackTrace)); - } - - final data = snapshot.data; - if (data == null) { - return ProgressDialog( - text: translations.fetchingBuilds, - showButton: widget.closable, - onStop: () => Navigator.of(context).pop() - ); - } - - return Obx(() => FormDialog( - content: _buildFormBody(data), - buttons: _formButtons - )); - } - ); + return Obx(() => FormDialog( + content: _buildFormBody(downloadableBuilds), + buttons: _formButtons + )); case _DownloadStatus.downloading: case _DownloadStatus.extracting: return GenericDialog( @@ -256,7 +233,7 @@ class _AddVersionDialogState extends State { style: FluentTheme.maybeOf(context)?.typography.body, ), - if(timeLeft != null) + if(timeLeft != null && timeLeft != -1) Text( translations.timeLeft(timeLeft), style: FluentTheme.maybeOf(context)?.typography.body, @@ -450,7 +427,6 @@ class _AddVersionDialogState extends State { return; } - print("${bestDisk.path}\\FortniteBuilds\\${build.version}"); final pathText = "${bestDisk.path}FortniteBuilds\\${build.version}"; _pathController.text = pathText; _pathController.selection = TextSelection.collapsed(offset: pathText.length); diff --git a/gui/lib/src/widget/page/settings_page.dart b/gui/lib/src/widget/page/settings_page.dart index 69d302a..14e68e6 100644 --- a/gui/lib/src/widget/page/settings_page.dart +++ b/gui/lib/src/widget/page/settings_page.dart @@ -184,10 +184,10 @@ class _SettingsPageState extends RebootPageState { return createFileSetting( title: translations.settingsOldServerFileName, description: translations.settingsServerFileDescription, - controller: _dllController.gameServerDll, + controller: _dllController.customGameServerDll, onReset: () { final path = _dllController.getDefaultDllPath(InjectableDll.gameServer); - _dllController.gameServerDll.text = path; + _dllController.customGameServerDll.text = path; _dllController.download(InjectableDll.gameServer, path); } ); diff --git a/gui/pubspec.yaml b/gui/pubspec.yaml index be082f9..2462172 100644 --- a/gui/pubspec.yaml +++ b/gui/pubspec.yaml @@ -1,6 +1,6 @@ name: reboot_launcher description: Graphical User Interface for Project Reboot -version: "10.0.5" +version: "10.0.6" publish_to: 'none'