GithubHelp home page GithubHelp logo

libappindicator-rs's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libappindicator-rs's Issues

Don't require libclang by default

It seems like libappindicator-sys requires libclang to build (possibly due to bindgen):

14:34:30|~/projects/systray-rs|master⚡?
λ cargo run --example systray-example
   Compiling futures-executor v0.3.5
   Compiling libappindicator-sys v0.4.0
error: failed to run custom build command for `libappindicator-sys v0.4.0`

Caused by:
  process didn't exit successfully: `/home/matklad/projects/systray-rs/target/debug/build/libappindicator-sys-bbedb3ed9e28adf0/build-script-build` (exit code: 101)
--- stdout
cargo:rustc-link-lib=appindicator3
cargo:rustc-link-search=native=/nix/store/qm1h65bw28h0gffcagq88csh0hl8ka15-gtk+3-3.24.13/lib
cargo:rustc-link-search=native=/nix/store/dara95ay6r49srnia5fllxg84n4fr3qc-atk-2.34.1/lib
cargo:rustc-link-search=native=/nix/store/3h14bkgm9har3rdds7924drn75plnhla-glib-2.62.4/lib
cargo:rustc-link-search=native=/nix/store/5nbgbfc68hfmy6hqr9iap8jpl0mb6882-cairo-1.16.0/lib
cargo:rustc-link-search=native=/nix/store/6x2ypk1p1kbij71cdwd92vxpi1jx923z-gdk-pixbuf-2.40.0/lib
cargo:rustc-link-search=native=/nix/store/aqy2zrf4ax7nab6vbfacns9708bhvly2-pango-1.44.7/lib
cargo:rustc-link-search=native=/nix/store/m0j3kjgrb9v9zbkr0m48layw1lj4ssbl-harfbuzz-2.6.4/lib
cargo:rustc-link-search=native=/nix/store/c5w9axdm5damqb0qrjn7rn54q4h3gvjd-libappindicator-gtk3-12.10.0/lib
cargo:rustc-link-search=native=/nix/store/qd126mlckjg6wk1v8zmbvnr3nrlwb26g-libdbusmenu-gtk3-16.04.0/lib
cargo:rustc-link-lib=appindicator3
cargo:rustc-link-lib=dbusmenu-glib
cargo:rustc-link-lib=gtk-3
cargo:rustc-link-lib=gdk-3
cargo:rustc-link-lib=pangocairo-1.0
cargo:rustc-link-lib=pango-1.0
cargo:rustc-link-lib=harfbuzz
cargo:rustc-link-lib=atk-1.0
cargo:rustc-link-lib=cairo-gobject
cargo:rustc-link-lib=cairo
cargo:rustc-link-lib=gdk_pixbuf-2.0
cargo:rustc-link-lib=gio-2.0
cargo:rustc-link-lib=gobject-2.0
cargo:rustc-link-lib=glib-2.0

--- stderr
thread 'main' panicked at 'Unable to find libclang: "couldn\'t find any valid shared libraries matching: [\'libclang.so\', \'libclang-*.so\', \'libclang.so.*\'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"', /home/matklad/.cargo/registry/src/github.com-1ecc6299db9ec823/bindgen-0.52.0/src/lib.rs:1895:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

warning: build failed, waiting for other jobs to finish...
error: build failed

It seems like this shouldn't be the case though? Would it be possible to vendor generated code ? I would think that libappindicator is ABI-stable.

Cannot build on Fedora32

I'm trying to build on Fedora32 and it cannot find libappindicator3:

--- stderr
thread 'main' panicked at 'libappindicator3 library not found!', /home/andrew/.cargo/registry/src/github.com-1ecc6299db9ec823/libappindicator-sys-0.5.0/build.rs:35:23
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

warning: build failed, waiting for other jobs to finish...
error: build failed

But I already have it and devel package installed:

sudo yum install libappindicator-gtk3
created by dnf config-manager from https://fedoraproject.  25 kB/s |  11 kB     00:00    
Last metadata expiration check: 0:28:44 ago on Fri 24 Jul 2020 05:25:58 PM CEST.
Package libappindicator-gtk3-12.10.0-28.fc32.x86_64 is already installed.
Package libappindicator-gtk3-12.10.0-28.fc32.i686 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
sudo yum install libappindicator-gtk3-devel
created by dnf config-manager from https://fedoraproject.  28 kB/s |  11 kB     00:00    
Last metadata expiration check: 0:28:05 ago on Fri 24 Jul 2020 05:25:58 PM CEST.
Package libappindicator-gtk3-devel-12.10.0-28.fc32.i686 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

Any suggestions?

Licensing?

I noticed the README stating the following:

tl;dr GNU LGPL v2.1, GNU LGPL v3 (Following license of libappindicator)

Licensed under the LGPL License, Version 3.0 (the "License");
you may not use this file except in compliance with the License.

The mention of 2.1 but then only saying 3.0 in the piece under the licensing confused me.

Is that indicating that users may use the code under either LGPL-2.1 OR LGPL-3.0, or is it indicating something else?

Failed to run example on Linux because undefined references

Hi,

Could not run libappindicator-example on Linux Mint 18.3 because linking issue:

vit@evergreen ~/prjs $ git clone https://github.com/qdot/libappindicator-rs.git
Cloning into 'libappindicator-rs'...
remote: Enumerating objects: 65, done.
remote: Total 65 (delta 0), reused 0 (delta 0), pack-reused 65
Unpacking objects: 100% (65/65), done.
Checking connectivity... done.
vit@evergreen ~/prjs $ cd libappindicator-rs/
vit@evergreen ~/prjs/libappindicator-rs $ cargo run -v --example libappindicator-example
    Updating registry `https://github.com/rust-lang/crates.io-index`
~...~
  = note: /home/vit/prjs/libappindicator-rs/target/debug/deps/liblibappindicator-f5bf41b036166574.rlib(libappindicator-f5bf41b036166574.3ilvl6eyjab3r8g4.rcgu.o): In function `libappindicator::AppIndicator::new::h88af47859b0f3b62':
          /home/vit/prjs/libappindicator-rs/src/lib.rs:18: undefined reference to `app_indicator_new'
          /home/vit/prjs/libappindicator-rs/target/debug/deps/liblibappindicator-f5bf41b036166574.rlib(libappindicator-f5bf41b036166574.3ilvl6eyjab3r8g4.rcgu.o): In function `libappindicator::AppIndicator::set_status::heac8b5c88bd3a21e':
          /home/vit/prjs/libappindicator-rs/src/lib.rs:27: undefined reference to `app_indicator_set_status'
          /home/vit/prjs/libappindicator-rs/target/debug/deps/liblibappindicator-f5bf41b036166574.rlib(libappindicator-f5bf41b036166574.3ilvl6eyjab3r8g4.rcgu.o): In function `libappindicator::AppIndicator::set_menu::h4d8404804a7c4427':
          /home/vit/prjs/libappindicator-rs/src/lib.rs:33: undefined reference to `app_indicator_set_menu'
          /home/vit/prjs/libappindicator-rs/target/debug/deps/liblibappindicator-f5bf41b036166574.rlib(libappindicator-f5bf41b036166574.3ilvl6eyjab3r8g4.rcgu.o): In function `libappindicator::AppIndicator::set_icon_full::h58bee4fa49b89e8f':
          /home/vit/prjs/libappindicator-rs/src/lib.rs:51: undefined reference to `app_indicator_set_icon_full'
          collect2: error: ld returned 1 exit status

error: aborting due to previous error

error: Could not compile `libappindicator`.

Caused by:
  process didn't exit successfully: `rustc --crate-name libappindicator_example examples/libappindicator-example.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=3ca5dc09ca17b748 -C extra-filename=-3ca5dc09ca17b748 --out-dir /home/vit/prjs/libappindicator-rs/target/debug/examples -C incremental=/home/vit/prjs/libappindicator-rs/target/debug/incremental -L dependency=/home/vit/prjs/libappindicator-rs/target/debug/deps --extern glib=/home/vit/prjs/libappindicator-rs/target/debug/deps/libglib-de4c6ca17274494b.rlib --extern gtk=/home/vit/prjs/libappindicator-rs/target/debug/deps/libgtk-7b8ca8528e75c057.rlib --extern gtk_sys=/home/vit/prjs/libappindicator-rs/target/debug/deps/libgtk_sys-1ef4be89c209626a.rlib --extern libappindicator=/home/vit/prjs/libappindicator-rs/target/debug/deps/liblibappindicator-f5bf41b036166574.rlib --extern libappindicator_sys=/home/vit/prjs/libappindicator-rs/target/debug/deps/liblibappindicator_sys-2d2b1c8315df2658.rlib --extern log=/home/vit/prjs/libappindicator-rs/target/debug/deps/liblog-115e95b3a18d981f.rlib -L native=/usr/lib/x86_64-linux-gnu -L native=/usr/lib/x86_64-linux-gnu` (exit code: 1)
vit@evergreen ~/prjs/libappindicator-rs $ ls -la /usr/lib/x86_64-linux-gnu | grep libappindicator
lrwxrwxrwx   1 root root       25 Feb 15  2017 libappindicator3.so -> libappindicator3.so.1.0.0
lrwxrwxrwx   1 root root       25 Apr  3  2018 libappindicator3.so.1 -> libappindicator3.so.1.0.0
-rw-r--r--   1 root root    56368 Feb 15  2017 libappindicator3.so.1.0.0
lrwxrwxrwx   1 root root       24 Feb 15  2017 libappindicator.so -> libappindicator.so.1.0.0
lrwxrwxrwx   1 root root       24 Apr  3  2018 libappindicator.so.1 -> libappindicator.so.1.0.0
-rw-r--r--   1 root root    56368 Feb 15  2017 libappindicator.so.1.0.0
vit@evergreen ~/prjs/libappindicator-rs $ strings /usr/lib/x86_64-linux-gnu/libappindicator3.so.1.0.0 | grep app_indicator_new
app_indicator_new
app_indicator_new_with_path
vit@evergreen ~/prjs/libappindicator-rs $

On Windows 7 example runs fine.

Finish filling out rest of functions

v0.1.0 only supported a minimum amount of functionality to get systray-rs off the ground. Should probably expand this to work with all provided functionality.

Cannot use with GTK 4

Since libappindicator-rs uses GTK 3 as its dependencies, it cannot be used with GTK 4-based applications. Right now, when you use libappindicator-rs in a GTK 4 app, it panics with GTK was not actually initialized error.

gtk4-rs crate has been living for quite some time, so it would be nice to support it.

`gtk` and `gtk-sys` need updated in `Cargo.toml`

gtk and gtk-sys aren't currently on the latest version, which is causing an issue in my project when updating the version of gtk used in my project: hwittenborn/celeste#82 (comment).

I also saw that Renovate is used in the main Tauri repository, but it doesn't appear to be being used here. Maybe that could be added here too so these kind of issues aren't needed?

build fails on debian 11 bullseye,

Describe the bug
cargo build fails on debian 11 bullseye, as debian 11 removed libappindicator from the package repository and replaced it with ayatana-appindicator3

Steps To Reproduce
apt install git llvm clang libayatana-appindicator3-1

  • libappindicator does not exist in bullseye package repsoitory
    git clone ...
    cargo build
    cannot find libappindicator

Expected behavior
no build error

Screenshots
If applicable, add screenshots to help explain your problem.

Platform and Versions (please complete the following information):
OS: debian 11
Rustc: 1.61.0

Would you assign yourself to resolve this bug?

  • Yes
  • No

Additional context
Just writing this up for discoverablility.
A fix was provided in 37b360d but reverted in b1396db issue #31 with work on 3b44230 on branch remotes/origin/libloading may fix the issue.

Dependencies need updating again

Getting this on a project I'm working with now:

error: Multiple packages link to native library `gdk_pixbuf`. A native library can be linked only once.

Package `gdk-pixbuf-sys v0.4.0`
    ... which is depended on by `gdk-pixbuf v0.2.0`
    ... which is depended on by `gdk v0.6.0`
    ... which is depended on by `gtk v0.2.0`
    ... which is depended on by `libappindicator v0.3.0`
    ... which is depended on by `fractal v0.1.3 (file:///home/chris/Documents/Repos/fractal)`
links to native library `gdk_pixbuf`.

Package `gdk-pixbuf-sys v0.5.0`
    ... which is depended on by `gtk-sys v0.5.0`
    ... which is depended on by `gtk v0.3.0`
    ... which is depended on by `fractal v0.1.3 (file:///home/chris/Documents/Repos/fractal)`
also links to native library `gdk_pixbuf`.

Update dependencies to latest versions

I just tried pulling this crate into my application but found that it still depends on version 0.15 of gtk, which is preventing me from using the latest version of that in my application. It would be nice if the version got updated here, because then I wouldn't have the issue.

No application indicator shows up on Ubuntu 20.04 LTS

Description
With a fresh clone of the repository, on an up to date version of Ubuntu 20.04 LTS, default Gnome setup with Wayland WM I cannot get an icon to show up with the other app indicators that I have running.

Steps To Reproduce
Steps to reproduce the behavior:

  1. sudo apt install libappindicator3-dev
  2. git clone [email protected]:tauri-apps/libappindicator-rs.git
  3. cd libappindicator-rs
  4. cargo run --example hello

Expected behavior
I would expect to see the rust logo in the app indicator area at the top of my screen

Screenshots
Screenshot from 2022-03-17 10-56-09

Syslog
If I use the default code, there is nothing that shows up in var/log/syslog. However if I put the file extension .png on the name of the file, a three dot icon appears rather than the specified icon, and this is found in /var/log/syslog:

Mar 17 10:54:01 computer [email protected][4149]: libappindicator test application, Impossible to lookup icon for 'rust-log.png-panel' in path /home/a1ecbr0wn/dev/libappindicator-rs/examples
Mar 17 10:54:01 computer [email protected][4149]: unable to update icon for libappindicator test application

Platform and Versions (please complete the following information):
OS: Ubuntu 20.04.4 LTS
Rustc: rustc 1.59.0 (9d1b2106e 2022-02-23)

Would you assign yourself to resolve this bug?

  • Yes
  • Yes, if someone can set me in the right direction debugging the issue
  • No

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.