Skip to content

Commit

Permalink
Use devenv.com instead of devenv.exe
Browse files Browse the repository at this point in the history
For some reason on some Visual Studio installs devenv.exe just returns
immediately with an error code and runs the build in the background. It
also doesn't emit any output via stdout/stderr. According to [1]
devenv.com is the executable to use for build output via stdout/stderr
and it doesn't misbehave so switch to that.

[1]: https://docs.microsoft.com/en-us/visualstudio/ide/reference/devenv-command-line-switches?view=vs-2019
  • Loading branch information
Bobo1239 committed Aug 12, 2021
1 parent c8c3df6 commit fca7470
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mupdf-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ fn build_libmupdf() {
let mupdf_src_dir = current_dir.join("mupdf");
cp_r(&mupdf_src_dir, &build_dir);

let devenv = cc::windows_registry::find(target.as_str(), "devenv.exe");
let devenv = cc::windows_registry::find(target.as_str(), "devenv.com");
if let Some(mut devenv) = devenv {
let d = devenv
.args(&["/upgrade", "platform\\win32\\mupdf.sln"])
Expand Down Expand Up @@ -305,7 +305,7 @@ fn build_libmupdf() {
if cfg!(not(feature = "js")) {
cl_env.push("/DFZ_ENABLE_JS#0".to_string());
}
let d = cc::windows_registry::find(target.as_str(), "devenv.exe")
let d = cc::windows_registry::find(target.as_str(), "devenv.com")
.unwrap()
.args(&[
"platform\\win32\\mupdf.sln",
Expand Down

0 comments on commit fca7470

Please sign in to comment.