CDetour safetyhook (#2162)

* Add safetyhook, remove libudis86

Co-authored-by: bottiger1 <[email protected]>

* Add modified CDetour

Co-authored-by: bottiger1 <[email protected]>

* Add CDetour [Safetyhook] to build script

* Re-enable loader/core/corelogic, and fix new C++20 error

* Reenable all extensions (except dhooks)

* Make cstrike compile against new CDetour

* Remove unused variable in sdktools output?

* Make sdktools compile against new cdetour

* Downgrade to C++17

* remove auto

* fix compilation on linux

* Re-enable dhooks

* Re-authorise old compilers

* Fix invalid downgrade of std::optional

* readd libudis86 for dhooks only

---------

Co-authored-by: Kenzzer <[email protected]>
Co-authored-by: bottiger1 <[email protected]>
This commit is contained in:
Benoist
2024-05-21 01:53:44 +00:00
committed by GitHub
co-authored by bottiger1 Kenzzer
parent e3734803f0
commit e07c120cab
30 changed files with 71530 additions and 341 deletions
+7 -13
View File
@@ -24,15 +24,7 @@ project.sources += [
'hooks.cpp',
'gamerulesnatives.cpp',
'vstringtable.cpp',
'../../public/smsdk_ext.cpp',
'../../public/CDetour/detours.cpp',
'../../public/asm/asm.c',
'../../public/libudis86/decode.c',
'../../public/libudis86/itab.c',
'../../public/libudis86/syn-att.c',
'../../public/libudis86/syn-intel.c',
'../../public/libudis86/syn.c',
'../../public/libudis86/udis86.c',
'../../public/smsdk_ext.cpp'
]
for sdk_name in SM.sdks:
@@ -45,18 +37,20 @@ for sdk_name in SM.sdks:
continue
binary = SM.HL2ExtConfig(project, builder, cxx, 'sdktools.ext.' + sdk['extension'], sdk)
SM.AddCDetour(binary)
binary.compiler.cxxincludes += [
os.path.join(builder.sourcePath, 'public', 'jit'),
os.path.join(builder.sourcePath, 'public', 'jit', 'x86'),
]
if sdk['name'] in ('episode1', 'darkm'):
binary.compiler.cxxincludes += [os.path.join(builder.options.hl2sdk_root, sdk['path'], 'game_shared')]
binary.compiler.cxxincludes += [os.path.join(builder.options.hl2sdk_root, sdk['path'], 'dlls')]
binary.compiler.cxxincludes += [os.path.join(sdk['path'], 'game_shared')]
binary.compiler.cxxincludes += [os.path.join(sdk['path'], 'dlls')]
else:
binary.compiler.cxxincludes += [
os.path.join(builder.options.hl2sdk_root, sdk['path'], 'game', 'shared'),
os.path.join(builder.options.hl2sdk_root, sdk['path'], 'game', 'server'),
os.path.join(sdk['path'], 'game', 'shared'),
os.path.join(sdk['path'], 'game', 'server'),
]
#binary.sources += [os.path.join(builder.options.hl2sdk_root, sdk['path'], 'game', 'server', 'variant_t.cpp')]