Address 29 issues found in comprehensive API/spec audit: - Fix .desktop Exec key path escaping per Desktop Entry spec - Fix update dialog double-dispatch with connect_response - Fix version comparison total ordering with lexicographic fallback - Use RETURNING id for reliable upsert in database - Replace tilde-based path fallbacks with proper XDG helpers - Fix backup create/restore path asymmetry for non-home paths - HTML-escape severity class in security reports - Use AppStream <custom> element instead of <metadata> - Fix has_appimage_update_tool to check .is_ok() not .success() - Use ListBoxRow instead of ActionRow::set_child in ExpanderRow - Add ELF magic validation to architecture detection - Add timeout to extract_update_info_runtime - Skip symlinks in dir_size calculation - Use Condvar instead of busy-wait in analysis thread pool - Restore crash detection to single blocking call architecture
38 lines
1.0 KiB
Rust
38 lines
1.0 KiB
Rust
mod application;
|
|
mod cli;
|
|
mod config;
|
|
mod core;
|
|
mod i18n;
|
|
mod ui;
|
|
mod window;
|
|
|
|
use clap::Parser;
|
|
use glib::ExitCode;
|
|
use gtk::prelude::*;
|
|
|
|
use application::DriftwoodApplication;
|
|
use config::{APP_ID, GSETTINGS_SCHEMA_DIR};
|
|
|
|
fn main() -> ExitCode {
|
|
// Point GSettings at our compiled schema directory (dev builds).
|
|
// SAFETY: Called before any threads are spawned, at program start.
|
|
unsafe { std::env::set_var("GSETTINGS_SCHEMA_DIR", GSETTINGS_SCHEMA_DIR); }
|
|
|
|
// Parse CLI arguments
|
|
let parsed = cli::Cli::parse();
|
|
|
|
// If a subcommand was given, run in CLI mode (no GUI)
|
|
if let Some(command) = parsed.command {
|
|
// Initialize GTK minimally for GSettings access
|
|
gtk::init().expect("Failed to initialize GTK");
|
|
return cli::run_command(command);
|
|
}
|
|
|
|
// Otherwise, launch the full GUI application
|
|
gio::resources_register_include!("driftwood.gresource")
|
|
.expect("Failed to register resources");
|
|
|
|
let app = DriftwoodApplication::new(APP_ID, &gio::ApplicationFlags::empty());
|
|
app.run()
|
|
}
|