Friday, November 03, 2023

adding a file to an appimage

To test out the script in the interesting discussion
https://github.com/Stellarium/stellarium/discussions/3424

I tried to add the script in the discussion to an appimage of stellarium 19.3. It turns out it's not that easy, but some things can be done.

https://superuser.com/questions/1301583/how-can-i-extract-files-from-an-appimage

suggests the --appimage-extract command-line option, but is not very explicit on whether the option should be run on appimagetool or on the appimage itself.

https://unix.stackexchange.com/questions/517881/how-can-i-change-the-files-of-an-appimage

clarifies that the option is to be run on the appimage itself, and not on appimagetool.

So, that extracted the files into ./squashfs-root, and I could add the new script into the scripts directory. But when I tried to create an appimage from the modified squashfs-root using appimagetool, it failed with an error,

org.stellarium.Stellarium:~: metainfo-filename-cid-mismatch

Googling led me to https://kb.vmware.com/s/article/1007969
which says that we should manually correct the cid for similar errors with VM images. But that advice doesn't seem to be relevant here. 

In any case, the bin directory inside ./squashfs-root had a stellarium executable which could run, and the extra added script also showed up.

No comments:

Post a Comment