Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions neptune/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,39 @@ fn copy_mega_apps() {
}
}

/// run npm install in the libs/ztm
fn run_npm_install() {
#[cfg(any(target_os = "linux", target_os = "macos"))]
let _ = std::process::Command::new("npm")
.current_dir("libs/ztm/pipy")
.arg("install")
.output()
.expect("failed to run npm install in ztm/pipy");

#[cfg(target_os = "windows")]
let _ = std::process::Command::new("cmd.exe")
.current_dir("libs/ztm/pipy")
// .arg("install")
.arg("/C")
.arg("npm install")
.output()
.expect("failed to run npm install in ztm/pipy");
}

fn main() {
// check submodule exists
let check_file = Path::new("libs/ztm/pipy/CMakeLists.txt");
if !check_file.exists() {
panic!("Please run `git submodule update --init --recursive` to get the submodule");
}

copy_mega_apps();

build_agent_ui();

run_npm_install();

/* compile ztm & pipy */
// run npm install in the libs/ztm
let _ = std::process::Command::new("npm")
.current_dir("libs/ztm/pipy")
.arg("install")
.output()
.expect("failed to run npm install in ztm/pipy");

let mut config = Config::new("libs/ztm/pipy");

// set to use clang/clang++ to compile
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.