Add A2S_Rules fix for CS:GO to CStrike extension. (#614)
* Add A2S_Rules fix for CS:GO to CStrike extension. * Dont force set the cvar. Add checks before patching. * Remove incorrect and useless check. * Remove checking value as it is in the signature. * Update build script changes to AMBuild 2.1 API to fix build. * Fix bad check and ConVarRef being resolved too early. * Whoops. This line is kinda important. Got nuked when refactoring. * Remove unused variable. * Updatet gamedata. * Switch to "Addresses" gamedata lookup * Add linux64 gamedata * Fix mac build Co-authored-by: Ruben Gonzalez <[email protected]> Co-authored-by: Peace-Maker <[email protected]>
This commit is contained in:
co-authored by
Ruben Gonzalez
Peace-Maker
parent
6c2be9bdcc
commit
ae485c3115
@@ -24,11 +24,46 @@ for sdk_name in ['css', 'csgo']:
|
||||
if sdk_name not in SM.sdks:
|
||||
continue
|
||||
sdk = SM.sdks[sdk_name]
|
||||
|
||||
if sdk_name == 'csgo':
|
||||
project.sources += ['rulesfix.cpp']
|
||||
|
||||
for cxx in builder.targets:
|
||||
if not cxx.target.arch in sdk.platformSpec[cxx.target.platform]:
|
||||
continue
|
||||
|
||||
cxx.defines += ['HAVE_STRING_H'];
|
||||
SM.HL2ExtConfig(project, builder, cxx, 'game.cstrike.ext.' + sdk.ext, sdk)
|
||||
cxx.defines += ['HAVE_STRING_H']
|
||||
binary = SM.HL2ExtConfig(project, builder, cxx, 'game.cstrike.ext.' + sdk.ext, sdk)
|
||||
if sdk_name == 'csgo':
|
||||
compiler = binary.compiler
|
||||
compiler.cxxincludes += [os.path.join(sdk.path, 'public', 'steam')]
|
||||
compiler.defines += ['VERSION_SAFE_STEAM_API_INTERFACES']
|
||||
|
||||
library_name = ''
|
||||
if cxx.target.platform == 'windows':
|
||||
compiler.linkflags += [os.path.join(sdk.path, 'lib', 'public', 'steam_api.lib')]
|
||||
elif cxx.target.platform == 'linux':
|
||||
library_name = 'libsteam_api.so'
|
||||
if cxx.target.arch == 'x86_64':
|
||||
source_path = os.path.join(sdk.path, 'lib', 'linux64')
|
||||
else:
|
||||
source_path = os.path.join(sdk.path, 'lib', 'linux')
|
||||
elif cxx.target.platform == 'mac':
|
||||
library_name = 'libsteam_api.dylib'
|
||||
if cxx.target.arch == 'x86_64':
|
||||
source_path = os.path.join(sdk.path, 'lib', 'osx64')
|
||||
else:
|
||||
source_path = os.path.join(sdk.path, 'lib', 'mac')
|
||||
|
||||
if library_name:
|
||||
source_path = os.path.join(source_path, library_name)
|
||||
output_path = os.path.join(binary.localFolder, library_name)
|
||||
|
||||
# Ensure the output path exists.
|
||||
builder.AddFolder(binary.localFolder)
|
||||
output = builder.AddSymlink(source_path, output_path)
|
||||
|
||||
compiler.weaklinkdeps += [output]
|
||||
compiler.linkflags[0:0] = [library_name]
|
||||
|
||||
SM.extensions += builder.Add(project)
|
||||
|
||||
Reference in New Issue
Block a user