This commit is contained in:
Alessandro Autiero
2025-04-16 15:43:34 +02:00
parent dc2d4c4377
commit c3ede3b745
15 changed files with 374 additions and 200 deletions

View File

@@ -30,4 +30,5 @@ const String kShippingExe = "FortniteClient-Win64-Shipping.exe";
const String kLauncherExe = "FortniteLauncher.exe";
const String kEacExe = "FortniteClient-Win64-Shipping_EAC.exe";
const String kCrashReportExe = "CrashReportClient.exe";
const String kGFSDKAftermathLibDll = "GFSDK_Aftermath_Lib.dll";
final Version kMaxAllowedVersion = Version.parse("30.10");

View File

@@ -1,11 +1,11 @@
import 'dart:io';
import 'package:reboot_common/common.dart';
import 'package:version/version.dart';
class GameInstance {
final String version;
final bool host;
final int gamePid;
final int? launcherPid;
final int? eacPid;
@@ -18,6 +18,7 @@ class GameInstance {
GameInstance({
required this.version,
required this.host,
required this.gamePid,
required this.launcherPid,
required this.eacPid,

View File

@@ -15,7 +15,13 @@ final Semaphore _semaphore = Semaphore();
String? _lastIp;
String? _lastPort;
Stream<ServerResult> startBackend({required ServerType type, required String host, required String port, required bool detached, required void Function(String) onError}) async* {
Stream<ServerResult> startBackend({
required ServerType type,
required String host,
required String port,
required bool detached,
required void Function(String) onError
}) async* {
Process? process;
HttpServer? server;
try {
@@ -147,7 +153,13 @@ Future<Process> startEmbeddedBackend(bool detached, {void Function(String)? onEr
}
});
if(!detached) {
process.exitCode.then((exitCode) => log("[BACKEND] Exit code: $exitCode"));
process.exitCode.then((exitCode) {
if(!killed) {
log("[BACKEND] Exit code: $exitCode");
onError?.call("Exit code: $exitCode");
killed = true;
}
});
}
return process;
}

View File

@@ -369,7 +369,7 @@ Future<String> extractGameVersion(Directory directory) => Isolate.run(() async {
log("[VERSION] Engine build: $engineVersionBuild");
gameVersion = _buildToGameVersion[engineVersionBuild] ?? defaultGameVersion;
}
log("[VERSION] Returning $gameVersion");
log("[VERSION] Parsed game version: $gameVersion");
return gameVersion;
}
}