Initial commit

This commit is contained in:
Alessandro Autiero
2022-09-04 23:22:03 +02:00
commit a773c490cc
64 changed files with 3495 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
import 'dart:io';
class FortniteVersion {
String name;
Directory location;
FortniteVersion.fromJson(json)
: name = json["name"],
location = Directory(json["location"]);
FortniteVersion({required this.name, required this.location});
static File findExecutable(Directory directory, String name) {
return File(
"${directory.path}/FortniteGame/Binaries/Win64/$name");
}
File get executable {
return findExecutable(location, "FortniteClient-Win64-Shipping.exe");
}
File get launcher {
return findExecutable(location, "FortniteLauncher.exe");
}
File get eacExecutable {
return findExecutable(location, "FortniteClient-Win64-Shipping_EAC.exe");
}
Map<String, dynamic> toJson() => {
'name': name,
'location': location.path,
};
@override
String toString() {
return 'FortniteVersion{name: $name, location: $location}';
}
}