// Prevents additional console window on Windows in release, DO NOT REMOVE!! #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] fn main() { // WebKitGTK on Wayland is unstable — force X11/XWayland on all Linux packages. // Users can still override by setting these vars before launch. #[cfg(target_os = "linux")] unsafe { if std::env::var("GDK_BACKEND").is_err() { std::env::set_var("GDK_BACKEND", "x11"); } if std::env::var("WEBKIT_DISABLE_COMPOSITING_MODE").is_err() { std::env::set_var("WEBKIT_DISABLE_COMPOSITING_MODE", "1"); } } let args: Vec = std::env::args().collect(); if psysonic_lib::cli::wants_version(&args) { psysonic_lib::cli::print_version(); return; } if psysonic_lib::cli::wants_help(&args) { psysonic_lib::cli::print_help( args.first().map(|s| s.as_str()).unwrap_or("psysonic"), ); return; } if let Some(code) = psysonic_lib::cli::try_completions_dispatch(&args) { std::process::exit(code); } if psysonic_lib::cli::wants_info(&args) { psysonic_lib::cli::run_info_and_exit(&args); } psysonic_lib::run(); }