advowson: Isn't that just a long-winded way of writing
LD_LIBRARY_PATH="$PWD" ./start.sh?
osm: which in turn is the long-winded way of saying LD_LIBRARY_PATH=.
Your version assumes the called program will not use
cd before executing anything else. Suppose that
./start.sh reads:
( cd bin/games && ./Baldur ) The loader will attempt to resolve the LD_LIBRARY_PATH of
. relative to bin/games, not relative to where you were when you ran the wrapper script. By setting LD_LIBRARY_PATH to an absolute path, whether through
readlink -f .,
pwd, or
$PWD, its meaning will remain constant regardless of subsequent calls to change the current working directory.
Thank you for sharing their response. Having read it, I understand now why you put the libraries in the global scope initially, and I am pleased to see that GOG did later correct that advice.
Now we just need them to change the installer so it does the right thing by default, so that people do not need to take special custom steps just to get the game working.
tdeo: I tried various searches for a solution like this but didn't know how to phrase the question for the search engine.
linux load library local directory turns up some hits that seem plausible, including one that specifically describes using LD_LIBRARY_PATH. More generally, that type of question ("How do I let a program find a library in its directory?") seems like one that your distribution's support forum ought to be able to answer.
tdeo: vv221, thanks for your help. Though I won't use your method I learned more about linux and its architecture.
In my opinion, this is a part of the architecture that you should not need to learn about for the sake of running pre-packaged software. The software ought to work out of the box, or failing that, include clear and readily discoverable instructions on how to make it work. That you had to try multiple Internet searches, then come here, then contact customer support, seems to me like a failing of the packaging process. In my opinion, you should have been provided, as part of the initial install, everything you needed to get it working without further use of the Internet. Clearly, what you were actually given was not sufficient for that.
tdeo: The simplest thing to do now is have an external Windows install. I can use this for HDR video, which Linux can't do yet, anyway.
I don't know if it will work, or if you will want to use it if it did work, but you
might be able to use native Windows to install the mod, then transplant that game data directory to Linux and run it under Wine. If you are the type of person who only boots into Windows for a small number of tasks and otherwise stays in Linux, this might be useful to you.