MCPcopy Create free account
hub / github.com/echQoQ/RustSL / copy_bundle_file

Function copy_bundle_file

build.rs:64–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62
63
64fn copy_bundle_file() {
65 let bundle_file = env::var("RSL_BUNDLE_FILE").expect("RSL_BUNDLE_FILE environment variable must be set when using with_forgery feature");
66
67 // Ensure absolute path
68 let bundle_file = std::path::Path::new(&bundle_file);
69 let bundle_file = if bundle_file.is_absolute() {
70 bundle_file.to_path_buf()
71 } else {
72 std::env::current_dir().unwrap().join(bundle_file)
73 };
74 let bundle_file_str = bundle_file.to_str().unwrap();
75
76 let content = format!("pub const MEMORY_FILE: &[u8] = include_bytes!(r\"{}\");\n", bundle_file_str);
77 fs::write("src/forgery/bundle_data.rs", content).expect("Failed to write bundle_data.rs");
78
79 println!("cargo:note=Generated bundle_data.rs with file: {}", bundle_file_str);
80}
81
82fn generate_icon_rc() {
83 let icon_path = env::var("RSL_ICON_PATH")

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected