SimpleGraphic.dll
is the host environment for Lua.
It contains the API used by the application's Lua logic, as well as a 2D OpenGL
renderer, window management, input handling, and a debug console.
It exports one symbol, RunLuaFileAsWin
, which is passed a
C-style argc/argv argument list, with the script path as argv[0]
.
The Windows-specific code is contained in 5 files:
win\entry.cpp
: Contains the DLL export It just creates the system main module, and runs itengine\system\win\sys_main.cpp
: The system main module. It initialises the application, and contains generic OS interface functions, such as input and clipboard handlingengine\system\win\sys_console.cpp
: Manages the debug console window that appears during the program's initialisationengine\system\win\sys_video.cpp
: Creates and manages the main program windowengine\system\win\sys_opengl.cpp
: Initialises OpenGL
SimpleGraphic.dll
is currently built using Visual Studio 2019.
The DLL depends on a number of 3rd-party libraries. Details and instructions for how to obtain them are in DEPENDENCIES.md.
Once the libraries are obtained, follow these instructions to build the DLL:
- Open
SimpleGraphic.sln
in Visual Studio 2019 - Choose the "Release|x86" configuration
- Build the solution
- The resulting
SimpleGraphic.dll
can be found in theRelease
directory - Copy
SimpleGraphic.dll
to the Path of Building install directory, replacing the existing file.
Since SimpleGraphic.dll is dynamically loaded by PathOfBuilding.exe
,
to debug it, run PathOfBuilding.exe
and then attach to that process using the
"Debug" > "Attach to Process..." menu option in Visual Studio.
If debugging of the initialization is desired, then adding a MessageBox
or some other pause at the start will give you time to attach and continue.
For 3rd-party licences, see LICENSE. The licencing information is considered to be part of the documentation.