Windows build

This commit is contained in:
Piotr Osiewicz 2025-08-18 19:40:48 +02:00
parent 2f3be75fc7
commit 3b801880a6

View file

@ -327,10 +327,10 @@ mod windows {
/// You can set the `GPUI_FXC_PATH` environment variable to specify the path to the fxc.exe compiler. /// You can set the `GPUI_FXC_PATH` environment variable to specify the path to the fxc.exe compiler.
fn find_fxc_compiler() -> String { fn find_fxc_compiler() -> String {
// Check environment variable // Check environment variable
if let Ok(path) = std::env::var("GPUI_FXC_PATH") { if let Ok(path) = std::env::var("GPUI_FXC_PATH")
if Path::new(&path).exists() { && Path::new(&path).exists()
return path; {
} return path;
} }
// Try to find in PATH // Try to find in PATH
@ -338,11 +338,10 @@ mod windows {
if let Ok(output) = std::process::Command::new("where.exe") if let Ok(output) = std::process::Command::new("where.exe")
.arg("fxc.exe") .arg("fxc.exe")
.output() .output()
&& output.status.success()
{ {
if output.status.success() { let path = String::from_utf8_lossy(&output.stdout);
let path = String::from_utf8_lossy(&output.stdout); return path.trim().to_string();
return path.trim().to_string();
}
} }
// Check the default path // Check the default path