This commit is contained in:
Googlefan
2025-02-23 05:14:56 +00:00
parent 6fc0a47a78
commit 4d00fcd0bc
3 changed files with 58 additions and 49 deletions

View File

@@ -43,5 +43,5 @@ aivmx = ["npyz", "base64"]
base64 = ["dep:base64"]
[build-dependencies]
home-dir = "0.1.0"
dirs = "6.0.0"
ureq = "3.0.6"

View File

@@ -1,12 +1,11 @@
use dirs::home_dir;
use std::env;
use std::fs;
use std::io::copy;
use std::path::PathBuf;
use home_dir::HomeDirExt;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let static_path = "~/.cache/sbv2/all.bin".expand_home().unwrap();
let static_path = home_dir().unwrap().join(".cache/sbv2/all.bin");
let out_path = PathBuf::from(&env::var("OUT_DIR").unwrap()).join("all.bin");
println!("cargo:rerun-if-changed=build.rs");
if static_path.exists() {