Commit Graph

359 Commits

Author SHA1 Message Date
Ikey Doherty 5b59075ec0 Revert "intercept: Allow disabling (build-time) the udev redirection"
This reverts commit c640f2f215.

Turns out this is due to a very weird situation where Arch has their
libudev.so.0 as an incompatible API which all current games expect to
be of libudev.so.1 ABI, and isn't something LSI should be fixing, the
distro should.
2017-12-23 21:30:54 +00:00
Ikey Doherty c640f2f215 intercept: Allow disabling (build-time) the udev redirection
Arch Linux uses a funky udev shim package which is incompatible with
our udev workaround, so allow them to disable it and use their shim
instead (as some packages are apparently **built** against the shim.)

For all other distros which are binary-built in ABI lockstep with udev
proper, keep it enabled.

This fixes #46.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-12-23 19:52:37 +00:00
Ikey Doherty b80f79c8d0 Resync po
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-12-20 16:32:17 +00:00
Ikey Doherty 851f354f9f Promote v0.7.2
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
v0.7.2
2017-12-19 15:36:35 +00:00
Ikey Doherty 10d3be6a38 redirect: Split all Unity code out to fix linking problems
This should fix our linking issues that appeared once we opted to include
the `fcntl.h` header, which adds `#define`s for the exact symbols that
we are trying to override.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-12-19 15:35:48 +00:00
Ikey Doherty c8a45b7303 Promote 0.7.1
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
v0.7.1
2017-12-19 14:22:20 +00:00
Ikey Doherty 1b932e94fa redirect: Demote debug to info
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-12-19 14:21:59 +00:00
Ikey Doherty 003c462a77 Bump version to 0.7
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
v0.7
2017-12-19 13:55:26 +00:00
Ikey Doherty 7880b98f87 Remove old test.sh - not needed
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-12-19 13:54:04 +00:00
Ikey Doherty a91a00f1f5 Sync po
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-12-19 13:53:32 +00:00
Ikey Doherty 5998318a20 po: Sync po for unity string
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-12-19 12:48:32 +00:00
Ikey Doherty 1a725088af po: Sync translations
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-12-19 12:47:35 +00:00
Ikey Doherty f185b54c4d Add new LSI Settings screenshot
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-12-19 12:47:20 +00:00
Ikey Doherty 368e6ca7c7 Document the new sexies
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-12-19 12:45:14 +00:00
Ikey Doherty f12643039a common: Return realpath'd config dir where possible
This ensures we only use a sane realpath and collapse the slashes where
we can to allow trivial string matching.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-12-19 12:23:20 +00:00
Ikey Doherty 7cfdd41c7c redirect: Reduce error to info
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-12-18 18:55:16 +00:00
Ikey Doherty 889a4a7b7b Allow disabling Unity hack by the lsi-settings UI
By default we will keep this enabled now.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-12-18 18:54:46 +00:00
Ikey Doherty 4f810bfe97 redirect: Add workaround for the Unity Black Screen Of Nope
If we detect access to a unity3D configuration file, we'll enter the
unity3d workaround mode. Through this mode we'll abstract the real
"prefs" file away into `/dev/shm` so that Unity games do not directly
access that file again.

If no original prefs file exists, we'll write a new prefs file with the
absolute minimum requirement, i.e. disabling of fullscreen mode by default.
If one DOES exist, we'll copy all of the prefs file **except** for the
fullscreen option, and again, disabling it.

Upon library exit, again, we'll duplicate the unity config to the real
target file from the shm file, with the rewritten fullscreen option.

The net effect is that we create a circle of consumption that forcibly
disables unity games of a particular age (using `prefs` file) to not
start in fullscreen mode, which almost always means one of two things:

 - Missing UI text elements
 - Unity3D clamps resolution to 0x0

Many ports aren't going to see updates to their Unity build for a long time,
or indeed, ever. Instead we work around this in LSI and sit in between the
game and the configuration file.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-12-18 18:26:09 +00:00
Ikey Doherty 97e5813e4c intercept: Allow html5app_steam to load widevine
This should permit the encrypted playback to work correctly once more.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-12-15 18:35:52 +00:00
Ikey Doherty 0faa29aecd intercept: Handle /steamapps paths for #41
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-24 17:47:55 +00:00
Ikey Doherty 383b6492b5 shim: Fix vdpau for potential issues with not breaking the path
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-24 06:06:21 +00:00
Ikey Doherty f8b583bc0b intercept: Handle override of libudev.so.0 -> libudev.so.1
This should help with issue #38 but will need validation.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-15 14:34:37 +00:00
Ikey Doherty 9975bd5780 data: Don't set $SNAP, let lsi-exec work that stuff out
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-15 00:27:06 +00:00
Ikey Doherty 00ee48ee22 data: If we're using snap mode, configure frontend to use lsi-exec
This will ensure that the settings UI will always work, which will
somewhat perversely use lsi-exec through the config that it sets to
launch itself to set the config of lsi-exec..

This will allow us to actually expose lsi-settings as a usable thing
within the snap, where it is currently omitted. If we're not using snapd
mode, we'll just keep the file how it used to look.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-15 00:15:05 +00:00
Ikey Doherty 16a0750ed2 Revert "data: If we're using snap mode, configure frontend to use lsi-exec"
This reverts commit 657a911004.
2017-11-14 23:55:02 +00:00
Ikey Doherty 947654d9d3 shim: Read config AFTER setting up the environment
Under snapd we forcibly change XDG_CONFIG_HOME away from the "norm", and
read before the variable is set. Thus, the config written by lsi-settings
is correct, but under snapd the wrong file would be read all the time.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-14 23:16:09 +00:00
Ikey Doherty c59949cf0e frontend: Fix copy/paste and actually update liblsi-intercept config
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-14 22:58:31 +00:00
Ikey Doherty 657a911004 data: If we're using snap mode, configure frontend to use lsi-exec
This will ensure that the settings UI will always work, which will
somewhat perversely use lsi-exec through the config that it sets to
launch itself to set the config of lsi-exec..

This will allow us to actually expose lsi-settings as a usable thing
within the snap, where it is currently omitted. If we're not using snapd
mode, we'll just keep the file how it used to look.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-14 22:44:55 +00:00
Ikey Doherty 1d339cab05 shim: Drop derpy errno based checks
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-14 22:23:33 +00:00
Ikey Doherty a518fc6720 shim: Use a less derpy error dialog.
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-14 22:09:50 +00:00
Ikey Doherty 03758879ab shim: Allow lsi-exec to use the system path (execvp) instead
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-14 22:07:10 +00:00
Ikey Doherty 7131fd9771 shim: Add a new lsi-exec binary
This binary will allow us to run any command using the full LSI environment
and fully set it up as we would for Steam, greatly simplifying the testing
of the snap (and even for non-steam games!)

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-14 22:03:44 +00:00
Ikey Doherty 5013e0d747 shim: Split majority of the code into shim.c
This helps separate the main launch entry from the bulk of the bootstrap
code, and will also allow us to build a new lsi-exec tool that will just
execute whatever you tell it to, with the full shim setup routine.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-14 21:53:18 +00:00
Ikey Doherty 05bd0e0dac common: Fix broken ikey mind - correctly build Steam path
Thanks to @TingPing for bailing me out of my own insanity.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-14 21:17:47 +00:00
Ikey Doherty aa1b7374db common: Respect XDG specification for directories
If `XDG_{DATA,CONFIG}_HOME` variables are set in the environment, use
those to ensure portability and integration with the platform. This ensures
we always use the right locations for accessing config files and the Steam
root.

This fixes #34.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-14 21:13:27 +00:00
Ikey Doherty 82130bfbe8 shim: Use SNAP_USER_COMMON for our home tree
LSI enables Steam, which will invariably have massive games on disk.
We do NOT want this large data being moved around between upgrades,
and need this data to be "sticky" and unversioned.

To alleviate le huge pains of upgrades, start using this directory before
we go into production. This will mean only one last switch of the games
tree.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-14 05:58:19 +00:00
Ikey Doherty d73b7e7381 shim: Support Ubuntu ICD files
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-14 04:43:53 +00:00
Ikey Doherty 9f57d0ebf0 intercept: Fix one of the Ubuntu crashes
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-14 03:58:41 +00:00
Ikey Doherty f8d12b9800 intercept: Fix compiler warnings
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-14 01:32:04 +00:00
Ikey Doherty b3a562f4f9 intercept: Remove old snapd paths
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-14 01:31:26 +00:00
Ikey Doherty 94e5d09eba intercept: When in Steam mode, try to find host libraries ourselves
This gives help when LD_LIBRARY_PATH is a bit busted, as the "normal"
operational mode gets more help than we currently give to games.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-14 01:30:37 +00:00
Ikey Doherty 04e32cd5c5 intercept: Attempt using existing code-paths for all snapd libgl work
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-14 00:24:16 +00:00
Ikey Doherty cd5a1e6f97 intercept: Clamp down that intercept properly
Again for #38

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-13 18:45:59 +00:00
Ikey Doherty 287781356c intercept: Help Fedora by redirecting bzip2 automatically
Fedora doesn't seem to have `libbbz2.so.1` so let's intercept requests for
this guy and send them to the proper `libbz2.so.1.0.6`.

This fixes #38.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-13 18:44:32 +00:00
Ikey Doherty 80603598af Only use the new "gl32" location from now on, drop old guy
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-13 03:46:24 +00:00
Ikey Doherty e81f379882 shim: Make the vdpau code handle biarch, multiarch, and host
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-13 03:03:56 +00:00
Ikey Doherty 8d7b56f68c shim: Get ready for the new Vulkan snapd changes
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-13 02:14:54 +00:00
Ikey Doherty 87fab0c747 shim: Prepare for gl32 snapd paths
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-13 01:35:46 +00:00
Ikey Doherty 208585eebc shim: Fix broken shim_export_ld_dir, export VDPAU_DRIVER_PATH
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-13 01:33:47 +00:00
Ikey Doherty 01237d30c6 shim: Take a far more robust approach to LD_LIBRARY_PATH
This ensures we correctly set up `LD_LIBRARY_PATH` with required extra
directories inside the snap environment - only if they actually exist.
This allows us to expand that search path to ensure that tls and vdpau
bits are available on multiarch systems, and things continue to tick
over as normal on biarch systems.

This is part of tackling issue #35.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-11-13 00:07:17 +00:00