Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tray-icon = "0.14.0" Failed to reference on win11 #163

Closed
DWHengr opened this issue May 23, 2024 · 9 comments
Closed

tray-icon = "0.14.0" Failed to reference on win11 #163

DWHengr opened this issue May 23, 2024 · 9 comments

Comments

@DWHengr
Copy link

DWHengr commented May 23, 2024

error: failed to select a version for gtk-sys.
... required by package rfd v0.9.0
... which satisfies dependency rfd = "^0.9" of package tauri v1.0.0
... which satisfies dependency tauri = "^1" of package linyu-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.1

the package gtk-sys links to the native library gtk-3, but it conflicts with a previous package which links to gtk-3 as well:
package gtk-sys v0.18.0
... which satisfies dependency ffi = "^0.18" of package gtk v0.18.1
... which satisfies dependency gtk = "^0.18" of package libappindicator v0.9.0
... which satisfies dependency libappindicator = "^0.9" of package tray-icon v0.14.0
... which satisfies dependency tray-icon = "^0.14.0" of package linyu-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.

@DWHengr DWHengr changed the title tray-icon = "0.14.0" Failed to reference on win111 tray-icon = "0.14.0" Failed to reference on win11 May 23, 2024
@FabianLars
Copy link
Member

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.

@DWHengr
Copy link
Author

DWHengr commented May 23, 2024

So how do I use it in v1

@DWHengr
Copy link
Author

DWHengr commented May 23, 2024

Or do I have to use v2 to use this tray event

@FabianLars
Copy link
Member

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.

@DWHengr
Copy link
Author

DWHengr commented May 23, 2024

Ok, so is there a good way to migrate v1 to v2?

@amrbashir amrbashir closed this as not planned Won't fix, can't repro, duplicate, stale May 23, 2024
@FabianLars
Copy link
Member

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.

@DWHengr
Copy link
Author

DWHengr commented May 24, 2024

In the v2 version, the tray icon version uses 0.13.5. How do I use 0.14.0.
@FabianLars

@FabianLars
Copy link
Member

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)

@FabianLars
Copy link
Member

Nevermind, Tauris was already updated. In the next tauri release you'll have access to 0.14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants