Skip to content

Commit

Permalink
add icon to exe #873
Browse files Browse the repository at this point in the history
  • Loading branch information
o2sh committed Nov 27, 2022
1 parent d082a83 commit 584574f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/windows-installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ DisableProgramGroupPage=yes
;PrivilegesRequired=lowest
OutputDir=..\..
OutputBaseFilename=onefetch-setup
SetupIconFile=..\..\assets\onefetch.ico
SetupIconFile=..\..\assets\onefetch.ico
UninstallDisplayIcon={app}\{#MyAppExeName}
Compression=lzma
SolidCompression=yes
WizardStyle=modern
Expand Down
10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ serde_json = "1"
serde_yaml = "0.9"
tera = { version = "1", default-features = false }

[target.'cfg(windows)'.build-dependencies]
winres = "0.1"

[target.'cfg(windows)'.dependencies]
enable-ansi-support = "0.1.2"

Expand Down
6 changes: 6 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ use std::path::Path;
use tera::{Context, Tera};

fn main() -> Result<(), Box<dyn Error>> {
#[cfg(windows)]
{
let mut res = winres::WindowsResource::new();
res.set_icon("assets/onefetch.ico");
res.compile()?;
}
let out_dir = env::var("OUT_DIR").expect("No OUT_DIR variable.");
let mut tera = Tera::default();
tera.register_filter("strip_color_tokens", strip_color_tokens_filter);
Expand Down

0 comments on commit 584574f

Please sign in to comment.