mirror of
https://github.com/tauri-apps/tauri.git
synced 2025-01-03 00:21:34 +03:00
fix(codegen): tray icon path is relative to the config directory
This commit is contained in:
parent
dc432ef8b0
commit
562e8ca23f
5
.changes/fix-tray-icon-lookup.md
Normal file
5
.changes/fix-tray-icon-lookup.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-codegen": patch
|
||||
---
|
||||
|
||||
Read the tray icon path relatively to the config directory.
|
@ -242,7 +242,7 @@ pub fn context_codegen(data: ContextData) -> Result<TokenStream, EmbeddedAssetsE
|
||||
);
|
||||
|
||||
let system_tray_icon = if let Some(tray) = &config.tauri.system_tray {
|
||||
let system_tray_icon_path = tray.icon_path.clone();
|
||||
let system_tray_icon_path = config_parent.join(&tray.icon_path);
|
||||
let ext = system_tray_icon_path.extension();
|
||||
if ext.map_or(false, |e| e == "ico") {
|
||||
ico_icon(&root, &out_dir, system_tray_icon_path)?
|
||||
|
Loading…
Reference in New Issue
Block a user