srevinsaju / discord-appimage

Continuous Integration to create Discord AppImages directly from source
MIT License
61 stars 9 forks source link

šŸž Cannot generate app icon #2

Closed yozachar closed 1 year ago

yozachar commented 3 years ago
[jovial@xpsl502x ~]$ Applications/appimagelauncher-lite-2.2.0-travis51-b4010f8-x86_64.AppImage cli integrate Downloads/Discord-0.0.14-x86_64.AppImage 
Processing /home/jovial/Downloads/Discord-0.0.14-x86_64.AppImage
Moving AppImage to integration directory
WARNING: No icons found at "usr/share/icons"
WARNING: Using .DirIcon as default app icon
ERROR: Unable to load image.
ERROR: No icon was generated for: /home/jovial/Applications/Discord-0.0.14-x86_64_45d560cf34332f83d002af4bbed24bfe.AppImage
WARNING: Unable to resize the application icon into a 128x128 image: "Unable to load image.". It will be written unchanged.
WARNING: Unable to resize the application icon into a 256x256 image: "Unable to load image.". It will be written unchanged.

When integrating Motrix.AppImage

[jovial@xpsl502x ~]$ Applications/appimagelauncher-lite-2.2.0-travis51-b4010f8-x86_64.AppImage cli integrate Downloads/Motrix-1.5.15.AppImage 
Processing /home/jovial/Downloads/Motrix-1.5.15.AppImage
Moving AppImage to integration directory
Extracting usr/share/icons/hicolor/1024x1024/apps/motrix.png to "/home/jovial/.local/share/icons/hicolor/1024x1024/apps/appimagekit_86a7031330a7505d37ac1dcb15dc9a99_motrix.png"
Extracting usr/share/icons/hicolor/128x128/apps/motrix.png to "/home/jovial/.local/share/icons/hicolor/128x128/apps/appimagekit_86a7031330a7505d37ac1dcb15dc9a99_motrix.png"
Extracting usr/share/icons/hicolor/16x16/apps/motrix.png to "/home/jovial/.local/share/icons/hicolor/16x16/apps/appimagekit_86a7031330a7505d37ac1dcb15dc9a99_motrix.png"
Extracting usr/share/icons/hicolor/256x256/apps/motrix.png to "/home/jovial/.local/share/icons/hicolor/256x256/apps/appimagekit_86a7031330a7505d37ac1dcb15dc9a99_motrix.png"
Extracting usr/share/icons/hicolor/32x32/apps/motrix.png to "/home/jovial/.local/share/icons/hicolor/32x32/apps/appimagekit_86a7031330a7505d37ac1dcb15dc9a99_motrix.png"
Extracting usr/share/icons/hicolor/48x48/apps/motrix.png to "/home/jovial/.local/share/icons/hicolor/48x48/apps/appimagekit_86a7031330a7505d37ac1dcb15dc9a99_motrix.png"
Extracting usr/share/icons/hicolor/512x512/apps/motrix.png to "/home/jovial/.local/share/icons/hicolor/512x512/apps/appimagekit_86a7031330a7505d37ac1dcb15dc9a99_motrix.png"
Extracting usr/share/icons/hicolor/64x64/apps/motrix.png to "/home/jovial/.local/share/icons/hicolor/64x64/apps/appimagekit_86a7031330a7505d37ac1dcb15dc9a99_motrix.png"
WARNING: Unable to resize the application icon into a 128x128 image: "Unable to load image.". It will be written unchanged.
WARNING: Unable to resize the application icon into a 256x256 image: "Unable to load image.". It will be written unchanged.
[jovial@xpsl502x ~]$ sudo pacman -Qi libappimage
[sudo] password for jovial: 
Name            : libappimage
Version         : 1.0.3-3
Description     : Reference implementation of the AppImage specification
Architecture    : x86_64
URL             : https://appimage.org/
Licenses        : GPL
Groups          : None
Provides        : None
Depends On      : libarchive  squashfuse  boost-libs  librsvg
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 519.35 KiB
Packager        : Felix Yan <felixonmars@archlinux.org>
Build Date      : Sat 12 Dec 2020 09:27:48 PM IST
Install Date    : Fri 07 May 2021 09:52:20 AM IST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

I think it's because Discord.AppImage does not have icons or may be in a different directory structure?

yozachar commented 3 years ago

Same goes for guiscrcpy

[jovial@xpsl502x Downloads]$ appimage cli integrate guiscrcpy-.dev.r.glibc2.27-x86_64.AppImage
Processing /home/jovial/Downloads/guiscrcpy-.dev.r.glibc2.27-x86_64.AppImage
Moving AppImage to integration directory
WARNING: No icons found at "usr/share/icons"
WARNING: Using .DirIcon as default app icon
ERROR: Unable to load image.
ERROR: No icon was generated for: /home/jovial/Applications/guiscrcpy-.dev.r.glibc2.27-x86_64_a47d54a96ea50d1dd2e5cdc5e9aa9574.AppImage
WARNING: Unable to resize the application icon into a 128x128 image: "Unable to load image.". It will be written unchanged.
WARNING: Unable to resize the application icon into a 256x256 image: "Unable to load image.". It will be written unchanged.

But for libreoffice

[jovial@xpsl502x Downloads]$ appimage cli integrate LibreOffice-fresh.full-x86_64.AppImage 
Processing /home/jovial/Downloads/LibreOffice-fresh.full-x86_64.AppImage
Moving AppImage to integration directory
Extracting usr/share/icons/hicolor/128x128/apps/libreoffice7.1-startcenter.png to "/home/jovial/.local/share/icons/hicolor/128x128/apps/appimagekit_80db303ab4f72d839cfd90039d5653a1_libreoffice7.1-startcenter.png"
Extracting usr/share/icons/hicolor/16x16/apps/libreoffice7.1-startcenter.png to "/home/jovial/.local/share/icons/hicolor/16x16/apps/appimagekit_80db303ab4f72d839cfd90039d5653a1_libreoffice7.1-startcenter.png"
Extracting usr/share/icons/hicolor/22x22/apps/libreoffice7.1-startcenter.png to "/home/jovial/.local/share/icons/hicolor/22x22/apps/appimagekit_80db303ab4f72d839cfd90039d5653a1_libreoffice7.1-startcenter.png"
Extracting usr/share/icons/hicolor/24x24/apps/libreoffice7.1-startcenter.png to "/home/jovial/.local/share/icons/hicolor/24x24/apps/appimagekit_80db303ab4f72d839cfd90039d5653a1_libreoffice7.1-startcenter.png"
Extracting usr/share/icons/hicolor/256x256/apps/libreoffice7.1-startcenter.png to "/home/jovial/.local/share/icons/hicolor/256x256/apps/appimagekit_80db303ab4f72d839cfd90039d5653a1_libreoffice7.1-startcenter.png"
Extracting usr/share/icons/hicolor/32x32/apps/libreoffice7.1-startcenter.png to "/home/jovial/.local/share/icons/hicolor/32x32/apps/appimagekit_80db303ab4f72d839cfd90039d5653a1_libreoffice7.1-startcenter.png"
Extracting usr/share/icons/hicolor/48x48/apps/libreoffice7.1-startcenter.png to "/home/jovial/.local/share/icons/hicolor/48x48/apps/appimagekit_80db303ab4f72d839cfd90039d5653a1_libreoffice7.1-startcenter.png"
Extracting usr/share/icons/hicolor/512x512/apps/libreoffice7.1-startcenter.png to "/home/jovial/.local/share/icons/hicolor/512x512/apps/appimagekit_80db303ab4f72d839cfd90039d5653a1_libreoffice7.1-startcenter.png"
Extracting usr/share/icons/hicolor/64x64/apps/libreoffice7.1-startcenter.png to "/home/jovial/.local/share/icons/hicolor/64x64/apps/appimagekit_80db303ab4f72d839cfd90039d5653a1_libreoffice7.1-startcenter.png"
Extracting usr/share/icons/hicolor/scalable/apps/libreoffice7.1-startcenter.svg to "/home/jovial/.local/share/icons/hicolor/scalable/apps/appimagekit_80db303ab4f72d839cfd90039d5653a1_libreoffice7.1-startcenter.svg"
Extracting usr/share/mime/packages/libreoffice7.1.xml to "/home/jovial/.local/share/mime/packages/appimagekit_80db303ab4f72d839cfd90039d5653a1_libreoffice7.1.xml"
WARNING: Unable to resize the application icon into a 128x128 image: "Unable to load image.". It will be written unchanged.
WARNING: Unable to resize the application icon into a 256x256 image: "Unable to load image.". It will be written unchanged.

Screenshot from 2021-05-07 12-13-57

domo5581 commented 3 years ago

Must be your icon theme, my KDE Plasma install runs fine

yozachar commented 3 years ago

I don't think so, it's the default gnome icon theme.. Adwaita I guess. The problem seems to be with extracting.. I'm not sure though.

17314642 commented 3 years ago

This is happens due to icon located in root folder of AppImage and not in /usr/share/icons. This is because this AppImage is based on Discord's official .tar.gz archive located on their website where icon is also located in the root folder. As a workaround you can extract icon yourself to ~/.local/share/icons.

This line gets the name of the icon discord wants: cat ~/.local/share/applications/appimagekit_*-Discord.desktop | grep "Icon=appimagekit"

Then you need to mount the AppImage itself (mine is located inside ~/Applications): cd ~/Applications && ./Discord-0.0.15-x86_64_*.AppImage --appimage-mount

After that just copy discord.png from AppImage mounted folder which it will tell you after you executed last command and copy it to ~/.local/share/icons/hicolor/scalable/apps.

Don't forget to log out and login back to your DE (GNOME in your case) because for me it didn't work without relogin.