Skip to content

Commit cb8f754

Browse files
committed
Minor documentation improvements
1 parent 1d4937f commit cb8f754

3 files changed

Lines changed: 54 additions & 30 deletions

File tree

CONTRIBUTING.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
### Instructions to build a DLL
2-
1. Check out git to a new folder
3-
2. Open VS2019
1+
## Instructions to build a DLL
2+
3+
1. Check out `git` to a new folder
4+
2. Open Visual Studio 2019
45
3. Choose the "Open a folder" option and choose the git checkout
56
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
7+
5. Add a new "Release|x86" configuration and save the `CMakeSettings.json` file
8+
6. Choose this new "Release|x86" configuration in the configurations dropdown
9+
7. Go to "Build" > "Build All" and wait for the build to complete without errors
10+
8. Find the new DLL in `out\build\x86-Release\SimpleGraphic.dll`
1011

11-
To use this DLL, simply copy it to your Path Of Building install location and restart Path Of Building
12+
To use this DLL, simply copy it to your Path Of Building install location and
13+
restart Path Of Building.

DEPENDENCIES.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
# Dependencies for SimpleGraphics
1+
# Dependencies for SimpleGraphic
22

3-
There are several 3rd party (open source) dependencies for building the SimpleGraphics.dll library used by Path of Building. To build the library yourself, you will need to acquire these libraries.
3+
There are several 3rd-party (open source) dependencies for building the
4+
SimpleGraphic.dll library used by Path of Building.
5+
To build the library yourself, you will need to acquire these libraries.
46

57
## List of Libraries
68

7-
The following 3rd party libraries are required to build SimpleGraphics.dll. Usually, the latest version will work, but the most recent version used by the PathOfBuildingCommunity team are as follows:
9+
The following 3rd-party libraries are required to build SimpleGraphic.dll.
10+
Usually, the latest version will work, but the most recent version used by the
11+
PathOfBuildingCommunity org are as follows:
812
* LuaJIT 2.0.5-3
913
* zlib 1.2.11-6
1014
* libjpeg-turbo 2.0.4
@@ -13,16 +17,21 @@ The following 3rd party libraries are required to build SimpleGraphics.dll. Usua
1317
* tiff 4.0.10-9
1418
* liblzma 5.2.4-5
1519

16-
These libraries are also listed in vcpkg.txt for our GitHub actions build to reference
20+
These libraries are also listed in vcpkg.txt
21+
for our GitHub actions build to reference.
1722

18-
## Using vcpgk to install dependencies on Windows for building with Visual Studio
23+
## Build SimpleGraphic on Windows with Visual Studio and vcpkg
1924

20-
vcpgk is an open-source tool by Microsoft which can easily download and build all of the required dependencies. This is the recommended method for retrieving the dependencies when building for Visual Studio.
21-
vcpkg is included as a submodule of this project, so installing it should be relatively simple
25+
vcpgk is an open-source tool by Microsoft which can easily download and build
26+
all of the required dependencies. This is the recommended method for retrieving
27+
the dependencies when building for Visual Studio.
28+
vcpkg is included as a submodule of this project,
29+
so installing it should be relatively simple.
2230

2331
1) Run 'git submodule update --init'
2432
2) 'cd vcpkg'
2533
3) Type the following commands:
2634
1) `bootstrap-vcpkg.sh` or `bootstrap-vcpkg.bat`
2735
2) `./vcpkg.exe install @../vcpkg.txt` or `vcpkg install @../vcpkg.txt`
28-
4) The SimpleGraphics solution and vcproj are already configured to look in this location for the dependencies, so it should now build as-is.
36+
4) The SimpleGraphic solution and vcproj are already configured to look in this
37+
location for the dependencies, so now it should build as-is.

README.md

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,43 @@
22

33
## Introduction
44

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].
5+
`SimpleGraphic.dll` is the host environment for Lua.
6+
It contains the API used by the application's Lua logic, as well as a 2D OpenGL
7+
renderer, window management, input handling, and a debug console.
8+
It exports one symbol, `RunLuaFileAsWin`, which is passed a
9+
C-style argc/argv argument list, with the script path as `argv[0]`.
610

711
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.
12+
- `win\entry.cpp`: Contains the DLL export
13+
It just creates the system main module, and runs it
14+
- `engine\system\win\sys_main.cpp`: The system main module.
15+
It initialises the application, and contains generic OS interface functions,
16+
such as input and clipboard handling
17+
- `engine\system\win\sys_console.cpp`: Manages the debug console window that
18+
appears during the program's initialisation
19+
- `engine\system\win\sys_video.cpp`: Creates and manages the main program window
20+
- `engine\system\win\sys_opengl.cpp`: Initialises OpenGL
1321

1422
## Building
1523

16-
SimpleGraphic.dll is currently built using Visual Studio 2019.
24+
`SimpleGraphic.dll` is currently built using Visual Studio 2019.
1725

18-
The dll depends on a number of 3rd party libraries. Details and instructions for how to obtain them are in DEPENDENCIES.md.
26+
The DLL depends on a number of 3rd-party libraries. Details and instructions
27+
for how to obtain them are in [DEPENDENCIES.md](DEPENDENCIES.md).
1928

2029
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.
30+
1) Open `SimpleGraphic.sln` in Visual Studio 2019
31+
2) Choose the "Release|x86" configuration
2332
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.
33+
4) The resulting `SimpleGraphic.dll` can be found in the `Release` directory
34+
5) Copy `SimpleGraphic.dll` to the Path of Building install directory,
35+
replacing the existing file.
2636

2737
## Debugging
2838

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.
39+
Since SimpleGraphic.dll is dynamically loaded by `PathOfBuilding.exe`,
40+
to debug it, run `PathOfBuilding.exe` and then attach to that process using the
41+
"Debug" > "Attach to Process..." menu option in Visual Studio.
3042

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.
43+
If debugging of the initialization is desired, then adding a `MessageBox`
44+
or some other pause at the start will give you time to attach and continue.

0 commit comments

Comments
 (0)