From 78e4e18176b9d71f7e2b5eaa7ab3a329f735e4ac Mon Sep 17 00:00:00 2001 From: mxve <68632137+mxve@users.noreply.github.com> Date: Tue, 15 Aug 2023 11:10:40 +0200 Subject: [PATCH] fix: don't run setup_client_links on unix --- src/main.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index cedfb62..3631e8a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -137,7 +137,7 @@ fn get_installed_games(games: &Vec) -> Vec<(u32, PathBuf)> { #[cfg(windows)] fn setup_client_links(game: &Game, game_dir: &Path) { if game.client.len() > 1 { - println!("Multiple clients installed, use the specific shortcuts (launch-.lnk in game directory or desktop shortcuts) to launch a specific client"); + println!("Multiple clients installed, use the shortcuts (launch-.lnk in the game directory or desktop shortcuts) to launch a specific client."); } let target = game_dir.join("alterware-launcher.exe"); @@ -299,9 +299,12 @@ fn main() { for r in g.references.iter() { if std::path::Path::new(r).exists() { if g.client.len() > 1 { + #[cfg(windows)] setup_client_links(g, &std::env::current_dir().unwrap()); - println!("Multiple clients available, please specify the ID of the game you want to launch:"); - println!("To skip this prompt use the launch-.lnk shortcuts in the game folder."); + + #[cfg(not(windows))] + println!("Multiple clients installed, set the client as the first argument to launch a specific client."); + for (i, c) in g.client.iter().enumerate() { println!("{}: {}", i, c); }