Closed DWHengr closed 1 month ago
You can't use tray-icon with Tauri v1, only in v2 (it's part of tauri v2 so no need to use this crate). This is not a bug, more like a limitation.
So how do I use it in v1
Or do I have to use v2 to use this tray event
Like I said, you can't use this library in v1. You need to migrate to v2 if Tauri's v1 tray apis don't work for you.
Ok, so is there a good way to migrate v1 to v2?
We're working on migration docs here https://beta.tauri.app/start/migrate/from-tauri-1/ (not perfect yet). If your app is new/small i'd recommend to just create a new one via create-tauri-app --beta
and move your old files over.
In the v2 version, the tray icon version uses 0.13.5. How do I use 0.14.0. @FabianLars
You can wait for us to update it, open a PR to update it, or use the tray-icon crate directly (a bit harder because of the threading requirements)
Nevermind, Tauris was already updated. In the next tauri release you'll have access to 0.14
error: failed to select a version for
gtk-sys
. ... required by packagerfd v0.9.0
... which satisfies dependencyrfd = "^0.9"
of packagetauri v1.0.0
... which satisfies dependencytauri = "^1"
of packagelinyu-client v0.0.1 (C:\Users\duwei\Desktop\linyu\linyu-client\src-tauri)
versions that meet the requirements^0.15.1
are: 0.15.3, 0.15.1the package
gtk-sys
links to the native librarygtk-3
, but it conflicts with a previous package which links togtk-3
as well: packagegtk-sys v0.18.0
... which satisfies dependencyffi = "^0.18"
of packagegtk v0.18.1
... which satisfies dependencygtk = "^0.18"
of packagelibappindicator v0.9.0
... which satisfies dependencylibappindicator = "^0.9"
of packagetray-icon v0.14.0
... which satisfies dependencytray-icon = "^0.14.0"
of packagelinyu-client v0.0.1 (C:\Users\heath\Desktop\linyu\linyu-client\src-tauri)
Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the links ='gtk-sys' value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.