mirror of
https://github.com/Auties00/Reboot-Launcher.git
synced 2026-01-14 11:39:17 +01:00
Fixed CLI
This commit is contained in:
14
lib/cli.dart
14
lib/cli.dart
@@ -89,7 +89,7 @@ Future<void> handleCLI(List<String> args) async {
|
|||||||
..addOption("server-type", allowed: ["embedded", "remote"], defaultsTo: serverJson["embedded"] ?? true ? "embedded" : "remote")
|
..addOption("server-type", allowed: ["embedded", "remote"], defaultsTo: serverJson["embedded"] ?? true ? "embedded" : "remote")
|
||||||
..addOption("server-host", defaultsTo: serverJson["host"])
|
..addOption("server-host", defaultsTo: serverJson["host"])
|
||||||
..addOption("server-port", defaultsTo: serverJson["port"])
|
..addOption("server-port", defaultsTo: serverJson["port"])
|
||||||
..addOption("dll", defaultsTo: settingsJson["reboot"] ?? await loadBinary("reboot.dll", true))
|
..addOption("dll", defaultsTo: settingsJson["reboot"] ?? (await loadBinary("reboot.dll", true)).path)
|
||||||
..addOption("type", allowed: ["client", "server", "headless_server"], defaultsTo: _getDefaultType(gameJson))
|
..addOption("type", allowed: ["client", "server", "headless_server"], defaultsTo: _getDefaultType(gameJson))
|
||||||
..addFlag("update", defaultsTo: settingsJson["auto_update"] ?? true, negatable: true)
|
..addFlag("update", defaultsTo: settingsJson["auto_update"] ?? true, negatable: true)
|
||||||
..addFlag("log", defaultsTo: false);
|
..addFlag("log", defaultsTo: false);
|
||||||
@@ -311,6 +311,10 @@ Future<HttpServer?> _changeReverseProxyState(String host, String port) async {
|
|||||||
|
|
||||||
|
|
||||||
FortniteVersion _createVersion(String? versionName, String? versionPath, List<FortniteVersion> versions) {
|
FortniteVersion _createVersion(String? versionName, String? versionPath, List<FortniteVersion> versions) {
|
||||||
|
if (versionPath != null) {
|
||||||
|
return FortniteVersion(name: "dummy", location: Directory(versionPath));
|
||||||
|
}
|
||||||
|
|
||||||
if(versionName != null){
|
if(versionName != null){
|
||||||
try {
|
try {
|
||||||
return versions.firstWhere((element) => versionName == element.name);
|
return versions.firstWhere((element) => versionName == element.name);
|
||||||
@@ -319,12 +323,8 @@ FortniteVersion _createVersion(String? versionName, String? versionPath, List<Fo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (versionPath == null) {
|
throw Exception(
|
||||||
throw Exception(
|
"Specify a version using --version or open the launcher GUI and select it manually");
|
||||||
"Specify a version using --version or open the launcher GUI and select it manually");
|
|
||||||
}
|
|
||||||
|
|
||||||
return FortniteVersion(name: "dummy", location: Directory(versionPath));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _onGameOutput(String line, String rebootDll, bool host, bool verbose) {
|
void _onGameOutput(String line, String rebootDll, bool host, bool verbose) {
|
||||||
|
|||||||
Reference in New Issue
Block a user