AppImageCommunity / AppImageUpdate

AppImageUpdate lets you update AppImages in a decentral way using information embedded in the AppImage itself.
https://appimage.org
MIT License
561 stars 56 forks source link

AppImageUpdate icon missing #38

Closed probonopd closed 6 years ago

probonopd commented 6 years ago

icon

AppImage contains:

me@host:~$ find /tmp/.mount_AppImaZ67Gwk/ | grep icons
(...)
/tmp/.mount_AppImaZ67Gwk/usr/share/icons/hicolor/scalable/AppImage.svg

Desktop file says:

me@host:~$ cat /tmp/.mount_AppImaZ67Gwk/AppImageUpdate.desktop 
[Desktop Entry]
Name=AppImageUpdate
Type=Application
Icon=AppImage
Exec=AppImageUpdate

Probably need to set the _NET_WM_ICON property of toplevel window? In Qt, QApplication::setWindowIcon() is known to do the trick.

probonopd commented 6 years ago

This is also shown in the FLTK documentation, notice the missing icon in the upper left:

probonopd commented 6 years ago

Possily we need to use http://www.fltk.org/doc-1.3/classFl__Window.html#a508f3acd43f9b365d35897b5ec197dbe

TheAssassin commented 6 years ago

I am not aware of any option to set an icon for a native file chooser. I looked it up, and couldn't find anything for the native one, but the non-native implementation seems to support it. However, the native one looks way better, and I don't think this is really a bug, it's more of a "nice to have" feature.

The icon is also missing in the main application window. I'm going to fix that as soon as possible.

probonopd commented 6 years ago

On Ubuntu 17.10, getting with 84e3b3d:

me@host:~$ chmod +x AppImageUpdate-84e3b3d-x86_64.AppImage 
me@host:~$ ./AppImageUpdate-84e3b3d-x86_64.AppImage 
./AppImageUpdate-84e3b3d-x86_64.AppImage: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
TheAssassin commented 6 years ago

That library might be pulled in by the new fltk_images build dependency. I'm not sure why it isn't bundled.

probonopd commented 6 years ago

Still in 6555252:

me@host:~$ /home/me/AppImageUpdate-6555252-x86_64.AppImage: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
TheAssassin commented 6 years ago

Will debug as soon as possible.

TheAssassin commented 6 years ago

My local builds link to libpng as well. I don't know what causes linuxdeployqt not to see the dependency and bundle the library. Strange problem, indeed.

TheAssassin commented 6 years ago

A bunch of other libraries are missing as well. The majority are dependencies of libcurl (need to bundle my custom build from OBS as soon as possible), but a few other libraries like libjpeg, libXpm etc. should've been bundled.

TheAssassin commented 6 years ago

See https://travis-ci.org/AppImage/AppImageUpdate/builds/301084251#L1965-L1970

I have to add = signs for the -executable parameters as specified here:

Options:
...
   -executable=<path>  : Let the given executable use the deployed libraries too

https://github.com/probonopd/linuxdeployqt#usage

TheAssassin commented 6 years ago

Library issues have been fixed in 352e751.

TheAssassin commented 6 years ago

Works.

probonopd commented 6 years ago

At least in Deepin Linux it is not working:

deepinbildschirmfoto20171113074252

That glaring gaop there is AppImageUpdate. But this has lower priority for now.

TheAssassin commented 6 years ago

@probonopd that might be another Linux Desktop Platform Issue. FLTK docs mention you need to load a WM specific icon format. I load XPM now, which seems to be the format for most DEs. If you find out what format is needed for Deepin, I'll add something about it to libDE.

probonopd commented 6 years ago

@TheAssassin unfortunately I get the same result in Ubuntu 17.10. png or svg should work everywhere, xpm is the worst of the formats and imho legacy.

Btw, I think the errors shown on the console are unrelated to the main application menu missing from the left-hand side Ubuntu GNOME dock.

ubuntu1710

probonopd commented 6 years ago

I think I found the reason:

usr/share/icons/hicolor/scalable/AppImage.svg needs to be usr/share/icons/hicolor/scalable/apps/AppImage.svg, apps is missing...

probonopd commented 6 years ago

Trying to fix in https://github.com/AppImage/AppImageUpdate/commit/7a1358b705578073d2f921ac613fa00319834e5f

(name is wrong - I meant #38 not #18)

TheAssassin commented 6 years ago

I think I found the reason:

usr/share/icons/hicolor/scalable/AppImage.svg needs to be usr/share/icons/hicolor/scalable/apps/AppImage.svg, apps is missing...

This doesn't have anything to do with it. The .desktop file doesn't specify what icon is sent to the WM, the application decides what it sends to X11. See https://github.com/AppImage/AppImageUpdate/blob/rewrite/src/gui_main.cpp#L155-L172. You can't just call window.icon with PNG file contents. But I'm not even sure whether the XPM code is 100% right, I haven't really tested that too much in detail. I found it works fine on my xubuntu 16.04 desktop, just tested with 7a1358b.

TheAssassin commented 6 years ago

Window icon works fine, but there is no icon in the task bar on Kubuntu 17.10. Strange.

TheAssassin commented 6 years ago

@probonopd could you try whether the issue has been resolved with the Qt version?

TheAssassin commented 6 years ago

Closing for now. Feel free to reopen, and please attach a screenshot and the OS and version you found this to be an issue on.