From cca0dabc2e00f12f94eb767c853a9612b6843cde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Baz=20Castillo?= Date: Fri, 20 Oct 2023 13:15:52 +0200 Subject: [PATCH] Use mediasoup_out_dir to store getmake.py and add it to PATH --- worker/build.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/worker/build.rs b/worker/build.rs index bb308b217d..3e40f83db6 100644 --- a/worker/build.rs +++ b/worker/build.rs @@ -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 @@ -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") @@ -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(