AppImage

Multiple executables in one AppImage which share libs

#1

I have two applications built with the Qt framework that I’d like to package together. There is a main program that calls a secondary program.

Both programs share some Qt libraries. I currently build the secondary as an appImage then include it in the main appImage. This makes the overall image very large. It would be much smaller if I could build both executables into one image and have them share libraries. I looked at the documentation and I’m not finding any mention of how to do this.

Is this possible?

#2

Yes. Have both applications in the same AppDir, and specify the secondary application (the one that is not being referenced in Exec= in the desktop file) to linuxdeployqt like this: linuxdeployqt -binary=appdir/usr/bin/secondaryapp -appimage.

#3

Hi @probono

My scenario is a bit different to @bbailey 's
I got a set of command line utilities (written in C++/built with CMake + gcc);
and these utilities depend on some common shared libraries.

Accroding to the rule “one AppImage file = one application”,
it seems that it is not possible to package all of the utilities together into one AppImage.
(even if the bin folder in AppDir is allowed to contain multiple executable.)

One workaround I can image is that I create a launcher and make the launcher to invoke the utilities in AppDir/bin.
(AppRun points to the launcher).

Is there any suggestion for my scenario?

Thanks.

#4

ahha it seems I asked the same question as

#5

Yes. Is it working for you?

#6

I haven’t try yet. But I thought it should work. Thanks :grinning: