Skip to content

Commit

Permalink
Use mediasoup_out_dir to store getmake.py and add it to PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Oct 20, 2023
1 parent c856bb3 commit cca0dab
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions worker/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fn main() {
};

let out_dir = env::var("OUT_DIR").unwrap();
// Force forward slashes on Windows too so that is plays well with our dumb `Makefile`
// Force forward slashes on Windows too so that is plays well with our dumb `Makefile`.
let mediasoup_out_dir = format!("{}/out", out_dir.replace('\\', "/"));

// Add C++ std lib
Expand Down Expand Up @@ -91,8 +91,7 @@ fn main() {
"python".to_string()
};

let worker_abs_path = env::current_dir().unwrap();
let dir = worker_abs_path.join("out/msys");
let dir = format!("{}/msys", mediasoup_out_dir.replace('\\', "/"));

if !Command::new(python)
.arg("scripts\\getmake.py")
Expand All @@ -104,6 +103,11 @@ fn main() {
{
panic!("Failed to install MSYS/make")
}

env::set_var(
"PATH",
format!("{}\\bin;{}", dir, env::var("PATH").unwrap()),
);
}

env::set_var(
Expand Down

0 comments on commit cca0dab

Please sign in to comment.