Made the Steam game download function work for both Windows and Linux
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Gregory Ballantine 2022-08-22 13:47:49 -04:00
parent 4aa3eddc91
commit 7b7150886a

View File

@ -17,8 +17,13 @@ pub fn run_demd_benchmark() {
} }
fn download_game_steam(game_id: u32) { fn download_game_steam(game_id: u32) {
let mut steam_path = "steam";
if cfg!(windows) {
steam_path = "C:\\Program Files (x86)\\Steam\\steam.exe";
}
// first we need to make sure CS:GO is installed via Steam // first we need to make sure CS:GO is installed via Steam
let install_output = Command::new("C:\\Program Files (x86)\\Steam\\steam.exe") let install_output = Command::new(steam_path)
.arg(format!("steam://install/{}", game_id)) .arg(format!("steam://install/{}", game_id))
.output() .output()
.expect("Failed to execute command"); .expect("Failed to execute command");