AppImageCrafters / appimage-builder

GNU/Linux packaging solution using the AppImage format
MIT License
315 stars 58 forks source link

Icon is not shown of generated AppImage #170

Open atul-chaudhary opened 2 years ago

atul-chaudhary commented 2 years ago

I was able to successfully generate the AppImage of my flutter project, but when i run the app its working fine but no icon is shown on taskbar for it. even though the icon is present in the path AppDir/usr/share/icons and also in AppDir as mentioned in the documentation.

.Desktop file generated through appimage-builder --skip-test is seems to be correct.

[Desktop Entry]
X-AppImage-Arch=x86_64
X-AppImage-Version=a63e6a17
X-AppImage-Name=blup
Name=blup
Exec=blup
Icon=blup-icon
Type=Application
Terminal=false
Categories=Utility;
Comment=

here is my recipe

# appimage-builder recipe see https://appimage-builder.readthedocs.io for details
version: 1
script:
  - rm -rf AppDir || true
  - cp -r build/linux/x64/release/bundle AppDir
  - mkdir -p AppDir/usr/share/icons/hicolor/64x64/apps/
  - cp blup-icon.svg AppDir/usr/share/icons/hicolor/64x64/apps/
  - cp blup-icon.svg AppDir/usr/share/icons/
AppDir:
  path: /home/atul/StudioProjects/Blup/ide/AppDir
  app_info:
    id: blup
    name: blup
    icon: blup-icon
    version: 1.0.0001
    exec: blup
    exec_args: $@
  apt:
    arch:
    - amd64
    allow_unauthenticated: true
    sources:
    - sourceline: deb http://in.archive.ubuntu.com/ubuntu/ focal main restricted
    - sourceline: deb http://in.archive.ubuntu.com/ubuntu/ focal-updates main restricted
    - sourceline: deb http://in.archive.ubuntu.com/ubuntu/ focal universe
    - sourceline: deb http://in.archive.ubuntu.com/ubuntu/ focal-updates universe
    - sourceline: deb http://in.archive.ubuntu.com/ubuntu/ focal multiverse
    - sourceline: deb http://in.archive.ubuntu.com/ubuntu/ focal-updates multiverse
    - sourceline: deb http://in.archive.ubuntu.com/ubuntu/ focal-backports main restricted
        universe multiverse
    - sourceline: deb http://security.ubuntu.com/ubuntu focal-security main restricted
    - sourceline: deb http://security.ubuntu.com/ubuntu focal-security universe
    - sourceline: deb http://security.ubuntu.com/ubuntu focal-security multiverse
    - sourceline: deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable
        main
    - sourceline: deb [arch=amd64] https://packagecloud.io/shiftkey/desktop/any/ any
        main
    - sourceline: deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg
        arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main
    - sourceline: deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code
        stable main
    include:
    - fonts-noto-color-emoji
    - fonts-ubuntu
    - glib-networking:amd64
    - gvfs:amd64
    - language-pack-gnome-en-base
    - libasound2-data
    - libasound2-plugins:amd64
    - libcanberra-gtk3-module:amd64
    - libcom-err2:amd64
    - libgtk-3-common
    - libidn11:amd64
    - libkeyutils1:amd64
    - liblzma5:amd64
    - libmount1:amd64
    - libnss-mdns:amd64
    - libnvidia-gl-470:amd64
    - libpcre3:amd64
    - libproxy1-plugin-gsettings:amd64
    - libproxy1-plugin-networkmanager:amd64
    - libsystemd0:amd64
    - libuuid1:amd64
    - transmission-common
    - vlc-plugin-base:amd64
    - yaru-theme-gtk
    - yaru-theme-icon
  files:
    exclude:
    - usr/share/man
    - usr/share/doc/*/README.*
    - usr/share/doc/*/changelog.*
    - usr/share/doc/*/NEWS.*
    - usr/share/doc/*/TODO.*
  test:
    fedora-30:
      image: appimagecrafters/tests-env:fedora-30
      command: ./AppRun
      use_host_x: true
    debian-stable:
      image: appimagecrafters/tests-env:debian-stable
      command: ./AppRun
      use_host_x: true
    archlinux-latest:
      image: appimagecrafters/tests-env:archlinux-latest
      command: ./AppRun
      use_host_x: true
    centos-7:
      image: appimagecrafters/tests-env:centos-7
      command: ./AppRun
      use_host_x: true
    ubuntu-xenial:
      image: appimagecrafters/tests-env:ubuntu-xenial
      command: ./AppRun
      use_host_x: true
AppImage:
  arch: x86_64
  update-information: guess
azubieta commented 2 years ago

@atul-chaudhary to be honest I'm not a flutter expert. From my side could recommend you to check if the icon was properly included in the bundle. It should somewhere inside "usr/share/icons/". Also check in the generated AppDir the .env file. It must contain an entry named XDG_DATA_DIRS with a reference to "$APPDIR/usr/share".

Besides that we would need a flutter expert to investigate how the window icon is loaded and propose a solution.