mirror of
https://github.com/Auties00/Reboot-Launcher.git
synced 2026-01-13 03:02:22 +01:00
<feat: New project structure>
<feat: New release>
This commit is contained in:
28
watch/lib/watch.dart
Normal file
28
watch/lib/watch.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
import 'dart:io';
|
||||
import 'package:reboot_common/common.dart';
|
||||
import 'package:supabase/supabase.dart';
|
||||
|
||||
void main(List<String> args) async {
|
||||
if(args.length != 5){
|
||||
stderr.writeln("Wrong args length: $args");
|
||||
return;
|
||||
}
|
||||
|
||||
var supabase = SupabaseClient(supabaseUrl, supabaseAnonKey);
|
||||
var uuid = args[0];
|
||||
var gamePid = int.parse(args[1]);
|
||||
var launcherPid = int.parse(args[2]);
|
||||
var eacPid = int.parse(args[3]);
|
||||
var hosting = args[4].toLowerCase() == "true";
|
||||
await watchProcess(gamePid);
|
||||
Process.killPid(gamePid, ProcessSignal.sigabrt);
|
||||
Process.killPid(launcherPid, ProcessSignal.sigabrt);
|
||||
Process.killPid(eacPid, ProcessSignal.sigabrt);
|
||||
if(hosting) {
|
||||
await supabase.from('hosts')
|
||||
.delete()
|
||||
.match({'id': uuid});
|
||||
}
|
||||
|
||||
exit(0);
|
||||
}
|
||||
15
watch/pubspec.yaml
Normal file
15
watch/pubspec.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
name: reboot_watch
|
||||
version: "1.0.0"
|
||||
|
||||
publish_to: 'none'
|
||||
|
||||
environment:
|
||||
sdk: ">=2.19.0 <=3.3.3"
|
||||
|
||||
dependencies:
|
||||
supabase: ^1.9.1
|
||||
reboot_common:
|
||||
path: ./../common
|
||||
|
||||
dev_dependencies:
|
||||
flutter_lints: ^2.0.1
|
||||
Reference in New Issue
Block a user