dec05eba/gpu-screen-recorder-issues

GTK front end is using old libappindicator

3vi1 opened this issue · 3 comments

3vi1 commented

I'm not sure if this is a problem for other distros yet, but the Ubuntu Oracular Oriole (24.10) development repos have migrated from libappindicator3-1 to the newer libayatana-appindicator3-1. The packages conflict, so you can't have both installed.

Building gui...
src/main.cpp:24:10: fatal error: libappindicator/app-indicator.h: No such file or directory
   24 | #include <libappindicator/app-indicator.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

As Ayatana is backwards compatible, I was able to get it to compile with the newer library by doing the following:

  • Change the include in the error above to "#include <libayatana-appindicator/app-indicator.h>"
  • Remove -Werror from the opts in build.sh so that the deprecated functions don't stop the compile.
  • In the dependencies, replace appindicator3-0.1 with ayatana-appindicator3-0.1

It might be a good idea to make these conditional if possible - preferring Ayatana, but falling back to appindicator on older distros.

Thanks for your hard work on this cool utility!

Thanks for telling me that. On arch linux I dont even have libayatana-appindicator installed so it seems like most applications still use libappindicator on arch, but you can have both installed on arch so it should be solveable.
edit: it seems like libappindicator is the package that is easiest to depend on in flatpaks: https://github.com/flathub/shared-modules/tree/master/libappindicator
there is no equivalent for libayatana. I'll have to take a look at building it myself.

Can you pull the latest changes and try if it works on ubuntu? thanks

3vi1 commented

Yep - pulled, built clean, installed, and the tray icon is working fine. Thanks!

Edit: Note - I stashed my changes first and checked the source to make sure I was compiling your latest commit. I have a feeling the indicator packages were purposefully made to conflict on Ubuntu in order to push app maintainers away from the unsupported appindicators lib. Thanks again for updating this - and so fast!