This commit is contained in:
2026-08-11 10:55:02 +02:00
commit d1a98c5da2
17 changed files with 2033 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
package main
import "core:fmt"
import "core:os"
main :: proc() {
install_shutdown_handlers()
options, cli_error := parse_cli(os.args)
if cli_error != "" {
fmt.eprintln("syncplay:", cli_error)
usage()
os.exit(2)
}
if options.command == .Help {
usage()
return
}
#partial switch options.command {
case .Server:
if !run_server(options) {
os.exit(1)
}
case .Client:
if path_error := validate_client_paths(options); path_error != "" {
fmt.eprintln("syncplay:", path_error)
os.exit(1)
}
if !run_client(options) {
os.exit(1)
}
case:
unreachable()
}
}