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