skip unnecessary set_icon() during build script (fix #681)

This commit is contained in:
GyulyVGC
2025-02-16 11:35:38 +01:00
parent ddc1e173c4
commit 04f86db3a2
4 changed files with 6 additions and 42 deletions

View File

@@ -1,6 +1,3 @@
#[cfg(windows)]
extern crate winres;
use std::env;
use std::fs::File;
use std::io::{BufRead, BufReader, BufWriter, Write};
@@ -19,19 +16,9 @@ fn main() {
println!("cargo:rerun-if-changed={WINDOWS_ICON_PATH}");
println!("cargo:rerun-if-changed={SERVICES_LIST_PATH}");
set_icon();
build_services_phf();
}
fn set_icon() {
#[cfg(windows)]
{
let mut res = winres::WindowsResource::new();
res.set_icon(WINDOWS_ICON_PATH);
res.compile().unwrap();
}
}
fn build_services_phf() {
let out_path = Path::new(&env::var("OUT_DIR").unwrap()).join("services.rs");
let mut output = BufWriter::new(File::create(out_path).unwrap());