Skip to content

Improve deployment of additional GTK libraries #4

Closed

Description

@TheAssassin

Right now, the deployment of the files is done with cp

cp $verbose \
"$gdk_libdir/"libgdk_pixbuf*.so* \
"$gobject_libdir/"libgobject*.so* \
"$gio_libdir/"libgio*.so* \
"$librsvg_libdir/"librsvg*.so* \
"$APPDIR/usr/lib/"

and

export LD_LIBRARY_PATH="\$APPDIR/usr/lib:\$LD_LIBRARY_PATH"

These changes were introduced by @x0rg in c008df6.

The issue with $LD_LIBRARY_PATH is that it is not side-effect-free with regards to subprocesses created by the processes in the AppImage. We've seen problems created by exactly this constellation with the (now very much deprecated) AppRun.c in AppImageKit. This is why linuxdeploy (and its plugins) usually use the DT_RUNPATH ELF header field instead (see man ld for more information).

linuxdeploy now exports the $LINUXDEPLOY environment variable with its own path, allowing plugins that are run by it to call linuxdeploy and use it to deploy additional libraries. This could and should be used by this plugin to eliminate the dependency on $LD_LIBRARY_PATH.

Note: we should still support standalone runs of this plugins. The easiest way would be to just error out when $LINUXDEPLOY is not set, telling the user to download a suitable linuxdeploy AppImage, set the env var and re-run the plugin.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions