Skip to content

Commit 584574f

Browse files
committed
add icon to exe #873
1 parent d082a83 commit 584574f

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

.github/workflows/windows-installer.iss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ DisableProgramGroupPage=yes
2525
;PrivilegesRequired=lowest
2626
OutputDir=..\..
2727
OutputBaseFilename=onefetch-setup
28-
SetupIconFile=..\..\assets\onefetch.ico
28+
SetupIconFile=..\..\assets\onefetch.ico
29+
UninstallDisplayIcon={app}\{#MyAppExeName}
2930
Compression=lzma
3031
SolidCompression=yes
3132
WizardStyle=modern

Cargo.lock

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ serde_json = "1"
5858
serde_yaml = "0.9"
5959
tera = { version = "1", default-features = false }
6060

61+
[target.'cfg(windows)'.build-dependencies]
62+
winres = "0.1"
63+
6164
[target.'cfg(windows)'.dependencies]
6265
enable-ansi-support = "0.1.2"
6366

build.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ use std::path::Path;
88
use tera::{Context, Tera};
99

1010
fn main() -> Result<(), Box<dyn Error>> {
11+
#[cfg(windows)]
12+
{
13+
let mut res = winres::WindowsResource::new();
14+
res.set_icon("assets/onefetch.ico");
15+
res.compile()?;
16+
}
1117
let out_dir = env::var("OUT_DIR").expect("No OUT_DIR variable.");
1218
let mut tera = Tera::default();
1319
tera.register_filter("strip_color_tokens", strip_color_tokens_filter);

0 commit comments

Comments
 (0)