allow build to run on windows as well
This commit is contained in:
parent
9d1a807805
commit
556e64740a
@ -4,8 +4,8 @@ target = "xtensa-esp32-espidf"
|
|||||||
[target.xtensa-esp32-espidf]
|
[target.xtensa-esp32-espidf]
|
||||||
linker = "ldproxy"
|
linker = "ldproxy"
|
||||||
#runner = "espflash flash --monitor --partition-table partitions.csv" # Select this runner for espflash v2.x.x
|
#runner = "espflash flash --monitor --partition-table partitions.csv" # Select this runner for espflash v2.x.x
|
||||||
runner = "espflash flash --monitor --baud 921600 --partition-table partitions.csv" # Select this runner for espflash v2.x.x
|
#runner = "espflash flash --monitor --baud 921600 --partition-table partitions.csv" # Select this runner for espflash v2.x.x
|
||||||
#runner = "cargo runner"
|
runner = "cargo runner"
|
||||||
rustflags = [ "--cfg", "espidf_time64"] # Extending time_t for ESP IDF 5: https://github.com/esp-rs/rust/issues/110
|
rustflags = [ "--cfg", "espidf_time64"] # Extending time_t for ESP IDF 5: https://github.com/esp-rs/rust/issues/110
|
||||||
|
|
||||||
[unstable]
|
[unstable]
|
||||||
|
@ -6,19 +6,39 @@ fn main() {
|
|||||||
Command::new("rm")
|
Command::new("rm")
|
||||||
.arg("./src/webserver/bundle.js")
|
.arg("./src/webserver/bundle.js")
|
||||||
.output()
|
.output()
|
||||||
.expect("failed to execute process");
|
.unwrap();
|
||||||
|
|
||||||
let output = Command::new("npx")
|
match Command::new("cmd").spawn() {
|
||||||
.arg("webpack")
|
Ok(_) => {
|
||||||
.current_dir("./src_webpack")
|
println!("Assuming build on windows");
|
||||||
.output()
|
let output = Command::new("cmd")
|
||||||
.expect("failed to execute process");
|
.arg("/K")
|
||||||
|
.arg("npx")
|
||||||
|
.arg("webpack")
|
||||||
|
.current_dir("./src_webpack")
|
||||||
|
.output()
|
||||||
|
.unwrap();
|
||||||
|
println!("status: {}", output.status);
|
||||||
|
println!("stdout: {}", String::from_utf8_lossy(&output.stdout));
|
||||||
|
println!("stderr: {}", String::from_utf8_lossy(&output.stderr));
|
||||||
|
assert!(output.status.success());
|
||||||
|
},
|
||||||
|
Err(_) => {
|
||||||
|
println!("Assuming build on linux");
|
||||||
|
let output = Command::new("bash")
|
||||||
|
.arg("webpack")
|
||||||
|
.current_dir("./src_webpack")
|
||||||
|
.output()
|
||||||
|
.unwrap();
|
||||||
|
println!("status: {}", output.status);
|
||||||
|
println!("stdout: {}", String::from_utf8_lossy(&output.stdout));
|
||||||
|
println!("stderr: {}", String::from_utf8_lossy(&output.stderr));
|
||||||
|
assert!(output.status.success());
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
println!("status: {}", output.status);
|
|
||||||
println!("stdout: {}", String::from_utf8_lossy(&output.stdout));
|
|
||||||
println!("stderr: {}", String::from_utf8_lossy(&output.stderr));
|
|
||||||
|
|
||||||
assert!(output.status.success());
|
|
||||||
|
|
||||||
embuild::espidf::sysenv::output();
|
embuild::espidf::sysenv::output();
|
||||||
let _ = EmitBuilder::builder().all_git().emit();
|
let _ = EmitBuilder::builder().all_git().emit();
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly"
|
channel = "nightly"
|
||||||
|
toolchain = "esp"
|
||||||
|
Loading…
Reference in New Issue
Block a user