SteamWorks icon indicating copy to clipboard operation
SteamWorks copied to clipboard

update for 64 bits

Open bottiger1 opened this issue 1 year ago • 9 comments
trafficstars

probably broke buildbot with this due to ambuild issues. can't run hl2sdk_manifest script outside of source dir nor can you make a symlink outside of it so I made the symlink in a bash script.

do what you will with this

bottiger1 avatar May 07 '24 21:05 bottiger1

I would test this if I could, but I need the Windows version of the extension. I tried building it myself (which is really hard to do because there are no instructions on how to build it), but AMBuild is refusing to cooperate and is complaining of errors in swgsdetours.cpp:

swgsdetours.cpp C:[path]\steamworks-x64\Extension\swgsdetours.cpp(38): error C2065: 'SteamGameServer_InitSafeDetour': undeclared identifier C:[path]\steamworks-x64\Extension\swgsdetours.cpp(38): error C2062: type 'bool' unexpected C:[path]\steamworks-x64\Extension\swgsdetours.cpp(39): error C2143: syntax error: missing ';' before '{' C:[path]\steamworks-x64\Extension\swgsdetours.cpp(39): error C2447: '{': missing function header (old-style formal list?) C:[path]\steamworks-x64\Extension\swgsdetours.cpp(100): error C2065: 'SteamGameServer_InitSafeDetour': undeclared identifier C:[path]\steamworks-x64\Extension\swgsdetours.cpp(100): error C2065: 'SteamGameServer_InitSafeDetour_Actual': undeclared identifier

C0deSlasher avatar May 19 '24 01:05 C0deSlasher

I'm not willing to spend much of my time on the windows version given that I don't have a windows build environment set up, and the lack of other people working on 64 bits is sucking up most of my time.

Your error indicates there is something wrong with your DETOUR_DECL_STATIC6 macro. Either it's missing or corrupted or your compiler is out of date.

bottiger1 avatar May 19 '24 02:05 bottiger1

The DETOUR_DECL_STATIC6 macro from swgsdetours.cpp is the same as yours. It came from your fork.

I am trying to use Visual Studio Community 2022 as the C++ compiler.

C0deSlasher avatar May 19 '24 02:05 C0deSlasher

I'm sorry but I cannot offer you any more support on this. My fork doesn't have the macro, it comes from sourcemod.

bottiger1 avatar May 19 '24 02:05 bottiger1

Sorry, you are right, that does come from SourceMod. The point that I am trying to make is that something is preventing me from building this. Other Windows users may need help with this as well if you or someone else does not build it for them.

Also of interest is that I am using the version of SourceMod that your .yml work file is recommending: 1.7. How are you making this work with such an old version of SourceMod?

C0deSlasher avatar May 19 '24 03:05 C0deSlasher

I was able to get your previous version to build using Visual Studio 2015, hl2sdk-sdk2013, SourceMod 1.12 (not 1.7 like .github\workflows\c-cpp.yml suggested, which is what caused the problems earlier), MetaMod 2.0 (not 1.10), and a version of the Steamworks SDK that I found on here from someone. However, it resulted in a 32-bit extension instead of a 64-bit extension, and any attempt to force Visual Studio 2015 to make a 64-bit extension failed. Funny how something as simple as adding "--target x86_64" allowed for the x86 x64 cross tools compiler to initialize configure.py with your newest version, but now, it looks like you added some extra requirements, as ambuild is now complaining of missing "Zydis.c".

I know that you do not have much time, but I am determined to make this work. Hopefully, if we can come up with a solution, other Windows users may benefit from it.

Would you be willing to at least tell me what dependencies, dependency versions, and compiler you are using?

C0deSlasher avatar May 31 '24 05:05 C0deSlasher

I did not test windows, it may have compiler flags missing in windows. If there is some file that sets sourcemod to be an ancient version on windows, that is because I don't know about it. I have no idea how this build system works in windows. I used the latest sourcemod and metamod.

Zydis was moved out of the CDetour folder. Just look for it on the sourcemod github. When I was working on my pull request for sourcemod I put it in the CDetour folder, but someone close to the core devs decided to take over what I started and put it in a different directory.

bottiger1 avatar May 31 '24 14:05 bottiger1

Updating my copy of the master branch of SourceMod helped me find the Zydis files, but you also made safetyhook.cpp a requirement. That file expects to find an include file called "optional", which does not exist in SourceMod's master branch. Any idea where I might be able to find that file?

C0deSlasher avatar Jun 02 '24 23:06 C0deSlasher

Yeah, recent sourcemod changes moved safetyhook files around, the build script needs to be updated

rafradek avatar Jun 23 '24 21:06 rafradek