Skip to content

Commit bb35b78

Browse files
author
LocalIdentity
committed
Merge remote-tracking branch 'dclamage/documentation'
2 parents 1a722fa + c7207dc commit bb35b78

2 files changed

Lines changed: 42 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Instructions to build a DLL
2+
1. Check out git to a new folder
3+
2. Open VS2019
4+
3. Choose the "Open a folder" option and choose the git checkout
5+
4. In the configurations dropdown, choose "Manage configurations..."
6+
5. Add a new x86-Release configuration and save the CMakeSettings.json file
7+
6. Choose this new x86-Release configuration in the configurations dropdown
8+
7. Go to Build->Build All and wait for the build to complete with no errors
9+
8. Find the new dll in out\build\x86-Release\SimpleGraphic.dll
10+
11+
To use this DLL, simply copy it to your Path Of Building install location and restart Path Of Building

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Path of Building Community SimpleGraphic.dll
2+
3+
## Introduction
4+
5+
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].
6+
7+
The Windows-specific code is contained in 5 files:
8+
- win\entry.cpp: Contains the DLL export. It just creates the system main module, and runs it.
9+
- engine\system\win\sys_main.cpp: The system main module; it initialises the application, and contains generic OS interface functions, such as input and clipboard handling.
10+
- engine\system\win\sys_console.cpp: Manages the debug console window that appears during the program's initialisation.
11+
- engine\system\win\sys_video.cpp: Creates and manages the main program window.
12+
- engine\system\win\sys_opengl.cpp: Initialises OpenGL.
13+
14+
## Building
15+
16+
SimpleGraphic.dll is currently built using Visual Studio 2019.
17+
18+
The dll depends on a number of 3rd party libraries. Details and instructions for how to obtain them are in DEPENDENCIES.md.
19+
20+
Once the libraries are obtained, follow these instructions to build the DLL:
21+
1) Open SimpleGraphic.sln in Visual Studio 2019
22+
2) Choose the `Release|x86` configuration.
23+
3) Build the solution
24+
4) The resulting `SimpleGraphic.dll` can be found in the `Release` directory.
25+
5) Copy `SimpleGraphic.dll` to the Path of Building install directory, replacing the existing file.
26+
27+
## Debugging
28+
29+
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.
30+
31+
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.

0 commit comments

Comments
 (0)