omicronrex / gms_scheduler_fix

Also known as DBGHELP.DLL; Scheduler resolution fix for GM:Studio and GM8.1 (not to be confused with Debugger Helper)
29 stars 2 forks source link

Replace the Dev-C++ project, reduce the size of the DLLs, and cleanup dllmain.cpp #3

Closed Lovey847 closed 2 years ago

Lovey847 commented 2 years ago

This pull request removes the Dev-C++ project in favor of a well documented build.bat, makes dbghelp.dll and winspool.drv export their respective symbols (as opposed to both containing the same export table), shrinks both dbghelp.dll and winspool.drv to 2.5kb, and cleans up dllmain.cpp.

I did this because the Dev-C++ project was not only hard to build, but also generated needlessly large DLLs. I've gotten my build.bat down to pretty much the minimum size for both dlls, 2.5kb.

I also wanted to do this because dllmain.cpp was messy, now it's cleaner (sill messy since I do some preprocessor magic, but not as bad as before).

I tested dbghelp.dll with I Wanna Rid The Black Mist, and winspool.drv with i wanna go through the magic forest

The build script might not work with older versions of CL, my version is 19.29.30143


C:\>cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30143 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ]