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

Advertise Webp support in desktop file. #15

Merged
merged 1 commit into from Sep 12, 2021
Merged

Conversation

N-R-K
Copy link
Member

@N-R-K N-R-K commented Sep 11, 2021

@eylles
Copy link
Contributor

eylles commented Sep 11, 2021

i was thinking of adding a macro on the makefile for the full webp support pr, so that if nsxiv isn't compiled with webp support then it won't be advertised on the .desktop file

@N-R-K
Copy link
Member Author

N-R-K commented Sep 11, 2021

Sxiv doesn't have webp compile option, imlib2 does.

@eylles
Copy link
Contributor

eylles commented Sep 11, 2021

so we leave undoing this to the mantainers of the distros where imlib2 isn't compiled with webp support?

@XPhyro
Copy link
Member

XPhyro commented Sep 12, 2021

Is there a simple way to check if imlib2 has WebP support? If so we could incorporate this in #19.

@TAAPArthur
Copy link
Contributor

Is there a simple way to check if imlib2 has WebP support?

We could just have a HAS_WEBP flag for now that builders can manually set. If set to 1, then we add webp to the desktop file. Off hand I don't know of a portable way to check imlib2 compile objects, but there should be plenty of package manager specific solutions like checking the dependencies of imlib2.
Some ideas (that aren't imlib2 specific in anyway0:

  1. Let packages decide
  2. We could could check if libwebp is installed but this would yield a false negative if it was statically compiled and no longer on the system.
  3. Similar to 2 with the same downside is using ldd on the dynamic lib to see if it is linked to libwebp.
  4. Actually try to open a webp image.

Also if the desktop file isn't going to be completely static, may I suggest having a template and then creating and installing the real via the Makefile

@N-R-K
Copy link
Member Author

N-R-K commented Sep 12, 2021

Is there a simple way to check if imlib2 has WebP support? If so we could incorporate this in #19.

I think we should leave this upto the distro maintainers. And in the case of a source based distro, the user.

@N-R-K N-R-K merged commit c6a4320 into nsxiv:dev Sep 12, 2021
@N-R-K N-R-K deleted the webp_desktop branch September 12, 2021 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants