mirror of
https://github.com/Auties00/Reboot-Launcher.git
synced 2026-01-13 19:22:22 +01:00
9.0.4
This commit is contained in:
@@ -12,7 +12,7 @@ Future<void> startGame() async {
|
||||
await _startLauncherProcess(version);
|
||||
await _startEacProcess(version);
|
||||
|
||||
var executable = await version.executable;
|
||||
var executable = await version.gameExecutable;
|
||||
if (executable == null) {
|
||||
throw Exception("${version.location.path} no longer contains a Fortnite executable, did you delete or move it?");
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ Future<void> downloadRequiredDLLs() async {
|
||||
await memoryFixDll.writeAsBytes(response.bodyBytes);
|
||||
}
|
||||
|
||||
if(!authenticatorDirectory.existsSync()){
|
||||
if(!backendDirectory.existsSync()){
|
||||
var response = await http.get(Uri.parse(_embeddedConfigDownload));
|
||||
if(response.statusCode != 200){
|
||||
throw Exception("Cannot download embedded server config");
|
||||
@@ -50,6 +50,6 @@ Future<void> downloadRequiredDLLs() async {
|
||||
|
||||
var tempZip = File("${tempDirectory.path}/reboot_config.zip");
|
||||
await tempZip.writeAsBytes(response.bodyBytes);
|
||||
await extractFileToDisk(tempZip.path, authenticatorDirectory.path);
|
||||
await extractFileToDisk(tempZip.path, backendDirectory.path);
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:reboot_common/common.dart';
|
||||
import 'package:reboot_common/src/util/authenticator.dart' as server;
|
||||
import 'package:reboot_common/src/util/backend.dart' as server;
|
||||
|
||||
Future<bool> startServerCli(String? host, int? 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 pingBackend(host ?? kDefaultBackendHost, port ?? kDefaultBackendPort);
|
||||
if(result == null){
|
||||
throw Exception("Local backend server is not running");
|
||||
}
|
||||
@@ -16,8 +16,8 @@ Future<bool> startServerCli(String? host, int? port, ServerType type) async {
|
||||
return true;
|
||||
case ServerType.embedded:
|
||||
stdout.writeln("Starting an embedded server...");
|
||||
await server.startEmbeddedAuthenticator(false);
|
||||
var result = await pingAuthenticator(host ?? kDefaultAuthenticatorHost, port ?? kDefaultAuthenticatorPort);
|
||||
await server.startEmbeddedBackend(false);
|
||||
var result = await pingBackend(host ?? kDefaultBackendHost, port ?? kDefaultBackendPort);
|
||||
if(result == null){
|
||||
throw Exception("Cannot start embedded server");
|
||||
}
|
||||
@@ -39,12 +39,12 @@ Future<bool> startServerCli(String? host, int? port, ServerType type) async {
|
||||
|
||||
Future<HttpServer?> _changeReverseProxyState(String host, int port) async {
|
||||
try{
|
||||
var uri = await pingAuthenticator(host, port);
|
||||
var uri = await pingBackend(host, port);
|
||||
if(uri == null){
|
||||
return null;
|
||||
}
|
||||
|
||||
return await server.startRemoteAuthenticatorProxy(uri);
|
||||
return await server.startRemoteBackendProxy(uri);
|
||||
}catch(error){
|
||||
throw Exception("Cannot start reverse proxy");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user