refactor: compile applets as multicall binary

This commit is contained in:
Michael Aaron Murphy 2024-03-14 18:47:41 +01:00 committed by Michael Murphy
parent 4099624499
commit 3c4acdacd7
48 changed files with 2393 additions and 2256 deletions

View file

@ -1,3 +1 @@
pub const APP_ID: &str = "com.system76.CosmicAppletNetwork";
pub const PROFILE: &str = "";
pub const VERSION: &str = "0.1.0";

View file

@ -0,0 +1,13 @@
// SPDX-License-Identifier: GPL-3.0-or-later
mod app;
mod config;
mod localize;
mod network_manager;
use crate::localize::localize;
pub fn run() -> cosmic::iced::Result {
localize();
app::run()
}

View file

@ -1,24 +1,10 @@
// SPDX-License-Identifier: GPL-3.0-or-later
mod app;
mod config;
mod localize;
mod network_manager;
use log::info;
use crate::config::{APP_ID, PROFILE, VERSION};
use crate::localize::localize;
const VERSION: &str = env!("CARGO_PKG_VERSION");
fn main() -> cosmic::iced::Result {
// Initialize logger
tracing_subscriber::fmt::init();
let _ = tracing_log::LogTracer::init();
info!("Iced Workspaces Applet ({})", APP_ID);
info!("Version: {} ({})", VERSION, PROFILE);
// Prepare i18n
localize();
tracing::info!("Starting network applet with version {VERSION}");
app::run()
cosmic_applet_network::run()
}