mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-23 16:54:14 +01:00
Updated loader to attempt to guess correct tier0/vstdlib filenames on linux (bug 5522).
This commit is contained in:
parent
140103bb43
commit
9c8cba00ba
@ -208,9 +208,15 @@ mm_GetGameName()
|
|||||||
char lib_path[PLATFORM_MAX_PATH];
|
char lib_path[PLATFORM_MAX_PATH];
|
||||||
const char *game_name;
|
const char *game_name;
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
if (!mm_ResolvePath("bin/libtier0_srv.so", lib_path, sizeof(lib_path))
|
||||||
|
&& !mm_ResolvePath("bin/libtier0.so", lib_path, sizeof(lib_path))
|
||||||
|
&& !mm_ResolvePath("bin/tier0_i486.so", lib_path, sizeof(lib_path)))
|
||||||
|
#else
|
||||||
if (!mm_ResolvePath(TIER0_NAME, lib_path, sizeof(lib_path)))
|
if (!mm_ResolvePath(TIER0_NAME, lib_path, sizeof(lib_path)))
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
mm_LogFatal("Could not find path for: " TIER0_NAME);
|
mm_LogFatal("Could not find path for tier0");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -232,9 +238,15 @@ mm_GetGameName()
|
|||||||
{
|
{
|
||||||
/* We probably have a Ship engine. */
|
/* We probably have a Ship engine. */
|
||||||
mm_UnloadLibrary(lib);
|
mm_UnloadLibrary(lib);
|
||||||
|
#ifdef __linux__
|
||||||
|
if (!mm_ResolvePath("bin/libvstdlib_srv.so", lib_path, sizeof(lib_path))
|
||||||
|
&& !mm_ResolvePath("bin/libvstdlib.so", lib_path, sizeof(lib_path))
|
||||||
|
&& !mm_ResolvePath("bin/vstdlib_i486.so", lib_path, sizeof(lib_path)))
|
||||||
|
#else
|
||||||
if (!mm_ResolvePath(VSTDLIB_NAME, lib_path, sizeof(lib_path)))
|
if (!mm_ResolvePath(VSTDLIB_NAME, lib_path, sizeof(lib_path)))
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
mm_LogFatal("Could not find path for: " VSTDLIB_NAME);
|
mm_LogFatal("Could not find path for vstdlib");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user