mirror of
https://github.com/ALEZ-DEV/Babylonia-terminal.git
synced 2025-12-15 17:08:51 +00:00
added clap
This commit is contained in:
parent
107317afde
commit
c6103be68d
@ -3,7 +3,7 @@ name = "babylonia-terminal-cli"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
authors = ["ALEZ-DEV <raidersfocus@gmail.com>"]
|
||||
description = "A launcher for a certain anime game "
|
||||
description = "A launcher to launch a certain anime game on linux"
|
||||
repository = "https://github.com/ALEZ-DEV/Babylonia-terminal"
|
||||
license = "LGPL-3.0-or-later"
|
||||
keywords = ["launcher", "game"]
|
||||
@ -16,6 +16,8 @@ name = "babylonia-terminal-cli"
|
||||
[dependencies]
|
||||
anyhow = "1.0.83"
|
||||
babylonia-terminal-sdk = { path = "./../babylonia-terminal-sdk" }
|
||||
clap = { version = "4.5.7", features = ["derive"] }
|
||||
derive = "1.0.0"
|
||||
dialoguer = "0.11.0"
|
||||
downloader = { git = "https://github.com/ALEZ-DEV/downloader" } # version = "0.2.7",
|
||||
indicatif = "0.17.8"
|
||||
|
||||
9
babylonia-terminal-cli/src/arguments.rs
Normal file
9
babylonia-terminal-cli/src/arguments.rs
Normal file
@ -0,0 +1,9 @@
|
||||
use clap::Parser;
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(author, version, about, long_about = None)]
|
||||
pub struct Args {
|
||||
/// Pass launch options to tink the behavior of the game
|
||||
#[arg(long)]
|
||||
pub options: Option<String>,
|
||||
}
|
||||
@ -8,14 +8,17 @@ use babylonia_terminal_sdk::{
|
||||
game_manager::GameManager,
|
||||
game_state::GameState,
|
||||
};
|
||||
use clap::Parser;
|
||||
use log::{debug, info, LevelFilter};
|
||||
use simple_logger::SimpleLogger;
|
||||
use tokio::io::{AsyncBufReadExt, BufReader};
|
||||
use wincompatlib::prelude::*;
|
||||
|
||||
mod arguments;
|
||||
pub mod reporter;
|
||||
pub mod utils;
|
||||
|
||||
use crate::arguments::Args;
|
||||
use crate::reporter::DownloadReporter;
|
||||
|
||||
#[tokio::main]
|
||||
@ -34,6 +37,9 @@ async fn main() {
|
||||
simple_logger.with_level(LevelFilter::Info).init().unwrap();
|
||||
}
|
||||
|
||||
let args = Args::parse();
|
||||
debug!("Launch option -> {:?}", args.options);
|
||||
|
||||
let mut proton_component: Option<ProtonComponent> = None;
|
||||
let mut proton: Option<Proton> = None;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user