Skip to content

Commit

Permalink
fix compile on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Poggicek authored and xen-000 committed Oct 27, 2023
1 parent 2030a7c commit af84cac
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion AMBuildScript
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
9 changes: 7 additions & 2 deletions AMBuilder
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand All @@ -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':
Expand Down
6 changes: 3 additions & 3 deletions CS2Fixes.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>interfaces.lib;tier0.lib;tier1.lib;psapi.lib;funchook.lib;distorm.lib;vendor/protobuf-lib/libprotobuf.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>interfaces.lib;tier0.lib;tier1.lib;psapi.lib;funchook.lib;distorm.lib;steam_api64.lib;vendor/protobuf-lib/libprotobuf.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>sdk/lib/public/win64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ShowProgress>
</ShowProgress>
Expand All @@ -149,7 +149,7 @@
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<LanguageStandard>stdcpp20</LanguageStandard>
<AdditionalIncludeDirectories>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)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<UndefinePreprocessorDefinitions>%(UndefinePreprocessorDefinitions)</UndefinePreprocessorDefinitions>
</ClCompile>
<Link>
Expand All @@ -158,7 +158,7 @@
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>interfaces.lib;tier0.lib;tier1.lib;psapi.lib;funchook.lib;distorm.lib;vendor/protobuf-lib/libprotobuf.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>interfaces.lib;tier0.lib;tier1.lib;psapi.lib;funchook.lib;distorm.lib;steam_api64.lib;vendor/protobuf-lib/libprotobuf.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>sdk/lib/public/win64;vendor/funchook/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ShowProgress>
</ShowProgress>
Expand Down

0 comments on commit af84cac

Please sign in to comment.