Skip to content

Commit 7eab34c

Browse files
committed
make the app compile using the icon, remove unused files
1 parent 6760767 commit 7eab34c

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ tower = { version = "0.4.13", features = ["full", "tokio"] }
2323
tower-http = { version = "0.4.3", features = ["full", "trace"] }
2424
tracing = "0.1.37"
2525
tracing-subscriber = "0.3.17"
26-
[package.metadata.windows]
27-
resource = "icon.res"
26+
[target.'cfg(target_os = "windows")'.build-dependencies]
27+
winres = "0.1"

build.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
fn main() {
2+
#[cfg(target_os = "windows")]
3+
{
4+
// Only compile resource files on Windows
5+
println!("cargo:rerun-if-changed=src/html_src/icon.ico");
6+
7+
// Compile the resource file only on Windows using winres crate
8+
let mut res = winres::WindowsResource::new();
9+
res.set_icon("src/html_src/icon.ico");
10+
res.compile().unwrap();
11+
}
12+
}

icon.rc

Lines changed: 0 additions & 1 deletion
This file was deleted.

icon.res

-94.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)