solus-project / linux-steam-integration

Helper for enabling better Steam integration on Linux
GNU Lesser General Public License v2.1
433 stars 19 forks source link

Implement snapd support #30

Closed ikeydoherty closed 7 years ago

ikeydoherty commented 7 years ago

Basically we'll need to add a configure option that builds LSI as needing snapd support.

This will initially teach it to look at the $SNAP environmental variable to build all file paths relative to it.

Right now that'll include a relative (not system-wide "packaging") of Steam, so looking at /usr is now out of the picture.

We'll also need to figure a nice way to build the LD_PRELOAD/LD_AUDIT paths based on the snapd root, perhaps something like:

LD_AUDIT=`/snap/linux-steam-integration/x1/\$LIB/liblsi-intercept.so

Given that we know we're going to be using Solus in the runtime, we can safely use /lib32 /lib64 relative to the base of the snap.

Additionally we might want to drop the derpy dependency on zenity and just implement our own error dialog.

ikeydoherty commented 7 years ago

Reference so I don't forget after I wake up from some sleep (And I certainly would forget)

https://docs.snapcraft.io/reference/env https://docs.snapcraft.io/snaps/structure

ikeydoherty commented 7 years ago

OK so long story short, we're gonna have to stop cheating here :)

Let's create a new redirect table for /usr/lib{,32,64}/lib{E,}GL.so that we redirect to the host libraries when they exist.. Otherwise falling back to mesa.

ikeydoherty commented 7 years ago

Additionally we need to stop putting LSI itself into the core runtime as we're screwing up search paths (and cheating)

ikeydoherty commented 7 years ago

OK fair to say this is implemented now