leanflutter / tray_manager

This plugin allows Flutter desktop apps to defines system tray.
https://pub.dev/packages/tray_manager
MIT License
230 stars 36 forks source link

Library can't be loaded on Debian 11 #16

Closed redsolver closed 2 years ago

redsolver commented 2 years ago

When trying to run a compiled application using this plugin on Debian 11, it crashes with error while loading shared libraries: libappindicator3.so.1: cannot open shared object file: No such file or directory This is likely caused by Debian removing libappindicator3-1 from their repositories because it's deprecated (https://www.reddit.com/r/debian/comments/pn1oia/what_happened_to_libappindicator31_in_debian_11/)

The recommended solution is to switch to libayatana-appindicator3-1, but this change needs to be added to all applications. So I guess the best way to fix this plugin is to check if libayatana is available on the user's system and use that instead.

lijy91 commented 2 years ago

I found some code, I will try it later

https://github.com/ianmrae1/technicausbbr-tray/blob/6904c55f94c8996f4057701948133aaf04160f92/src/CMakeLists.txt#L22-L29

https://github.com/ianmrae1/technicausbbr-tray/blob/6904c55f94c8996f4057701948133aaf04160f92/src/Application.h#L14-L18

lijy91 commented 2 years ago

https://github.com/leanflutter/tray_manager/pull/17

lijy91 commented 2 years ago

Fixed in this pr https://github.com/leanflutter/tray_manager/pull/17