Skip to content

pressure-vessel: respect STEAM_COMPAT_FLAGS=search-cwd

Ludovico de Nittis requested to merge wip/search_cwd into master

If we have "search-cwd" in STEAM_COMPAT_FLAGS, and we are running the main program, we need to append to LD_LIBRARY_PATH the working directory of the game that we want to execute. Said directory is expected to be STEAM_COMPAT_INSTALL_PATH.

Fixes: #46 (closed)


This took me way more than expected. The whole process of how we decide what goes in LD_LIBRARY_PATH is a bit confusing and sparse in a lot of places. Then there was the session mode vs the single mode/relaunch to take into consideration.

In this MR there is my latest iteration where I used a similar check to the one in _v2-entry-point, to evaluate if we are running the main program, and condensed all the necessary bits in just a single place.

/cc @smcv

Edited by Simon McVittie

Merge request reports