Skip to content

Commit

Permalink
fix(codegen): tray icon path is relative to the config directory
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Jun 15, 2022
1 parent dc432ef commit 562e8ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/fix-tray-icon-lookup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri-codegen": patch
---

Read the tray icon path relatively to the config directory.
2 changes: 1 addition & 1 deletion core/tauri-codegen/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?
Expand Down

0 comments on commit 562e8ca

Please sign in to comment.