Switch the Compiler to Clang (with concessions)#23
Switch the Compiler to Clang (with concessions)#23fairangelica wants to merge 1 commit intosaturn-xvi:mainfrom
Conversation
|
I've also had issues with preprocessor string concatenation when I tried building the project manually with MinGW/GCC, so just removing it will probably break the game. Although I also had issues with |
Yep, Clang seemed way more finicky and strict with how it wants to parse them. I just hope that the lack of some of them doesn't make it stray from the intended behavior '^^
Didn't need to modify that actually, seems like VS includes some "magic" to make it work or something, I suspect the Windows SDK but unsure. |
|
Making the build work would probably be easiest using cmake instead of the VS system. The String Concatenation is correct. The
|
Of course, but I was not knowledgeable enough to port to cmake at the time I worked on this and still have no clue, would be great to get #22 in tandem to this ^^
Nice! Thanks for checking. Noticed that MSVC is stupidly permissive and "magically" fixes so many things that would error under Clang.
Nice ^^, again thanks for checking! |
With the little CMake migration I did we should be able to support this and MSVC. I tried to isolate most of the MSVC pipeline into /Platforms/MSVC.cmake (tho there is some msbuild specific stuff for the patcher as its using .net). |
|
MSVC unions aren't standard. Furthermore, historically, you want to use the same compiler (or at the least, very similar) of the target you're mapping the PE file to. |
Heyhey, as per the comment:
I tried to switch the compiler from MSVC to Clang, which runs fine but could have some issues that I didn't check/ might have missed. I tested it on VS2022 with C++ Clang Tools for Windows, build option was "Release x64".
Currently, the patched GameClientApp complains with ".text decryption failed" but after hitting Enter a few times it seems to run without any more complains that I encountered.
There are some concessions I had to make to the codebase that I wanted to highlight here:
Hope it helps for the journey to the fabled NixOS!