diff --git a/AMBuildScript b/AMBuildScript index 6ece3c19..73b18936 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -274,7 +274,7 @@ class MMSPluginConfig(object): elif cxx.like('msvc'): if builder.options.debug == '1': - cxx.cflags += ['/MTd'] + cxx.cflags += ['/MDd'] cxx.linkflags += ['/NODEFAULTLIB:libcmt'] else: cxx.cflags += ['/MT'] diff --git a/AMBuilder b/AMBuilder index 42bd5997..f61c5142 100644 --- a/AMBuilder +++ b/AMBuilder @@ -41,6 +41,7 @@ for sdk_name in MMSPlugin.sdks: os.path.join(builder.sourcePath, 'vendor', 'funchook', 'lib', 'funchook.lib'), os.path.join(builder.sourcePath, 'vendor', 'funchook', 'lib', 'distorm.lib'), os.path.join(builder.sourcePath, 'vendor', 'protobuf-lib', 'libprotobuf.lib'), + os.path.join(builder.sourcePath, 'sdk', 'lib', 'public', 'win64', 'steam_api64.lib') ] binary.sources += ['src/utils/plat_win.cpp'] @@ -67,8 +68,12 @@ for sdk_name in MMSPlugin.sdks: if sdk_name in ['dota', 'cs2']: binary.sources += [ os.path.join(sdk.path, 'entity2', 'entitysystem.cpp'), - os.path.join(sdk.path, 'tier1', 'convar.cpp'), - os.path.join(sdk.path, 'public', 'tier0', 'memoverride.cpp'), + os.path.join(sdk.path, 'tier1', 'convar.cpp') + ] + + if sdk_name in ['dota', 'cs2'] and (binary.compiler.target.platform == 'windows' and builder.options.debug != '1') or binary.compiler.target.platform == 'linux': + binary.sources += [ + os.path.join(sdk.path, 'public', 'tier0', 'memoverride.cpp') ] if cxx.target.arch == 'x86': diff --git a/CS2Fixes.vcxproj b/CS2Fixes.vcxproj index af03fd06..db88c83c 100644 --- a/CS2Fixes.vcxproj +++ b/CS2Fixes.vcxproj @@ -131,7 +131,7 @@ Windows true false - interfaces.lib;tier0.lib;tier1.lib;psapi.lib;funchook.lib;distorm.lib;vendor/protobuf-lib/libprotobuf.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) + interfaces.lib;tier0.lib;tier1.lib;psapi.lib;funchook.lib;distorm.lib;steam_api64.lib;vendor/protobuf-lib/libprotobuf.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) sdk/lib/public/win64;%(AdditionalLibraryDirectories) @@ -149,7 +149,7 @@ pch.h stdcpp20 src/utils;src/cs2_sdk;sdk/public;sdk/public/tier0;sdk/game/shared;sdk/game/server;sdk/public/tier1;minhook/include;$(MMSOURCE112)/core;$(MMSOURCE112)/core/sourcehook;vendor/subhook;vendor/funchook/include;sdk/public/entity2;sdk/public/game/server;vendor/protobuf-3.21.8/src;$(SolutionDir);%(AdditionalIncludeDirectories) - MultiThreaded + MultiThreadedDLL %(UndefinePreprocessorDefinitions) @@ -158,7 +158,7 @@ true true false - interfaces.lib;tier0.lib;tier1.lib;psapi.lib;funchook.lib;distorm.lib;vendor/protobuf-lib/libprotobuf.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) + interfaces.lib;tier0.lib;tier1.lib;psapi.lib;funchook.lib;distorm.lib;steam_api64.lib;vendor/protobuf-lib/libprotobuf.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) sdk/lib/public/win64;vendor/funchook/lib;%(AdditionalLibraryDirectories)