diff --git a/pressure-vessel/runtime.c b/pressure-vessel/runtime.c index 6cf25b6a70d5d33284f7f316984dfe5bdd8ef0d4..f471ae1f1e6aa91dac04f37f9595aee9f4a10125 100644 --- a/pressure-vessel/runtime.c +++ b/pressure-vessel/runtime.c @@ -5462,17 +5462,6 @@ pv_runtime_set_search_paths (PvRuntime *self, pv_search_path_append (ld_library_path, aliases); } - if (self->flags & PV_RUNTIME_FLAGS_SEARCH_CWD) - { - const gchar *install_path = g_environ_getenv (self->original_environ, - "STEAM_COMPAT_INSTALL_PATH"); - if (install_path != NULL) - pv_search_path_append (ld_library_path, install_path); - else - g_debug ("The environment variable \"STEAM_COMPAT_INSTALL_PATH\" is not set, " - "we can't append the game install path to LD_LIBRARY_PATH."); - } - /* If the runtime is Debian-based, make sure we search where ncurses-base * puts terminfo, even if we're using a non-Debian-based libtinfo.so.6. */ terminfo_path = g_build_filename (self->source_files, "lib", "terminfo", diff --git a/pressure-vessel/runtime.h b/pressure-vessel/runtime.h index 95998c8f0083ca583c896090f979fa1cf9f3d062..c201a920638bead3e46f98dcec026afe508c658b 100644 --- a/pressure-vessel/runtime.h +++ b/pressure-vessel/runtime.h @@ -44,7 +44,6 @@ * @PV_RUNTIME_FLAGS_UNPACK_ARCHIVE: Source is an archive, not a deployment * @PV_RUNTIME_FLAGS_FLATPAK_SUBSANDBOX: The runtime will be used in a * Flatpak subsandbox - * @PV_RUNTIME_FLAGS_SEARCH_CWD: Append the game install path to LD_LIBRARY_PATH * @PV_RUNTIME_FLAGS_NONE: None of the above * * Flags affecting how we set up the runtime. @@ -59,7 +58,6 @@ typedef enum PV_RUNTIME_FLAGS_COPY_RUNTIME = (1 << 5), PV_RUNTIME_FLAGS_UNPACK_ARCHIVE = (1 << 6), PV_RUNTIME_FLAGS_FLATPAK_SUBSANDBOX = (1 << 7), - PV_RUNTIME_FLAGS_SEARCH_CWD = (1 << 8), PV_RUNTIME_FLAGS_NONE = 0 } PvRuntimeFlags; @@ -72,7 +70,6 @@ typedef enum | PV_RUNTIME_FLAGS_COPY_RUNTIME \ | PV_RUNTIME_FLAGS_UNPACK_ARCHIVE \ | PV_RUNTIME_FLAGS_FLATPAK_SUBSANDBOX \ - | PV_RUNTIME_FLAGS_SEARCH_CWD \ ) typedef struct _PvRuntime PvRuntime; diff --git a/pressure-vessel/wrap.c b/pressure-vessel/wrap.c index b4c70c10e3bdcd7a505e1db277940607be4b1de9..3141995a4900d3c70cb8bf6b714f2329d60b7e83 100644 --- a/pressure-vessel/wrap.c +++ b/pressure-vessel/wrap.c @@ -726,18 +726,6 @@ static const char * const adverb_preload_options[G_N_ELEMENTS (opt_preload_modul "--ld-preload", }; -/* - * check_main_program: - * - * Return %TRUE if the command to execute is the main program. - */ -static gboolean -check_main_program (int argc, - char *argv[]) -{ - return g_getenv ("SteamAppId") != NULL; -} - static gboolean opt_host_ld_preload_cb (const gchar *option_name, const gchar *value, @@ -1308,9 +1296,7 @@ main (int argc, g_auto(GStrv) original_environ = NULL; int original_argc = argc; gboolean is_flatpak_env = g_file_test ("/.flatpak-info", G_FILE_TEST_IS_REGULAR); - gboolean is_main_program; gboolean is_home_shared = TRUE; - gboolean search_cwd = FALSE; g_autoptr(FlatpakBwrap) flatpak_subsandbox = NULL; g_autoptr(PvEnviron) container_env = NULL; g_autoptr(FlatpakBwrap) bwrap = NULL; @@ -1324,7 +1310,6 @@ main (int argc, g_autofree gchar *cwd_l = NULL; g_autofree gchar *cwd_p_host = NULL; const gchar *home; - const gchar *steam_compat_flags; g_autofree gchar *tools_dir = NULL; g_autoptr(PvRuntime) runtime = NULL; g_autoptr(FILE) original_stdout = NULL; @@ -1356,8 +1341,6 @@ main (int argc, original_environ = g_get_environ (); - is_main_program = check_main_program (argc, argv); - /* Set defaults */ opt_batch = pv_boolean_environment ("PRESSURE_VESSEL_BATCH", FALSE); opt_copy_runtime = is_flatpak_env; @@ -1851,23 +1834,6 @@ main (int argc, } } - steam_compat_flags = g_getenv ("STEAM_COMPAT_FLAGS"); - if (steam_compat_flags != NULL) - { - g_auto(GStrv) flags = g_strsplit (steam_compat_flags, ",", -1); - for (i = 0; flags[i] != NULL; i++) - { - if (g_strcmp0 (flags[i], "search-cwd") == 0) - /* This option is used to append the game install path to - * LD_LIBRARY_PATH for legacy purposes, to cope with games that - * relied on the old behaviour of LD_LIBRARY_PATH of ending with - * a colon, which ld.so interprets as the current working directory. */ - search_cwd = TRUE; - else - g_info ("STEAM_COMPAT_FLAGS has the unexpected flag \"%s\"", flags[i]); - } - } - if (opt_runtime != NULL || opt_runtime_archive != NULL) { G_GNUC_UNUSED g_autoptr(SrtProfilingTimer) timer = @@ -1909,12 +1875,6 @@ main (int argc, if (flatpak_subsandbox != NULL) flags |= PV_RUNTIME_FLAGS_FLATPAK_SUBSANDBOX; - /* Only if we are running the main program, append the working directory - * of the game to LD_LIBRARY_PATH. This option is not intended for the - * setup phase. */ - if (search_cwd && is_main_program) - flags |= PV_RUNTIME_FLAGS_SEARCH_CWD; - if (opt_runtime != NULL) { /* already checked for mutually exclusive options */