mirror of
https://github.com/clearlinux/linux-steam-integration.git
synced 2026-09-06 22:01:27 +00:00
redirect: Start skeleton for new liblsi-redirect
We're left in the awkward position that there are some games that **still** misbehave on Linux, and generally do Dumb Things. So to get around the fact that some vendors basically stopped caring about us, we'll create a special `LD_PRELOAD` library that is responsible for redirecting syscalls to basically monkeypatch broken behaviour completely. Signed-off-by: Ikey Doherty <ikey@solus-project.com>
This commit is contained in:
@@ -58,6 +58,11 @@ if with_libintercept == true
|
||||
cdata.set('HAVE_LIBINTERCEPT', '1')
|
||||
endif
|
||||
|
||||
with_libredirect = get_option('with-libredirect')
|
||||
if with_libredirect == true
|
||||
cdata.set('HAVE_LIBREDIRECT', '1')
|
||||
endif
|
||||
|
||||
with_frontend = get_option('with-frontend')
|
||||
|
||||
if get_option('with-new-libcxx-abi') == true
|
||||
|
||||
@@ -5,4 +5,5 @@ option('with-frontend', type: 'boolean', description: 'Build the LSI Settings UI
|
||||
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-libredirect', type: 'boolean', description: 'Enable libredirect library for fine-tuning Steam games', value: true)
|
||||
option('with-new-libcxx-abi', type: 'boolean', description: 'Enable when using the new libstdc++ ABI', value: false)
|
||||
|
||||
@@ -19,4 +19,5 @@ nica_includes = [
|
||||
subdir('lsi')
|
||||
subdir('frontend')
|
||||
subdir('intercept')
|
||||
subdir('redirect')
|
||||
subdir('shim')
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* This file is part of linux-steam-integration.
|
||||
*
|
||||
* Copyright © 2017 Ikey Doherty <ikey@solus-project.com>
|
||||
*
|
||||
* linux-steam-integration is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2.1
|
||||
* of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
__attribute__((constructor)) static void lsi_redirect_init(void)
|
||||
{
|
||||
fprintf(stderr, "Loading lsi_redirect\n");
|
||||
}
|
||||
|
||||
__attribute__((destructor)) static void lsi_redirect_unload(void)
|
||||
{
|
||||
fprintf(stderr, "Unloading lsi_redirect\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* Editor modelines - https://www.wireshark.org/tools/modelines.html
|
||||
*
|
||||
* Local variables:
|
||||
* c-basic-offset: 8
|
||||
* tab-width: 8
|
||||
* indent-tabs-mode: nil
|
||||
* End:
|
||||
*
|
||||
* vi: set shiftwidth=8 tabstop=8 expandtab:
|
||||
* :indentSize=8:tabSize=8:noTabs=true:
|
||||
*/
|
||||
@@ -0,0 +1,15 @@
|
||||
# Only build libintercept if told to!
|
||||
|
||||
if with_libredirect == true
|
||||
|
||||
redirect_sources = [
|
||||
'main.c',
|
||||
]
|
||||
|
||||
main_redirect = shared_library(
|
||||
'lsi-redirect',
|
||||
sources: redirect_sources,
|
||||
c_args: ['-fvisibility=hidden'],
|
||||
install: true,
|
||||
)
|
||||
endif
|
||||
Reference in New Issue
Block a user