[READ-ONLY] Mirror of https://github.com/mrgnw/dlna-rs. Single-binary DLNA media server in Rust. Auto-discovered by VLC on Apple TV.
0

Configure Feed

Select the types of activity you want to include in your feed.

dlna-rs / build.rs
969 B 37 lines
1use std::path::PathBuf; 2use std::process::Command; 3 4fn main() { 5 let manifest = PathBuf::from(env!("CARGO_MANIFEST_DIR")); 6 let web = manifest.join("web"); 7 if !web.exists() { 8 println!("cargo:warning=web/ missing; skipping bundle build"); 9 return; 10 } 11 println!("cargo:rerun-if-changed=web/package.json"); 12 println!("cargo:rerun-if-changed=web/vite.config.js"); 13 println!("cargo:rerun-if-changed=web/index.html"); 14 println!("cargo:rerun-if-changed=web/src"); 15 16 if !web.join("node_modules").exists() { 17 let status = Command::new("bun") 18 .arg("install") 19 .current_dir(&web) 20 .status(); 21 match status { 22 Ok(s) if s.success() => {} 23 _ => { 24 println!("cargo:warning=bun install failed; web UI may be missing"); 25 return; 26 } 27 } 28 } 29 let status = Command::new("bun") 30 .args(["run", "build"]) 31 .current_dir(&web) 32 .status(); 33 match status { 34 Ok(s) if s.success() => {} 35 _ => println!("cargo:warning=bun run build failed; web UI may be missing"), 36 } 37}