Skip to content

Commit

Permalink
10.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Auties00 committed Dec 30, 2024
1 parent 9e20ec8 commit d5e41ed
Show file tree
Hide file tree
Showing 49 changed files with 635 additions and 1,067 deletions.
2 changes: 1 addition & 1 deletion archive/move.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def main():
for future in as_completed(futures):
try:
uploaded_url, uploaded_key = future.result()
print(f"Uploaded: {uploaded_url} -> s3://{bucket_name}/{uploaded_key}")
print(f"Uploaded: {uploaded_url}")
except Exception as e:
print(f"Error uploading: {e}")

Expand Down
2 changes: 1 addition & 1 deletion archive/versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ https://builds.rebootfn.org/17.30.zip
https://builds.rebootfn.org/17.50.zip
https://builds.rebootfn.org/18.40.zip
https://builds.rebootfn.org/19.10.rar
https://builds.rebootfn.org/20.40.zip"
https://builds.rebootfn.org/20.40.zip
7 changes: 4 additions & 3 deletions common/lib/src/model/dll.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
enum InjectableDll {
console,
starfall,
reboot,
auth,
gameServer,
memoryLeak
}

extension InjectableDllVersionAware on InjectableDll {
bool get isVersionDependent => this == InjectableDll.reboot;
bool get isVersionDependent => this == InjectableDll.gameServer;
}
2 changes: 1 addition & 1 deletion common/lib/src/util/backend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Future<Uri?> pingBackend(String host, int port, [bool https=false]) async {
await request.close().timeout(const Duration(seconds: 10));
log("[BACKEND] Ping successful");
return uri;
}catch(error){
}catch(error) {
log("[BACKEND] Cannot ping backend: $error");
return https || declaredScheme != null || isLocalHost(host) ? null : await pingBackend(host, port, true);
}
Expand Down
33 changes: 17 additions & 16 deletions common/lib/src/util/dll.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import 'package:http/http.dart' as http;
import 'package:path/path.dart' as path;
import 'package:reboot_common/common.dart';

bool _watcher = false;
final File rebootBeforeS20DllFile = File("${dllsDirectory.path}\\reboot.dll");
final File rebootAboveS20DllFile = File("${dllsDirectory.path}\\rebootS20.dll");
const String kRebootBelowS20DownloadUrl =
Expand All @@ -20,7 +19,22 @@ Future<bool> hasRebootDllUpdate(int? lastUpdateMs, {int hours = 24, bool force =
return force || !exists || (hours > 0 && lastUpdate != null && now.difference(lastUpdate).inHours > hours);
}

Future<void> downloadCriticalDll(String name, String outputPath) async {
Future<void> downloadDependency(InjectableDll dll, String outputPath) async {
String? name;
switch(dll) {
case InjectableDll.console:
name = "console.dll";
case InjectableDll.auth:
name = "starfall.dll";
case InjectableDll.memoryLeak:
name = "memory.dll";
case InjectableDll.gameServer:
name = null;
}
if(name == null) {
return;
}

final response = await http.get(Uri.parse("https://github.com/Auties00/reboot_launcher/raw/master/gui/dependencies/dlls/$name"));
if(response.statusCode != 200) {
throw Exception("Cannot download $name: status code ${response.statusCode}");
Expand Down Expand Up @@ -56,17 +70,4 @@ Future<DateTime?> _getLastUpdate(int? lastUpdateMs) async {
return lastUpdateMs != null
? DateTime.fromMillisecondsSinceEpoch(lastUpdateMs)
: null;
}

Stream<String> watchDlls() async* {
if(_watcher) {
return;
}

_watcher = true;
await for(final event in dllsDirectory.watch(events: FileSystemEvent.delete | FileSystemEvent.move)) {
if (event.path.endsWith(".dll")) {
yield event.path;
}
}
}
}
17 changes: 9 additions & 8 deletions gui/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import 'package:reboot_launcher/src/controller/dll_controller.dart';
import 'package:reboot_launcher/src/controller/game_controller.dart';
import 'package:reboot_launcher/src/controller/hosting_controller.dart';
import 'package:reboot_launcher/src/controller/settings_controller.dart';
import 'package:reboot_launcher/src/messenger/implementation/error.dart';
import 'package:reboot_launcher/src/page/implementation/home_page.dart';
import 'package:reboot_launcher/src/widget/message/error.dart';
import 'package:reboot_launcher/src/widget/page/home_page.dart';
import 'package:reboot_launcher/src/util/os.dart';
import 'package:reboot_launcher/src/util/url_protocol.dart';
import 'package:supabase_flutter/supabase_flutter.dart';
Expand Down Expand Up @@ -82,9 +82,7 @@ Future<void> _startApp() async {
errors.add(uncaughtError);
} finally{
log("[APP] Started applications with errors: $errors");
runApp(RebootApplication(
errors: errors,
));
runApp(RebootApplication(errors: errors));
}
}

Expand Down Expand Up @@ -176,7 +174,7 @@ Future<void> _initWindow() async {
if(isWin11) {
await Window.setEffect(
effect: WindowEffect.acrylic,
color: Colors.transparent,
color: Colors.green,
dark: isDarkMode
);
}
Expand Down Expand Up @@ -232,7 +230,6 @@ Future<List<Object>> _initStorage() async {
errors.add(error);
}


return errors;
}

Expand All @@ -254,7 +251,11 @@ class _RebootApplicationState extends State<RebootApplication> {
}

void _handleErrors(List<Object?> errors) {
errors.where((element) => element != null).forEach((element) => onError(element!, null, false));
for(final error in errors) {
if(error != null) {
onError(error, null, false);
}
}
}

@override
Expand Down
Loading

0 comments on commit d5e41ed

Please sign in to comment.