Bug 493578 - Impossible to integrate the appimage 8.4.0 and 8.5.0 to the desktop.
Summary: Impossible to integrate the appimage 8.4.0 and 8.5.0 to the desktop.
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Bundle-AppImage (show other bugs)
Version: 8.4.0
Platform: Mint (Ubuntu based) Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-24 11:19 UTC by ouinouin
Modified: 2024-12-03 12:50 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.6.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ouinouin 2024-09-24 11:19:32 UTC
hi, as stated here , 
https://github.com/TheAssassin/AppImageLauncher/issues/652
i blindly reported on this bug report without seeing this was not the correct place, so i place it here.
the latest appimage are not being able to be integrated, i ve checked for 8.4 image and 8.5 , and got the same error  (as in the link above : 

** (process:5399): CRITICAL **: 10:03:46.030: Failed to find desktop file path
apparently this is due to a misnaming of the desktop file ?
Comment 1 caulier.gilles 2024-09-24 11:26:49 UTC
Are you able to integrate another application distributed as AppImage bundle ?
Comment 2 caulier.gilles 2024-09-24 11:27:34 UTC
For the 8.4.0, something was broken for the integration. It's fixed in 8.5.0... So forget 8.4.0
Comment 3 ouinouin 2024-09-24 11:38:15 UTC
(In reply to caulier.gilles from comment #1)
> Are you able to integrate another application distributed as AppImage bundle
> ?

yes, just tried with audacity freshly downloaded  (never used before) . downloaded from appimagehub.
 when i do integrate and launch, it copies the file to the correct location and creates the correct desktop shortcut location.
Comment 4 ouinouin 2024-09-24 11:40:25 UTC
(In reply to caulier.gilles from comment #2)
> For the 8.4.0, something was broken for the integration. It's fixed in
> 8.5.0... So forget 8.4.0
here the logs from a launch of 8.4.0 and 8.5.0 , looks identical behavior, the ** (AppImageLauncher:285753): CRITICAL **: 13:35:06.824: Failed to find desktop file path appears while clicking on the "integrate and launch" button of the appimage launcher  window.

`
ouinouin@ouindell:~$ AppImageLauncher /home/ouinouin/Applications/digiKam-8.4.0-Qt6-x86-64_97532ebe62ba5dabb5109d0c795a129c.appimage --help
AppImageLauncher error: appimage_shall_not_be_integrated() failed (returned -1)
AppImageLauncher error: appimage_is_terminal_app() failed (returned -1)

(AppImageLauncher:285753): GLib-CRITICAL **: 13:35:04.521: g_file_test: assertion 'filename != NULL' failed

(AppImageLauncher:285753): GLib-CRITICAL **: 13:35:06.824: g_path_get_basename: assertion 'file_name != NULL' failed

** (AppImageLauncher:285753): CRITICAL **: 13:35:06.824: Failed to find desktop file path

ouinouin@ouindell:~$ AppImageLauncher /home/ouinouin/Applications/digiKam-8.5.0-20240924T100117-Qt6-x86-64_3540288aa706a1df3690c83e35ded899.appimage --help
AppImageLauncher error: appimage_shall_not_be_integrated() failed (returned -1)
AppImageLauncher error: appimage_is_terminal_app() failed (returned -1)

(AppImageLauncher:285923): GLib-CRITICAL **: 13:35:21.929: g_file_test: assertion 'filename != NULL' failed

(AppImageLauncher:285923): GLib-CRITICAL **: 13:35:26.346: g_path_get_basename: assertion 'file_name != NULL' failed

** (AppImageLauncher:285923): CRITICAL **: 13:35:26.346: Failed to find desktop file path

ouinouin@ouindell:~$ 

`
Comment 5 ouinouin 2024-09-24 11:45:50 UTC
while failing the desktop displays a popup window showing this message : 

"Impossible d'enregistrer l'AppImage dans le système via libappimage"
Comment 6 Maik Qualmann 2024-09-24 12:58:20 UTC

*** This bug has been marked as a duplicate of bug 492813 ***
Comment 7 Maik Qualmann 2024-09-24 12:59:45 UTC
There is also the possibility that it is an AppImageLauncher bug:

https://github.com/TheAssassin/AppImageLauncher/issues/652

Unfortunately no answer from the AppImageLauncher developers yet...

Maik
Comment 8 ouinouin 2024-09-25 06:48:26 UTC
(In reply to Maik Qualmann from comment #7)
> There is also the possibility that it is an AppImageLauncher bug:
> 
> https://github.com/TheAssassin/AppImageLauncher/issues/652
> 
> Unfortunately no answer from the AppImageLauncher developers yet...
> 
> Maik

i digged in a lot of unsolved bugs of this type, i finally was able to fix this bydecompressing the image and rebuiding it , it first complained about the desktop files being at the root of the folder not being real desktop files, so i copied the desktop files located in usr/share/applications to the root , then  it was complaininf about missing icon for showfoto , so i copied the digikam.png and renamed showfoto.png to give a try , and could build image with appimagetool.



first try :  complains about desktop file :

appimagetool, continuous build (commit 5735cc5), build <local dev build> built on 2023-03-08 22:52:04 UTC
/home/ouinouin/testappimage/digiKam-8.5.0-20240924T100117-Qt6-x86-64-debug_3f5bdd0503e367bc9a9a796b6353f72b.appimage/org.kde.showfoto.desktop: error: file contains line "usr/share/applications/org.kde.showfoto.desktop", which is not a comment, a group or an entry
ERROR: Desktop file contains errors. Please fix them. Please see
       https://standards.freedesktop.org/desktop-entry-spec/1.0/n       for more information.
ouinouin@ouindell:~/testappimage$ ./appimagetool-x86_64.AppImage  digiKam-8.5.0-20240924T100117-Qt6-x86-64-debug_3f5bdd0503e367bc9a9a796b6353f72b.appimage digikamouin.appimage


second try , copied correct desktop files in the root folder :

Failed to enable unit: Unit file /etc/xdg/systemd/user/appimagelauncherd.service is masked.
appimagetool, continuous build (commit 5735cc5), build <local dev build> built on 2023-03-08 22:52:04 UTC
Using architecture x86_64
/home/ouinouin/testappimage/digiKam-8.5.0-20240924T100117-Qt6-x86-64-debug_3f5bdd0503e367bc9a9a796b6353f72b.appimage should be packaged as digikamouin.appimage
showfoto{.png,.svg,.xpm} defined in desktop file but not found
For example, you could put a 256x256 pixel png into
/home/ouinouin/testappimage/digiKam-8.5.0-20240924T100117-Qt6-x86-64-debug_3f5bdd0503e367bc9a9a796b6353f72b.appimage/showfoto.png



third try , adding shofoto.png in the root folder :

appimagetool, continuous build (commit 5735cc5), build <local dev build> built on 2023-03-08 22:52:04 UTC
Using architecture x86_64
/home/ouinouin/testappimage/digiKam-8.5.0-20240924T100117-Qt6-x86-64-debug_3f5bdd0503e367bc9a9a796b6353f72b.appimage should be packaged as digikamouin.appimage
AppStream upstream metadata found in usr/share/metainfo/org.kde.showfoto.appdata.xml
Trying to validate AppStream information with the appstreamcli tool
In case of issues, please refer to https://github.com/ximion/appstream
org.kde.digikam.appdata.xml
  I: org.kde.digikam.desktop:61: summary-has-dot-suffix Xestor de álbums de fotos.

org.kde.showfoto.appdata.xml
  I: org.kde.showfoto.desktop:61: summary-has-dot-suffix Editor de imaxes.

✔ La validation a réussi : informations : 2
Generating squashfs...
Parallel mksquashfs: Using 4 processors
Creating 4.0 filesystem on digikamouin.appimage, block size 131072.
[===========================================================================================================================================================================\] 25536/25536 100%

Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
	compressed data, compressed metadata, compressed fragments,
	compressed xattrs, compressed ids
	duplicates are removed
Filesystem size 940815.47 Kbytes (918.77 Mbytes)
	39.73% of uncompressed filesystem size (2367947.15 Kbytes)
Inode table size 127710 bytes (124.72 Kbytes)
	37.29% of uncompressed inode table size (342494 bytes)
Directory table size 72213 bytes (70.52 Kbytes)
	36.63% of uncompressed directory table size (197168 bytes)
Number of duplicate files found 688
Number of inodes 8403
Number of files 7922
Number of fragments 642
Number of symbolic links  0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 481
Number of ids (unique uids + gids) 1
Number of uids 1
	root (0)
Number of gids 1
	root (0)
Embedding ELF...
Marking the AppImage as executable...
Embedding MD5 digest
Success

Please consider submitting your AppImage to AppImageHub, the crowd-sourced
central directory of available AppImages, by opening a pull request
at https://github.com/AppImage/appimage.github.io
Comment 9 caulier.gilles 2024-09-25 06:58:52 UTC
Ok I seen.

Can you resume the change/fix to operate in the AppImage file hierarchy exactly ?
I will fix the build script accordingly and rebuild the AppImage 8.5.0.

Thanks 

Gilles Caulier
Comment 10 ouinouin 2024-09-25 12:11:07 UTC
yes, i ll revert to you, i found the decompression method was not correct and was eating symlinks, i m doing further tests.
Comment 11 Maik Qualmann 2024-09-25 12:49:52 UTC
I don't understand which line in org.kde.showfoto.desktop is wrong.
All entries conform to the Freedesktop specification for desktop files 1.0.

Maik
Comment 12 Maik Qualmann 2024-09-25 13:56:09 UTC
Please test the current AppImage, which should not contain the two *desktop files, to see if this is actually the main cause.

https://files.kde.org/digikam/

Maik
Comment 13 ouinouin 2024-09-25 15:41:27 UTC
(In reply to Maik Qualmann from comment #12)
> Please test the current AppImage, which should not contain the two *desktop
> files, to see if this is actually the main cause.
> 
> https://files.kde.org/digikam/
> 
> Maik

Hi, i already tried and it also fails , i found some of the culrpit, i just need a bit of time to finish unpackin repacking to test.
Comment 14 ouinouin 2024-09-25 15:53:29 UTC
so i did a bit of fiddling with unpacking repacking the images, first , never attemps to unpack with an unzipping tool as it breaks symlinks.

second : it seems the appimage doesnt like the desktop files being symlinks (not 100% sure), so i removed the symling and placed the original .desktop files instead in the root folder of the decompressed image

third , i had to modify the desktop entry like  the following : 

[Desktop Entry]
Type=Application
Categories=Qt;Graphics;Photography;
X-AppImage-Version=8.5.0
Exec=AppRun --no-sandbox %U
Icon=digikam
X-DocPath=digikam/index.html

calling the digikam executable directly is not working apparently for integration in the Exec section so i inspired myself from many other appimages that i unpacked , they all use  Exec=AppRun --no-sandbox %U
i had to add X-AppImage-Version=8.5.0 for the icon to be properly integrated , without that, i had no error for integration but no desktop entry was created so it semme mandatory

fourth, i had to add the shofoto icon (shofoto.png in the root of the root folder of the decompressed image, found in usr/share/icons/hicolor/256x256/apps) , otherwise the packaging command throws an error about missing error.

i could then launch and integrate without errors , and launch from mint menu once integrated without errors.
Comment 15 caulier.gilles 2024-09-25 17:11:11 UTC
The Qt6 version of the AppImage is now up-to-date with last Maik changes.

Gilles Caulier
Comment 16 ouinouin 2024-09-26 05:36:31 UTC
I had to remove the --no-sandbox in the exec entry which is more oriented for electron packaged apps a piori.

[Desktop Entry]
Type=Application
Categories=Qt;Graphics;Photography;
X-AppImage-Version=8.5.0
Exec=AppRun %U
Icon=digikam
X-DocPath=digikam/index.html
Comment 17 caulier.gilles 2024-09-27 07:10:19 UTC
Maik,

Desktop files are mandatory to build the appimage bundle :

...
---------- Create Bundle with AppImage SDK stage2

appimagetool, continuous build (commit 5735cc5), build <local dev build> built on 2023-03-08 22:52:04 UTC
Desktop file not found, aborting
FAILED COMMAND: ARCH=x86_64 ./$APPIMGBIN --comp xz $APP_IMG_DIR/ $ORIG_WD/bundle/$APPIMAGE
...

Gilles
Comment 18 caulier.gilles 2024-09-27 08:16:48 UTC
Git commit 84747e27e2cf811d45b4c161e0e13ed3fd86292b by Gilles Caulier.
Committed on 27/09/2024 at 08:15.
Pushed by cgilles into branch 'master'.

Restore .desktop files else compilation of AppImage will do not work

M  +2    -2    project/bundles/appimage/04-build-appimage.sh

https://invent.kde.org/graphics/digikam/-/commit/84747e27e2cf811d45b4c161e0e13ed3fd86292b
Comment 19 caulier.gilles 2024-12-03 12:50:50 UTC
Fixed with 492813