Windows build
This commit is contained in:
parent
2f3be75fc7
commit
3b801880a6
1 changed files with 7 additions and 8 deletions
|
@ -327,23 +327,22 @@ 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
|
||||||
// NOTE: This has to be `where.exe` on Windows, not `where`, it must be ended with `.exe`
|
// NOTE: This has to be `where.exe` on Windows, not `where`, it must be ended with `.exe`
|
||||||
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
|
||||||
if Path::new(r"C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\fxc.exe")
|
if Path::new(r"C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\fxc.exe")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue