Skip to content

Add basic Insurgency support on Windows x64#1295

Merged
KyleSanderson merged 4 commits intoalliedmodders:masterfrom
peace-maker:win64_insurgency
Aug 7, 2020
Merged

Add basic Insurgency support on Windows x64#1295
KyleSanderson merged 4 commits intoalliedmodders:masterfrom
peace-maker:win64_insurgency

Conversation

@peace-maker
Copy link
Member

This allows SourceMod to load on x64 Insurgency. There are still a lot of variable truncation warnings that have to be dealt with.

Requires alliedmodders/sourcepawn#499

This allows SourceMod to load on x64 Insurgency. There are still a lot of variable truncation warnings that have to be dealt with.
The hack for __iob_func being removed from the core runtime, but required by the old mysql we're building against can be simplified a lot due to the `_ReturnAddress` intrinsic available since MSVC 2015.
@peace-maker
Copy link
Member Author

SourceMod has to be compiled against MM:S 1.11 on win64 due to required changes in a SourceHook header.
https://github.com/alliedmodders/metamod-source/blob/f17a958c6647f98b3761bd5f73162b3e69957420/core/sourcehook/sh_memfuncinfo.h#L128-L132

Otherwise vtable hooks won't work.

Copy link
Member

@KyleSanderson KyleSanderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a quick q about the logistics of extensions/win64 extensions/win32. Feels like a big move to me but I may have missed other boilerplate stuff making this okay / already validated.

cc @dvander @psychonic @asherkin for thoughts

path,
PLATFORM_MAX_PATH,
"extensions/%s." PLATFORM_LIB_EXT,
"extensions/" PLATFORM_ARCH_FOLDER "%s." PLATFORM_LIB_EXT,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm. This is my only aversion to taking this. Do we really want a magic folder in extensions where subarch extensions live? what do you think about extensions_win64/coolthing.dll vs extensions/win64/coolthing.dll ? If this is the convention elsewhere that's cool, but this feels like a big change that I may have forgotten.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PLATFORM_ARCH_FOLDER is just x64 or empty on x86, not win64 or win32.

#define PLATFORM_ARCH_FOLDER "x64" PLATFORM_SEP

So all 64bit extensions live in extensions/x64/coolthing.dll/so/dylib which is the same we already do for stuff in sourcemod/bin/x64/sourcemod.logic.dll and the game does for e.g. bin/x64/engine.dll. Seems like an oversight, because the package script already puts the files in extensions/x64, they just weren't loaded from there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, yeah I saw the definitions and missed the actual name. @TheDS are you okay with this?

@KyleSanderson KyleSanderson merged commit 510bd26 into alliedmodders:master Aug 7, 2020
@KyleSanderson
Copy link
Member

Thanks @peace-maker 😄

@peace-maker peace-maker deleted the win64_insurgency branch August 7, 2020 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants