feat: embed the carrier icon in the Windows exe
This commit is contained in:
parent
65c0ad2c77
commit
0b20b56cba
4 changed files with 24 additions and 0 deletions
11
Cargo.lock
generated
11
Cargo.lock
generated
|
|
@ -125,6 +125,7 @@ dependencies = [
|
||||||
"rand_core",
|
"rand_core",
|
||||||
"relm4",
|
"relm4",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
|
"winresource",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -1630,6 +1631,16 @@ dependencies = [
|
||||||
"memchr",
|
"memchr",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "winresource"
|
||||||
|
version = "0.1.31"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "0986a8b1d586b7d3e4fe3d9ea39fb451ae22869dcea4aa109d287a374d866087"
|
||||||
|
dependencies = [
|
||||||
|
"toml",
|
||||||
|
"version_check",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "x25519-dalek"
|
name = "x25519-dalek"
|
||||||
version = "2.0.1"
|
version = "2.0.1"
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,8 @@ relm4 = { version = "0.9", features = ["libadwaita"] }
|
||||||
rand_core = { version = "0.6", features = ["getrandom"] }
|
rand_core = { version = "0.6", features = ["getrandom"] }
|
||||||
qrcodegen = "1"
|
qrcodegen = "1"
|
||||||
|
|
||||||
|
[build-dependencies]
|
||||||
|
winresource = "0.1"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tempfile = "3"
|
tempfile = "3"
|
||||||
|
|
|
||||||
10
build.rs
Normal file
10
build.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
// Windows reads the taskbar and Explorer icon from the exe's resource
|
||||||
|
// section; desktop environments on other platforms use the desktop file.
|
||||||
|
fn main() {
|
||||||
|
println!("cargo:rerun-if-changed=data/icons/com.randogoth.carrier.ico");
|
||||||
|
if std::env::var("CARGO_CFG_WINDOWS").is_ok() {
|
||||||
|
let mut res = winresource::WindowsResource::new();
|
||||||
|
res.set_icon("data/icons/com.randogoth.carrier.ico");
|
||||||
|
res.compile().expect("failed to embed Windows icon");
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
data/icons/com.randogoth.carrier.ico
Normal file
BIN
data/icons/com.randogoth.carrier.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
Loading…
Add table
Add a link
Reference in a new issue