Pass lib path from run script as env. var and read it in DLIR

It's always set by the run script, but I've added a fallback in case someone
hardcodes the mono command in a .desktop or something
This commit is contained in:
YoshiRulz 2020-07-28 18:15:37 +10:00
parent 765eb443a5
commit b6f4344592
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 3 additions and 1 deletions

View File

@ -20,6 +20,7 @@ if [ -z "$libpath" ]; then
fi
if [ -z "$winepath" ]; then winepath="$libpath/wine"; fi
export LD_LIBRARY_PATH="$PWD/dll:$PWD:$winepath:$libpath"
export BIZHAWK_INT_SYSLIB_PATH="$libpath"
if [ "$1" = "--mono-no-redirect" ]; then
shift
printf "(received --mono-no-redirect, stdout was not captured)\n" >EmuHawkMono_laststdout.txt

View File

@ -24,10 +24,11 @@ namespace BizHawk.Common
static DynamicLibraryImportResolver()
{
var currDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase)?.Replace("file:", "") ?? string.Empty;
var sysLibDir = Environment.GetEnvironmentVariable("BIZHAWK_INT_SYSLIB_PATH") ?? "/usr/lib";
UnixSearchPaths = new[]
{
$"{currDir}/", $"{currDir}/dll/",
"/usr/lib/bizhawk/", "/usr/lib/", "/usr/lib/mupen64plus/"
$"{sysLibDir}/bizhawk/", $"{sysLibDir}/", $"{sysLibDir}/mupen64plus/"
};
}