diff --git a/src/main.rs b/src/main.rs index 17b49b8..cf9aa7e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,16 +12,17 @@ fn main() { .author("hippoz ") .about("Simplifies the process of installing and running Roblox on Linux using WINE") .subcommand(SubCommand::with_name("up") - .about("Installs required software and prepares environment") + .about("Installs required software and prepares environment. You usually only need to run this once per user.") ) .subcommand(SubCommand::with_name("player") - .about("Runs the game client") - .arg_from_usage(" The protocol joinstring") + .about("Runs Roblox Player using the specified joinstring, if no joinstring is provided, it will be ran with no arguments.") + .arg_from_usage("[JOINSTRING] The protocol joinstring") ) .subcommand(SubCommand::with_name("studio") - .about("Runs the studio") - .arg_from_usage(" The protocol joinstring") + .about("Runs Roblox Studio using the specified joinstring, if no joinstring is provided, it will be ran with no arguments.") + .arg_from_usage("[JOINSTRING] The protocol joinstring") ) + .setting(clap::AppSettings::ArgRequiredElseHelp) .get_matches(); if let Some(_matches) = matches.subcommand_matches("up") { @@ -29,11 +30,11 @@ fn main() { installctl::deploy_protocol_associations(); winectl::wine_launch(installctl::get_game_launcher_binary(), "".to_string()); } else if let Some(matches) = matches.subcommand_matches("player") { - let joinstring = matches.value_of("JOINSTRING").expect("err: launcher: failed to get joinstring"); + let joinstring = matches.value_of("JOINSTRING").unwrap_or(""); println!("info: launching player"); winectl::wine_launch(installctl::get_game_launcher_binary(), joinstring.to_string()) } else if let Some(matches) = matches.subcommand_matches("studio") { - let joinstring = matches.value_of("JOINSTRING").expect("err: launcher: failed to get joinstring"); + let joinstring = matches.value_of("JOINSTRING").unwrap_or(""); println!("info: launching studio"); winectl::wine_launch(installctl::get_studio_launcher_binary(), joinstring.to_string()) }