From 26c3193653daa96f77b9a58f7d432881f186f7f5 Mon Sep 17 00:00:00 2001 From: Scott Ehlert Date: Wed, 27 Oct 2010 22:07:40 -0700 Subject: [PATCH] Fixed loading L4D on Linux (bug 4681, r+a13=dvander). --- AMBuildScript | 4 ++-- core/GameConfigs.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/AMBuildScript b/AMBuildScript index e76f8290..0cfd1a62 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -205,7 +205,7 @@ class SM: else: staticLibs = os.path.join(sdkPath, 'lib', 'linux') workFolder = os.path.join(AMBuild.outputFolder, job.workFolder) - if sdk == 'ep2v' or sdk == 'l4d2': + if sdk in ['ep2v', 'l4d', 'l4d2']: for i in ['tier1_i486.a', 'mathlib_i486.a', 'libvstdlib.so', 'libtier0.so']: link = os.path.join(workFolder, i) target = os.path.join(staticLibs, i) @@ -280,7 +280,7 @@ class SM: if not noLink: if AMBuild.target['platform'] == 'linux': compiler['POSTLINKFLAGS'][0:0] = ['-lm'] - if sdk == 'ep2v' or sdk == 'l4d2': + if sdk in ['ep2v', 'l4d', 'l4d2']: compiler['POSTLINKFLAGS'][0:0] = ['libtier0.so'] compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib.so'] else: diff --git a/core/GameConfigs.cpp b/core/GameConfigs.cpp index 4dd34c18..12219118 100644 --- a/core/GameConfigs.cpp +++ b/core/GameConfigs.cpp @@ -506,7 +506,7 @@ SMCResult CGameConfig::ReadSMC_LeavingSection(const SMCStates *states) void *handle = dlopen(info.dli_fname, RTLD_NOW); if (handle) { -#if (SOURCE_ENGINE == SE_ORANGEBOXVALVE) || (SOURCE_ENGINE == SE_LEFT4DEAD2) +#if (SOURCE_ENGINE == SE_ORANGEBOXVALVE) || (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2) final_addr = g_MemUtils.ResolveSymbol(handle, &s_TempSig.sig[1]); #else final_addr = dlsym(handle, &s_TempSig.sig[1]);