I am having difficulty adding AppStream upstream metadata
to my project's AppImage.
Below are the relevant parts of the file structure of my AppImage:
something.AppDir
|__AppRun
|__io.github.accountname.repositoryname.desktop
|__icon.png
|__usr
|__share
|__metainfo
|__io.github.accountname.repositoryname.appdata.xml
Within its file usr/share/metainfo/io.github.account.project.appdata.xml
, the following statement related to .desktop
exist:
<launchable type="desktop-id">io.github.accountname.repositoryname.desktop</launchable>
However, after issuing the command:
$ ./appimagetool-x86_64.AppImage something.AppDir
these messages appears:
appimagetool, continuous build (commit 5735cc5), build <local dev build> built on 2023-03-08 22:52:04 UTC
Using architecture x86_64
/home/user/projects/something.AppDir should be packaged as something-x86_64.AppImage
AppStream upstream metadata found in usr/share/metainfo/io.github.accountname.repositoryname.appdata.xml
Trying to validate AppStream information with the appstreamcli tool
In case of issues, please refer to https://github.com/ximion/appstream
io.github.accountname.repositoryname.appdata.xml
I: io.github.accountname.repositoryname:~: content-rating-missing
W: io.github.accountname.repositoryname:~: desktop-file-not-found
ā Validation failed: warnings: 1, infos: 1, pedantic: 4
run_external: subprocess exited with status 3Failed to validate AppStream information with appstreamcli
How do I resolve these issues when appstreamcli validate
is successful:
$ appstreamcli validate --pedantic something.AppDir/usr/share/metainfo/io.github.accountname.repositoryname.appdata.xml
P: io.github.accountname.repositoryname:22: screenshot-no-caption
P: io.github.accountname.repositoryname:~: releases-info-missing
I: io.github.accountname.repositoryname:~: content-rating-missing
P: io.github.accountname.repositoryname:19: screenshot-no-caption
ā Validation was successful: infos: 1, pedantic: 3
The io.github.account.project.appdata.xml
file was created using this recommended online tool
The appimagetool-x86_64.AppImage
is from here.
I discovered that the following change to the file structure mentioned in my question is needed:
something.AppDir
|__AppRun
|__io.github.accountname.repositoryname.desktop (symlink from usr/share/appliacations)
|__icon.png
|__usr
|__share
|__metainfo
|__io.github.accountname.repositoryname.appdata.xml
|__applications
|__io.github.accountname.repositoryname.desktop
Essentially, the io.github.accountname.repositoryname.desktop
ought to be placed in the folder something.AppDir/usr/share/applications
. Then symlink this file into the something.AppDir
folder as described in AppImage documentation.