Moved templates to be embedded in executable

This commit is contained in:
Manuel Forcén Muñoz 2024-06-03 18:39:17 +02:00
parent b676be8cb2
commit 1c1a9589b7
25 changed files with 957 additions and 256 deletions

View file

@ -5,10 +5,17 @@ fn main() {
Command::new("npx")
.args(&["tailwindcss", "-i", "base.css", "-o"])
.arg(&format!(
"{}/static/styles.css",
"{}/webserver/src/static/styles.css",
current_dir().unwrap().into_os_string().to_str().unwrap()
))
.status()
.unwrap();
println!("cargo:rerun-if-changed=templates/")
println!("cargo:rerun-if-changed=templates/");
let target_arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap();
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
if target_arch == "x86_64" && target_os == "android" {
println!("cargo:rustc-link-search=/home/forcen/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/");
println!("cargo:rustc-link-lib=static=clang_rt.builtins-x86_64-android");
}
}