feat: add icon on windows too
This commit is contained in:
parent
38a7f97cad
commit
0659698f19
5 changed files with 33 additions and 1 deletions
17
Cargo.lock
generated
17
Cargo.lock
generated
|
@ -2224,6 +2224,7 @@ dependencies = [
|
|||
"tokio-util",
|
||||
"toml",
|
||||
"urlencoding",
|
||||
"winresource",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2285,6 +2286,12 @@ version = "0.2.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b"
|
||||
|
||||
[[package]]
|
||||
name = "version_check"
|
||||
version = "0.9.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
|
||||
|
||||
[[package]]
|
||||
name = "want"
|
||||
version = "0.3.1"
|
||||
|
@ -2700,6 +2707,16 @@ dependencies = [
|
|||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winresource"
|
||||
version = "0.1.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ba4a67c78ee5782c0c1cb41bebc7e12c6e79644daa1650ebbc1de5d5b08593f7"
|
||||
dependencies = [
|
||||
"toml",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wit-bindgen-rt"
|
||||
version = "0.39.0"
|
||||
|
|
|
@ -23,3 +23,6 @@ opt-level = "z"
|
|||
lto = "thin"
|
||||
strip = true
|
||||
panic = "abort"
|
||||
|
||||
[build-dependencies]
|
||||
winresource = "0.1.20"
|
||||
|
|
13
build.rs
Normal file
13
build.rs
Normal file
|
@ -0,0 +1,13 @@
|
|||
use std::{env, io};
|
||||
|
||||
use winresource::WindowsResource;
|
||||
|
||||
fn main() -> Result<(), io::Error> {
|
||||
if env::var_os("CARGO_CFG_WINDOWS").is_some() {
|
||||
WindowsResource::new()
|
||||
.set_icon("res/tyrolienne.ico")
|
||||
.compile()?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
BIN
res/tyrolienne.ico
Normal file
BIN
res/tyrolienne.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
|
@ -391,7 +391,6 @@ impl AsyncComponent for Tyrolienne {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO app icon (windows)
|
||||
fn main() {
|
||||
match ffmpeg::check().and_then(|_| get_config()) {
|
||||
Ok(config) => RelmApp::new("net.uku3lig.tyrolienne").run_async::<Tyrolienne>(config),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue