2023-11-20 03:47:36 +00:00
|
|
|
use gtk::prelude::*;
|
|
|
|
use std::env;
|
|
|
|
|
2023-12-07 14:45:56 +00:00
|
|
|
const APP_ID_DEV: &str = "com.luminescent-dreams.fitnesstrax.dev";
|
|
|
|
// const APP_ID_PROD: &str = "com.luminescent-dreams.fitnesstrax";
|
|
|
|
|
|
|
|
const RESOURCE_BASE_PATH_DEV: &str = "/com/luminescent-dreams/fitnesstrax/dev/";
|
|
|
|
|
2023-11-20 03:47:36 +00:00
|
|
|
struct AppState {}
|
|
|
|
|
|
|
|
struct AppWindow {
|
|
|
|
window: adw::ApplicationWindow,
|
|
|
|
}
|
|
|
|
|
2023-11-13 13:52:10 +00:00
|
|
|
fn main() {
|
|
|
|
println!("Hello, world!");
|
2023-11-20 03:47:36 +00:00
|
|
|
|
2023-12-07 14:45:56 +00:00
|
|
|
let app_id = APP_ID_DEV;
|
|
|
|
let base_path = RESOURCE_BASE_PATH_DEV;
|
|
|
|
|
|
|
|
let settings = gio::Settings::new(app_id);
|
|
|
|
|
|
|
|
println!("database path: {}", settings.string("series-path"));
|
|
|
|
|
2023-11-20 03:47:36 +00:00
|
|
|
let app = adw::Application::builder()
|
2023-12-07 14:45:56 +00:00
|
|
|
.application_id(app_id)
|
|
|
|
.resource_base_path(base_path)
|
2023-11-20 03:47:36 +00:00
|
|
|
.build();
|
|
|
|
|
|
|
|
/*
|
|
|
|
let runtime = tokio::runtime::Builder::new_multi_thread()
|
|
|
|
.enable_all()
|
|
|
|
.build()
|
|
|
|
.unwrap();
|
|
|
|
*/
|
|
|
|
|
|
|
|
let app = adw::Application::builder()
|
|
|
|
.application_id("com.luminescent-dreams.fitnesstrax")
|
|
|
|
.resource_base_path("/com/luminescent-dreams/fitnesstrax")
|
|
|
|
.build();
|
|
|
|
|
|
|
|
app.connect_activate(move |app| {
|
|
|
|
let window = adw::ApplicationWindow::new(app);
|
|
|
|
window.present();
|
|
|
|
});
|
|
|
|
|
|
|
|
let args: Vec<String> = env::args().collect();
|
|
|
|
ApplicationExtManual::run_with_args(&app, &args);
|
2023-11-13 13:52:10 +00:00
|
|
|
}
|