mirror of
https://github.com/clearlinux/linux-steam-integration.git
synced 2026-09-06 22:01:27 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be3023263f | ||
|
|
27e5cd0ae0 | ||
|
|
79fece840c | ||
|
|
478a0f1810 | ||
|
|
2cf5db42b3 | ||
|
|
191ea02946 | ||
|
|
03dd537574 | ||
|
|
8ded405801 | ||
|
|
35b3f132fd | ||
|
|
4b718a4bc7 | ||
|
|
5ceacb27fb | ||
|
|
d1b7a86867 | ||
|
|
0c252321e3 | ||
|
|
b9d677dee1 | ||
|
|
86fbf11040 | ||
|
|
ec67c801ad | ||
|
|
0a02c111a0 | ||
|
|
48a9bac406 | ||
|
|
8de8962099 | ||
|
|
de9380dc8d | ||
|
|
9bd423fb34 | ||
|
|
75d2e9cc45 |
@@ -1,11 +1,52 @@
|
||||
linux-steam-integration
|
||||
-----------------------
|
||||
|
||||
Linux Steam Integration attempts to improve the Steam* gaming experience for users on Linux. In the default mode, it will disable the Steam runtime, and facilitate usage of the distro's own runtime for improved integration and performance. The Steam Runtime is a very old set of Ubuntu libraries, and as such provides a suboptimial experience for many Linux users. A key example of this is broken fontconfig, C++ ABI issues preventing loading, or even the broken theming of GTK widgets on non-Ubuntu distros. These woes have been compounded for users of the open source drivers.
|
||||
Linux Steam Integration is a software package aimed squarely at Linux distribution developers.
|
||||
It is designed to offer a far better Steam* experience than the stock client, doing away with old
|
||||
integration issues and crashes.
|
||||
|
||||
The LSI tool also allows you to use Steam's runtime if you need to, as currently not all cases are covered. It will also take care to prepare the environment, ensuring that users can load Steam using it's own runtime without hitting any of the issues common to a modern distro, i.e. ABI issues and having to `LD_PRELOAD` libraries to even make Steam start.
|
||||
### Native Libraries
|
||||
|
||||
More importantly, LSI achieves all of this by not having to **butcher your existing Steam installation**, as is common in some new tools.
|
||||
LSI enforces the use of host-native libraries, both in the Steam Client (via `lsi-intercept`) and
|
||||
games themselves. This ensures Steam integrates properly, games run with the latest libraries
|
||||
and users get the best performance.
|
||||
|
||||
Currently the officially provided Steam runtime is based on very old Ubuntu 12.04 packages,
|
||||
and has some cherry-picked updates (SDL, for example). This causes lots of integration issues
|
||||
on most newer distributions, such as broken client behaviour with full screen videos, outright
|
||||
crashes on startup, mismatched C++ ABI, missing sound, ugly menus, broken font rendering,
|
||||
poor performance, etc.
|
||||
|
||||
In a nut shell, LSI will force most of Steam over to using native libraries. The intercept
|
||||
system is new as of 0.4, and will be extended in future to allow improving certain games
|
||||
on a process-name whitelisting basis.
|
||||
|
||||
### Configurable
|
||||
|
||||
You can easily toggle the use of the native runtime or the runtime provided with the official
|
||||
Steam package distribution. LSI doesn't butcher any files, so your local Steam directory does
|
||||
not need to be repaired or reinstalled. Just run `lsi-settings` and restart Steam.
|
||||
|
||||
Currently you can control whether the native runtime is used, force 32-bit mode for some troublesome
|
||||
ports, and control whether the intercept library is enabled (which will undo the various library
|
||||
mangling tricks of the Steam distribution to force the usage of the system libs via rtld-audit)
|
||||
|
||||
### Portable
|
||||
|
||||
You can (and should) stick this into any distro. Hit us up if you need help integrating, or need some
|
||||
portability changes made. We won't bite.
|
||||
|
||||
### Going beyond LSI
|
||||
|
||||
LSI solves a great many issues, however there is then still a responsibility for the integrating distribution
|
||||
to provide basic ABI compatibility, as well as being functionally comparable to the "stock" runtime.
|
||||
Our future plans will basically involve creating a project based around LSI and a specially produced,
|
||||
optimised Steam runtime, usable on all Linux distributions.
|
||||
|
||||
If you want to be part of that effort - and help bring a modern, optimised gaming experience to your Linux
|
||||
users, please get in contact. Let's do this once, and do it right.
|
||||
|
||||
### We're not them.
|
||||
|
||||
This project, and by extension Solus, is not officially endorsed by, or affiliated with, Steam*, or its parent company, Valve*.
|
||||
|
||||
@@ -14,11 +55,18 @@ Linux Steam Integration is a [Solus project](https://solus-project.com/)
|
||||
|
||||

|
||||
|
||||
## Getting LSI
|
||||
|
||||
Integrating LSI
|
||||
===============
|
||||
LSI may not yet be available for your distribution, however some community maintained repositories do exist.
|
||||
|
||||
To correctly integrate LSI, your Steam package will require modification. LSI must provide the /usr/bin/steam binary, so your Steam package must move the main launcher to a shadow location.
|
||||
- [Arch Linux](https://aur.archlinux.org/packages/linux-steam-integration/)
|
||||
- [Fedora](https://copr.fedorainfracloud.org/coprs/alunux/linux-steam-integration/)
|
||||
- Solus uses LSI by default, just install the steam package.
|
||||
|
||||
|
||||
## Integrating LSI
|
||||
|
||||
To correctly integrate LSI, your Steam package will require modification. LSI must provide the `/usr/bin/steam binary`, so your Steam package must move the main launcher to a shadow location.
|
||||
|
||||
For users who do not have access to LSI in their distribution, because it has not been integrated yet, please configure with `-Dwith-shim=co-exist` to preserve your existing Steam integrity. Then use the "LSI Steam" shortcut in your menu to launch Steam via LSI.
|
||||
|
||||
@@ -27,7 +75,6 @@ For users who do not have access to LSI in their distribution, because it has no
|
||||
There are a number of meson configure options you should be aware of when integrating LSI correctly. The prominent ones are explained here.
|
||||
|
||||
`-Dwith-shim= none | co-exist | replacement`
|
||||
`--disable-replace-steam`
|
||||
|
||||
Control behaviour of the shim build. `none` will disable building the main
|
||||
shim, required for actually launching Steam in the first place.
|
||||
@@ -51,7 +98,7 @@ There are a number of meson configure options you should be aware of when integr
|
||||
Note that execv, not execvp, is used, to mask programs that may be
|
||||
in the `$PATH`, hence requiring an absolute path.
|
||||
|
||||
The default value for this option is::
|
||||
The default value for this option is:
|
||||
|
||||
/usr/lib/steam/steam
|
||||
|
||||
@@ -66,10 +113,15 @@ There are a number of meson configure options you should be aware of when integr
|
||||
runtime, and in this instance we manage the LD_PRELOAD environmental variable.
|
||||
Ensure this is correct, and escape $LIB for correct Linux usage.
|
||||
|
||||
The default value for this option is::
|
||||
The default value for this option is:
|
||||
|
||||
/usr/\$LIB/libX11.so.6:/usr/\$LIB/libstdc++.so.6
|
||||
|
||||
`-Dwith-new-libcxx-abi=$boolean`
|
||||
|
||||
Enable this if your distribution uses a recent libstdc++ build, from
|
||||
GCC 6 or higher.
|
||||
|
||||
`-Dwith-frontend=$boolean`
|
||||
|
||||
A small UI application is shipped to enable configuration of LSI, which presents
|
||||
@@ -80,12 +132,12 @@ There are a number of meson configure options you should be aware of when integr
|
||||
The lsi-settings application will only ever write new configurations to the
|
||||
**user** settings file, and requires no special permissions.
|
||||
|
||||
The default value for this option is::
|
||||
The default value for this option is:
|
||||
|
||||
false
|
||||
|
||||
|
||||
**How LSI Works**
|
||||
## How LSI Works
|
||||
|
||||
LSI provides a /usr/bin/steam binary to be used in place of the existing Steam script, which will then correctly set up the environment before swapping the process for the Steam process.
|
||||
When using a full build of LSI, the bootstrap shim will force a correct environment, removing any issues that can cause various older SDL versions to kill Steam. Additionally it will then
|
||||
@@ -106,7 +158,7 @@ Configuration options can be placed in an INI-style configuration file in a seri
|
||||
|
||||
The user configuration takes immediate priority. Secondly we have the system-wide configuration for affecting all accounts, and lastly the vendor configuration, which may be provided by the integrator.
|
||||
|
||||
Currently this INI file supports two options. The root section in this INI file must be `[Steam]`.
|
||||
Currently this INI file supports three options. The root section in this INI file must be `[Steam]`.
|
||||
|
||||
`use-native-runtime = $boolean`
|
||||
|
||||
@@ -130,19 +182,45 @@ Currently this INI file supports two options. The root section in this INI file
|
||||
|
||||
The default value of this variable is false.
|
||||
|
||||
`use-libintercept = $boolean`
|
||||
|
||||
Common issues
|
||||
=============
|
||||
If set to a true boolean value (yes/true/on), the `liblsi-intercept.so`
|
||||
library will be utilised to control dynamic linking within the Steam client
|
||||
and associated processes.
|
||||
|
||||
**Missing tray icon for Steam client using native OS runtime**
|
||||
Note this requires `use-native-runtime` to be set.
|
||||
|
||||
The default value of this variable is true.
|
||||
|
||||
|
||||
## Common issues
|
||||
|
||||
Virtually all issues will come down to having the right dependencies. LSI puts an emphasis on
|
||||
host-first libraries, so make sure all the correct libraries are available for both 32-bit and
|
||||
64-bit.
|
||||
|
||||
Steam has both 32-bit and 64-bit processes/libraries, having the full dependency set for both
|
||||
the client and common games/engines is a must.
|
||||
|
||||
|
||||
### Missing tray icon for Steam client using native OS runtime
|
||||
|
||||
Ensure you have the 32-bit version of libappindicator installed. This is required for the tray icon. libappindicator falls back to a standard X11 tray icon in the absence of desktop appindicator support.
|
||||
|
||||
Related issue: [Steam tray icon missing #2](https://github.com/solus-project/linux-steam-integration/issues/2)
|
||||
|
||||
### Steam fails to launch with libintercept/native-runtime
|
||||
|
||||
License
|
||||
-------
|
||||
Make sure you enable full debugging when first assigning dependencies to your runtime package:
|
||||
|
||||
```bash
|
||||
$ LSI_DEBUG=1 steam
|
||||
# If you use co-exist option:
|
||||
$ LSI_DEBUG=1 lsi-steam
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
`src/shim src/frontend src/lsi src/intercept`:
|
||||
|
||||
|
||||
+5
-1
@@ -1,7 +1,7 @@
|
||||
project(
|
||||
'linux-steam-integration',
|
||||
['c'],
|
||||
version: '0.4',
|
||||
version: '0.5',
|
||||
license: [
|
||||
'LGPL-2.1',
|
||||
],
|
||||
@@ -60,6 +60,10 @@ endif
|
||||
|
||||
with_frontend = get_option('with-frontend')
|
||||
|
||||
if get_option('with-new-libcxx-abi') == true
|
||||
cdata.set('LSI_USE_NEW_ABI', '1')
|
||||
endif
|
||||
|
||||
config_h = configure_file(
|
||||
configuration: cdata,
|
||||
output: 'config.h',
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
option('with-shim', type : 'combo', choices : ['replacement', 'co-exist', 'none'], default: 'replacement',
|
||||
option('with-shim', type : 'combo', choices : ['replacement', 'co-exist', 'none'], value: 'replacement',
|
||||
description : 'control how the shim is deployed')
|
||||
option('with-steam-binary', type: 'string', description: 'Set the path to the Steam binary', value: '/usr/lib/steam/steam')
|
||||
option('with-frontend', type: 'boolean', description: 'Build the LSI Settings UI', value: false)
|
||||
option('with-preload-libs', type: 'string', description: 'Colon separated list of libraries required to launch Steam games',
|
||||
value: '/usr/\$LIB/libxcb.so.1:/usr/\$LIB/libX11.so.6:/usr/\$LIB/libstdc++.so.6')
|
||||
option('with-libintercept', type: 'boolean', description: 'Enable libintercept library for controlling Steam linking', value: true)
|
||||
option('with-new-libcxx-abi', type: 'boolean', description: 'Enable when using the new libstdc++ ABI', value: false)
|
||||
|
||||
+2
-2
@@ -2,11 +2,11 @@
|
||||
set -e
|
||||
|
||||
if [[ ! -d buildroot/build32 ]]; then
|
||||
CC="gcc -m32" linux32 meson buildroot/build32 --prefix=/usr --sysconfdir=/etc --datadir=/usr/share --libdir=/usr/lib32 -Dwith-shim=none
|
||||
CC="gcc -m32" linux32 meson buildroot/build32 --prefix=/usr --sysconfdir=/etc --datadir=/usr/share --libdir=/usr/lib32 -Dwith-shim=none -Dwith-new-libcxx-abi=true
|
||||
fi
|
||||
|
||||
if [[ ! -d buildroot/build64 ]]; then
|
||||
meson buildroot/build64 --prefix=/usr --sysconfdir=/etc --datadir=/usr/share --libdir=/usr/lib64 -Dwith-shim=replacement -Dwith-steam-binary=/usr/lib64/steam/steam -Dwith-frontend=true
|
||||
meson buildroot/build64 --prefix=/usr --sysconfdir=/etc --datadir=/usr/share --libdir=/usr/lib64 -Dwith-shim=replacement -Dwith-steam-binary=/usr/lib64/steam/steam -Dwith-frontend=true -Dwith-new-libcxx-abi=true
|
||||
fi
|
||||
|
||||
ninja -C buildroot/build32
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ git submodule init
|
||||
git submodule update
|
||||
|
||||
# Script for ikey because he went with meson. *shrug*
|
||||
VERSION="0.4"
|
||||
VERSION="0.5"
|
||||
NAME="linux-steam-integration"
|
||||
git-archive-all.sh --format tar --prefix ${NAME}-${VERSION}/ --verbose -t HEAD ${NAME}-${VERSION}.tar
|
||||
xz -9 "${NAME}-${VERSION}.tar"
|
||||
|
||||
+165
-79
@@ -14,16 +14,101 @@
|
||||
#include <link.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "../common.h"
|
||||
#include "nica/nica.h"
|
||||
#include "nica/util.h"
|
||||
|
||||
static inline bool lsi_file_exists(const char *path)
|
||||
{
|
||||
struct stat st = { .st_ino = 0 };
|
||||
return (lstat(path, &st) == 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this a process we're actually interested in?
|
||||
* What's the known process name?
|
||||
*/
|
||||
static bool process_supported = false;
|
||||
static const char *matched_process = NULL;
|
||||
|
||||
/**
|
||||
* We support a number of modes, but we mostly exist to make Steam behave
|
||||
*/
|
||||
typedef enum {
|
||||
INTERCEPT_MODE_NONE = 0,
|
||||
INTERCEPT_MODE_STEAM,
|
||||
INTERCEPT_MODE_VENDOR_OFFENDER,
|
||||
} InterceptMode;
|
||||
|
||||
/**
|
||||
* by default, we're not "on"
|
||||
*/
|
||||
static InterceptMode work_mode = INTERCEPT_MODE_NONE;
|
||||
|
||||
/* Patterns we'll permit Steam to privately load */
|
||||
static const char *steam_allowed[] = {
|
||||
/* general */
|
||||
"libicui18n.so",
|
||||
"libicuuc.so",
|
||||
"libavcodec.so.",
|
||||
"libavformat.so.",
|
||||
"libavresample.so.",
|
||||
"libavutil.so.",
|
||||
"libswscale.so.",
|
||||
|
||||
/* core plugins */
|
||||
"chromehtml.so",
|
||||
"crashhandler.so",
|
||||
"filesystem_stdio.so",
|
||||
"friendsui.so",
|
||||
"gameoverlayrenderer.so",
|
||||
"gameoverlayui.so",
|
||||
"libaudio.so",
|
||||
"libmiles.so",
|
||||
"libopenvr_api.so",
|
||||
"liboverride.so",
|
||||
"libsteam.so",
|
||||
"libtier0_s.so",
|
||||
"libv8.so",
|
||||
"libvideo.so",
|
||||
"libvstdlib_s.so",
|
||||
"serverbrowser.so",
|
||||
"steamclient.so",
|
||||
"steamoverlayvulkanlayer.so",
|
||||
"steamservice.so",
|
||||
"steamui.so",
|
||||
"vgui2_s.so",
|
||||
|
||||
/* big picture mode */
|
||||
"panorama",
|
||||
"libpangoft2-1.0.so",
|
||||
"libpango-1.0.so",
|
||||
|
||||
/* steamwebhelper */
|
||||
"libcef.so",
|
||||
};
|
||||
|
||||
static const char *wanted_steam_processes[] = {
|
||||
"html5app_steam",
|
||||
"opengl-program",
|
||||
"steam",
|
||||
"steamwebhelper",
|
||||
};
|
||||
|
||||
/**
|
||||
* Vendor offendors should not be allowed to load replacements for libraries
|
||||
* that are KNOWN to cause issues, i.e. SDL + libstdc++
|
||||
*/
|
||||
static const char *vendor_blacklist[] = {
|
||||
/* base libraries being replaced will cause a C++ ABI issue when
|
||||
* loading the mesalib drivers. */
|
||||
"libgcc_",
|
||||
"libstdc++",
|
||||
"libSDL",
|
||||
|
||||
/* general problem causer. */
|
||||
"libopenal.so.",
|
||||
};
|
||||
|
||||
/**
|
||||
* Determine the basename'd process
|
||||
*/
|
||||
@@ -42,27 +127,16 @@ static inline char *get_process_name(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* Find out if we're being executed by a process we actually need to override,
|
||||
* otherwise we'd not be loaded by rtld-audit
|
||||
* Determine if we're in a given process set, i.e. the process name matches
|
||||
* the given table
|
||||
*/
|
||||
static bool is_intercept_candidate(void)
|
||||
static bool is_in_process_set(char *process_name, const char **processes, size_t n_processes)
|
||||
{
|
||||
static const char *wanted_processes[] = {
|
||||
"html5app_steam",
|
||||
"opengl-program",
|
||||
"steam",
|
||||
"steamwebhelper",
|
||||
};
|
||||
autofree(char) *nom = NULL;
|
||||
|
||||
nom = get_process_name();
|
||||
if (!nom) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < ARRAY_SIZE(wanted_processes); i++) {
|
||||
if (streq(wanted_processes[i], nom)) {
|
||||
matched_process = wanted_processes[i];
|
||||
/* Are we some portion of the process set? */
|
||||
for (size_t i = 0; i < n_processes; i++) {
|
||||
if (streq(processes[i], process_name)) {
|
||||
work_mode = INTERCEPT_MODE_STEAM;
|
||||
matched_process = processes[i];
|
||||
if (!getenv("LSI_DEBUG")) {
|
||||
return true;
|
||||
}
|
||||
@@ -75,6 +149,27 @@ static bool is_intercept_candidate(void)
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find out if we're being executed by a process we actually need to override,
|
||||
* otherwise we'd not be loaded by rtld-audit
|
||||
*/
|
||||
static void check_is_intercept_candidate(void)
|
||||
{
|
||||
autofree(char) *nom = NULL;
|
||||
|
||||
nom = get_process_name();
|
||||
if (!nom) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_in_process_set(nom, wanted_steam_processes, ARRAY_SIZE(wanted_steam_processes))) {
|
||||
work_mode = INTERCEPT_MODE_STEAM;
|
||||
} else {
|
||||
work_mode = INTERCEPT_MODE_VENDOR_OFFENDER;
|
||||
matched_process = "vendor_offender";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* la_version is our main entry point and will only continue if our
|
||||
* process is explicitly Steam
|
||||
@@ -82,7 +177,7 @@ static bool is_intercept_candidate(void)
|
||||
_nica_public_ unsigned int la_version(unsigned int supported_version)
|
||||
{
|
||||
/* Unfortunately glibc will die if we tell it to skip us .. */
|
||||
process_supported = is_intercept_candidate();
|
||||
check_is_intercept_candidate();
|
||||
return supported_version;
|
||||
}
|
||||
|
||||
@@ -100,65 +195,12 @@ static void emit_overriden_lib(const char *lib_name)
|
||||
}
|
||||
|
||||
/**
|
||||
* la_objsearch will allow us to blacklist certain LD_LIBRARY_PATH duplicate
|
||||
* libraries being loaded by the Steam client, such as the broken libSDL shipped
|
||||
* as a private vendored lib
|
||||
* lsi_search_steam handles whitelisting for the main Steam processes
|
||||
*/
|
||||
_nica_public_ char *la_objsearch(const char *name, __lsi_unused__ uintptr_t *cookie,
|
||||
__lsi_unused__ unsigned int flag)
|
||||
char *lsi_search_steam(const char *name)
|
||||
{
|
||||
/* We don't know about this process, so have glibc do its thing as normal */
|
||||
if (!process_supported) {
|
||||
return (char *)name;
|
||||
}
|
||||
|
||||
// Patterns we'll permit Steam to privately load
|
||||
static const char *steam_allowed[] = {
|
||||
/* general */
|
||||
"libicui18n.so",
|
||||
"libicuuc.so",
|
||||
"libavcodec.so.",
|
||||
"libavformat.so.",
|
||||
"libavresample.so.",
|
||||
"libavutil.so.",
|
||||
"libswscale.so.",
|
||||
|
||||
/* core plugins */
|
||||
"chromehtml.so",
|
||||
"crashhandler.so",
|
||||
"filesystem_stdio.so",
|
||||
"friendsui.so",
|
||||
"gameoverlayrenderer.so",
|
||||
"gameoverlayui.so",
|
||||
"libaudio.so",
|
||||
"libicui18n.so",
|
||||
"libicuuc.so",
|
||||
"libmiles.so",
|
||||
"libopenvr_api.so",
|
||||
"liboverride.so",
|
||||
"libsteam.so",
|
||||
"libtier0_s.so",
|
||||
"libv8.so",
|
||||
"libvideo.so",
|
||||
"libvstdlib_s.so",
|
||||
"serverbrowser.so",
|
||||
"steamclient.so",
|
||||
"steamoverlayvulkanlayer.so",
|
||||
"steamservice.so",
|
||||
"steamui.so",
|
||||
"vgui2_s.so",
|
||||
|
||||
/* big picture mode */
|
||||
"panorama",
|
||||
"libpangoft2-1.0.so",
|
||||
"libpango-1.0.so",
|
||||
|
||||
/* steamwebhelper */
|
||||
"libcef.so",
|
||||
};
|
||||
|
||||
/* Find out if it exists */
|
||||
bool file_exists = nc_file_exists(name);
|
||||
bool file_exists = lsi_file_exists(name);
|
||||
|
||||
/* Find out if its a Steam private lib.. These are relative "./" files too! */
|
||||
if (name && (strstr(name, "/Steam/") || strncmp(name, "./", 2) == 0)) {
|
||||
@@ -178,6 +220,50 @@ _nica_public_ char *la_objsearch(const char *name, __lsi_unused__ uintptr_t *coo
|
||||
return (char *)name;
|
||||
}
|
||||
|
||||
char *lsi_blacklist_vendor(const char *name)
|
||||
{
|
||||
/* Find out if it exists */
|
||||
bool file_exists = lsi_file_exists(name);
|
||||
|
||||
/* Find out if its a Steam private lib.. These are relative "./" files too! */
|
||||
if (name && (strstr(name, "/Steam/") || strncmp(name, "./", 2) == 0)) {
|
||||
for (size_t i = 0; i < ARRAY_SIZE(vendor_blacklist); i++) {
|
||||
if (!strstr(name, vendor_blacklist[i])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* If LSI_DEBUG is set, spam it. */
|
||||
if (getenv("LSI_DEBUG") && file_exists) {
|
||||
emit_overriden_lib(name);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
/* Allowed to exist */
|
||||
return (char *)name;
|
||||
}
|
||||
|
||||
return (char *)name;
|
||||
}
|
||||
|
||||
/**
|
||||
* la_objsearch will allow us to blacklist certain LD_LIBRARY_PATH duplicate
|
||||
* libraries being loaded by the Steam client, such as the broken libSDL shipped
|
||||
* as a private vendored lib
|
||||
*/
|
||||
_nica_public_ char *la_objsearch(const char *name, __lsi_unused__ uintptr_t *cookie,
|
||||
__lsi_unused__ unsigned int flag)
|
||||
{
|
||||
switch (work_mode) {
|
||||
case INTERCEPT_MODE_STEAM:
|
||||
return lsi_search_steam(name);
|
||||
case INTERCEPT_MODE_VENDOR_OFFENDER:
|
||||
return lsi_blacklist_vendor(name);
|
||||
case INTERCEPT_MODE_NONE:
|
||||
default:
|
||||
return (char *)name;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Editor modelines - https://www.wireshark.org/tools/modelines.html
|
||||
*
|
||||
|
||||
@@ -6,10 +6,26 @@ if with_libintercept == true
|
||||
'main.c',
|
||||
]
|
||||
|
||||
nica_build = static_library(
|
||||
'nica',
|
||||
sources: nica_sources,
|
||||
include_directories: nica_includes,
|
||||
)
|
||||
|
||||
link_nica = declare_dependency(
|
||||
link_with: nica_build,
|
||||
include_directories: nica_includes,
|
||||
)
|
||||
|
||||
|
||||
main_intercept = shared_library(
|
||||
'lsi-intercept',
|
||||
sources: intercept_sources + nica_sources,
|
||||
sources: intercept_sources,
|
||||
c_args: ['-fvisibility=hidden'],
|
||||
include_directories: nica_includes,
|
||||
dependencies: [
|
||||
link_nica,
|
||||
],
|
||||
install: true,
|
||||
)
|
||||
endif
|
||||
|
||||
+1
-4
@@ -44,11 +44,8 @@ int main(int argc, char **argv)
|
||||
int8_t off = 0;
|
||||
int (*vfunc)(const char *, char *const argv[]) = NULL;
|
||||
|
||||
#ifdef REPLACE_STEAM
|
||||
lsi_exec_bin = STEAM_BINARY;
|
||||
#else
|
||||
lsi_exec_bin = "/usr/bin/steam";
|
||||
#endif
|
||||
|
||||
/* Initialise config */
|
||||
if (!lsi_config_load(&config)) {
|
||||
lsi_config_load_defaults(&config);
|
||||
|
||||
Reference in New Issue
Block a user