Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for compatibility tool name not being created; Will need to reset luxtorpeda as compat tool for games #271

Merged
merged 1 commit into from
Jan 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion post_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use xz2::write::XzEncoder;

// These variables are used to generate compatibilitytool.vdf
const TOOL_NAME: &str = "luxtorpeda";
const TOOL_NAME_DEV: &str = "luxtorpeda_dev";
const TOOL_NAME_DISPLAY: &str = "Luxtorpeda";
const TOOL_NAME_DISPLAY_DEV: &str = "Luxtorpeda (dev)";

Expand Down Expand Up @@ -110,7 +111,14 @@ fn create_compatibilitytool_vdf(out_dir: &str, profile: &str) {
"debug" => TOOL_NAME_DISPLAY_DEV,
_ => TOOL_NAME_DISPLAY
};
let file_str = template_str.replace("%display_name%", display_name);

let tool_name = match profile {
"debug" => TOOL_NAME_DEV,
_ => TOOL_NAME
};

let mut file_str = template_str.replace("%display_name%", display_name);
file_str = file_str.replace("%name%", tool_name);
fs::write(output_path, file_str).expect("create_compatibilitytool_vdf write error");
}

Expand Down