This PR adds a new "Launcher" executable that is needed to start the server with NWNX on Windows. It uses DetourCreateProcessWithDll from the detours package to inject the NWNX_Core library during startup.
There are also a bunch of changes to replace platform-specific library calls with equivalents from the standard library, or into a new interface wrapper for each platform (See NWNXLib/Platform)
Some early observations:
MSVC generates different mangled names for structs and classes. All API headers/the source generator need to be updated to use their actual base game structure types.
MSVC also generates different mangled names for public/protected/private members. This means NWNX plugins that use protected/private members (e.g. AreaPlugin.ExportGit) will require a workaround.
NWNX needs to be linked against a dynamic .lib of the nwserver.exe binary. It can be generated from the exe, but not sure if this should be checked in to the repository.
I had to revert back to the "older" style for function hooking, as MSVC does some funky stuff with member function pointers.
This PR adds a new "Launcher" executable that is needed to start the server with NWNX on Windows. It uses
DetourCreateProcessWithDll
from the detours package to inject theNWNX_Core
library during startup.There are also a bunch of changes to replace platform-specific library calls with equivalents from the standard library, or into a new interface wrapper for each platform (See
NWNXLib/Platform
)Some early observations:
AreaPlugin.ExportGit
) will require a workaround..lib
of thenwserver.exe
binary. It can be generated from the exe, but not sure if this should be checked in to the repository.