mirror of
https://github.com/tauri-apps/tauri.git
synced 2025-01-03 00:21:34 +03:00
This commit is contained in:
parent
8da495f78c
commit
f887320df3
6
.changes/icon.md
Normal file
6
.changes/icon.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"tauri.js": patch
|
||||
---
|
||||
|
||||
Update the tauri template to properly set the app icon id on Windows so the webview can load the executable icon.
|
||||
To use it on old projects, update your `src-tauri/src/build.rs` file, replacing `res.set_icon("icons/icon.ico");` with `res.set_icon_with_id("icons/icon.ico", "32512");`.
|
@ -5,7 +5,7 @@ extern crate winres;
|
||||
fn main() {
|
||||
if std::path::Path::new("icons/icon.ico").exists() {
|
||||
let mut res = winres::WindowsResource::new();
|
||||
res.set_icon("icons/icon.ico");
|
||||
res.set_icon_with_id("icons/icon.ico", "32512");
|
||||
res.compile().expect("Unable to find visual studio tools");
|
||||
} else {
|
||||
panic!("No Icon.ico found. Please add one or check the path");
|
||||
|
@ -5,7 +5,7 @@ extern crate winres;
|
||||
fn main() {
|
||||
if std::path::Path::new("icons/icon.ico").exists() {
|
||||
let mut res = winres::WindowsResource::new();
|
||||
res.set_icon("icons/icon.ico");
|
||||
res.set_icon_with_id("icons/icon.ico", "32512");
|
||||
res.compile().expect("Unable to find visual studio tools");
|
||||
} else {
|
||||
panic!("No Icon.ico found. Please add one or check the path");
|
||||
|
Loading…
Reference in New Issue
Block a user