mirror of
https://github.com/Auties00/Reboot-Launcher.git
synced 2026-01-13 03:02:22 +01:00
9.0.2
This commit is contained in:
@@ -5,7 +5,6 @@ import 'package:reboot_cli/src/game.dart';
|
||||
import 'package:reboot_cli/src/reboot.dart';
|
||||
import 'package:reboot_cli/src/server.dart';
|
||||
import 'package:reboot_common/common.dart';
|
||||
import 'package:reboot_common/src/model/fortnite_version.dart';
|
||||
import 'package:reboot_common/src/util/matchmaker.dart' as matchmaker;
|
||||
|
||||
late String? username;
|
||||
@@ -46,7 +45,7 @@ void main(List<String> args) async {
|
||||
if(result["update"]) {
|
||||
stdout.writeln("Updating reboot dll...");
|
||||
try {
|
||||
await downloadRebootDll(rebootDownloadUrl, 0);
|
||||
await downloadRebootDll(kRebootDownloadUrl);
|
||||
}catch(error){
|
||||
stderr.writeln("Cannot update reboot dll: $error");
|
||||
}
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:process_run/process_run.dart';
|
||||
import 'package:reboot_common/common.dart';
|
||||
|
||||
import 'package:reboot_cli/cli.dart';
|
||||
import 'package:reboot_common/common.dart';
|
||||
|
||||
Process? _gameProcess;
|
||||
Process? _launcherProcess;
|
||||
@@ -24,7 +22,7 @@ Future<void> startGame() async {
|
||||
stdout.writeln("No username was specified, using $username by default. Use --username to specify one");
|
||||
}
|
||||
|
||||
_gameProcess = await Process.start(executable.path, createRebootArgs(username!, "", host, ""))
|
||||
_gameProcess = await Process.start(executable.path, createRebootArgs(username!, "", host, host, ""))
|
||||
..exitCode.then((_) => _onClose())
|
||||
..outLines.forEach((line) => _onGameOutput(line, dll, host, verbose));
|
||||
_injectOrShowError("cobalt.dll");
|
||||
@@ -54,12 +52,12 @@ void _onGameOutput(String line, String dll, bool hosting, bool verbose) {
|
||||
stdout.writeln(line);
|
||||
}
|
||||
|
||||
if (line.contains(shutdownLine)) {
|
||||
if (line.contains(kShutdownLine)) {
|
||||
_onClose();
|
||||
return;
|
||||
}
|
||||
|
||||
if(cannotConnectErrors.any((element) => line.contains(element))){
|
||||
if(kCannotConnectErrors.any((element) => line.contains(element))){
|
||||
stderr.writeln("The backend doesn't work! Token expired");
|
||||
_onClose();
|
||||
return;
|
||||
|
||||
@@ -7,7 +7,7 @@ Future<bool> startServerCli(String? host, String? port, ServerType type) async {
|
||||
stdout.writeln("Starting backend server...");
|
||||
switch(type){
|
||||
case ServerType.local:
|
||||
var result = await pingAuthenticator(host ?? kDefaultAuthenticatorHost, port ?? kDefaultAuthenticatorPort);
|
||||
var result = await pingAuthenticator(host ?? kDefaultAuthenticatorHost, port ?? kDefaultAuthenticatorPort.toString());
|
||||
if(result == null){
|
||||
throw Exception("Local backend server is not running");
|
||||
}
|
||||
@@ -17,7 +17,7 @@ Future<bool> startServerCli(String? host, String? port, ServerType type) async {
|
||||
case ServerType.embedded:
|
||||
stdout.writeln("Starting an embedded server...");
|
||||
await server.startEmbeddedAuthenticator(false);
|
||||
var result = await pingAuthenticator(host ?? kDefaultAuthenticatorHost, port ?? kDefaultAuthenticatorPort);
|
||||
var result = await pingAuthenticator(host ?? kDefaultAuthenticatorHost, port ?? kDefaultAuthenticatorPort.toString());
|
||||
if(result == null){
|
||||
throw Exception("Cannot start embedded server");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user