summaryrefslogtreecommitdiffstats
path: root/ozone-cli/src/main.rs
blob: d14d2a130141483edb04554a87ef4476729987f0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use std::env::consts::{ARCH, OS};
use std::error::Error;
use std::path::PathBuf;
use log::info;
use sysinfo::System;
use o3launcher::launcher::Profile;

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    simple_logger::SimpleLogger::new().env().init().unwrap();
    
    info!("Hello, world!");
    info!("stuff: {:?} {:?} {:?} {:?} {:?}", System::name(), System::os_version(), System::long_os_version(), System::kernel_version(), System::cpu_arch());
    info!("stuff: {:?} {:?} {:?} {}", System::distribution_id(), OS, ARCH, size_of::<*const i32>());
    
    let launcher = o3launcher::launcher::Launcher::new(PathBuf::from("./work").as_path(), true).await?;
    let profile = Profile {
        version_id: "1.21.4".into(),
        java_runtime: None,
        instance: "".into()
    };
    launcher.prepare_launch(&profile).await?;
    info!("ok");
    
    Ok(())
}