Skip to content

Commit 544fc93

Browse files
author
LocalIdentity
committed
Merge remote-tracking branch 'ppoelzl/update-docs'
2 parents a960d92 + 2b110f2 commit 544fc93

4 files changed

Lines changed: 262 additions & 31 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 & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,36 @@
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
1115
* libpng 1.6.37-9
1216
* giflib 5.1.4-6
13-
* tiff 4.0.10-9
1417
* liblzma 5.2.4-5
1518

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

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

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
24+
vcpgk is an open-source tool by Microsoft which can easily download and build
25+
all of the required dependencies. This is the recommended method for retrieving
26+
the dependencies when building for Visual Studio.
27+
vcpkg is included as a submodule of this project,
28+
so installing it should be relatively simple.
2229

2330
1) Run 'git submodule update --init'
2431
2) 'cd vcpkg'
2532
3) Type the following commands:
2633
1) `bootstrap-vcpkg.sh` or `bootstrap-vcpkg.bat`
2734
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.
35+
4) The SimpleGraphic solution and vcproj are already configured to look in this
36+
location for the dependencies, so now it should build as-is.

LICENSE

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
SimpleGraphic:
2+
3+
*******************************************************************************
4+
5+
Copyright (c) 2016 David Gowor
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a copy
8+
of this software and associated documentation files (the "Software"), to deal
9+
in the Software without restriction, including without limitation the rights
10+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the Software is
12+
furnished to do so, subject to the following conditions:
13+
14+
The above copyright notice and this permission notice shall be included in all
15+
copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
SOFTWARE.
24+
25+
*******************************************************************************
26+
27+
Khronos Cross-Platform Standards:
28+
29+
*******************************************************************************
30+
31+
Copyright (c) 2008-2018 The Khronos Group Inc.
32+
33+
Permission is hereby granted, free of charge, to any person obtaining a
34+
copy of this software and/or associated documentation files (the
35+
"Materials"), to deal in the Materials without restriction, including
36+
without limitation the rights to use, copy, modify, merge, publish,
37+
distribute, sublicense, and/or sell copies of the Materials, and to
38+
permit persons to whom the Materials are furnished to do so, subject to
39+
the following conditions:
40+
41+
The above copyright notice and this permission notice shall be included
42+
in all copies or substantial portions of the Materials.
43+
44+
THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
45+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
46+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
47+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
48+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
49+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
50+
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
51+
52+
*******************************************************************************
53+
54+
GLEXT:
55+
56+
*******************************************************************************
57+
58+
Copyright (c) 2013-2018 The Khronos Group Inc.
59+
60+
Permission is hereby granted, free of charge, to any person obtaining a
61+
copy of this software and/or associated documentation files (the
62+
"Materials"), to deal in the Materials without restriction, including
63+
without limitation the rights to use, copy, modify, merge, publish,
64+
distribute, sublicense, and/or sell copies of the Materials, and to
65+
permit persons to whom the Materials are furnished to do so, subject to
66+
the following conditions:
67+
68+
The above copyright notice and this permission notice shall be included
69+
in all copies or substantial portions of the Materials.
70+
71+
THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
72+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
73+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
74+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
75+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
76+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
77+
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
78+
79+
*******************************************************************************
80+
81+
LuaJIT:
82+
83+
*******************************************************************************
84+
85+
===============================================================================
86+
LuaJIT -- a Just-In-Time Compiler for Lua. http://luajit.org/
87+
88+
Copyright (C) 2005-2015 Mike Pall. All rights reserved.
89+
90+
Permission is hereby granted, free of charge, to any person obtaining a copy
91+
of this software and associated documentation files (the "Software"), to deal
92+
in the Software without restriction, including without limitation the rights
93+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
94+
copies of the Software, and to permit persons to whom the Software is
95+
furnished to do so, subject to the following conditions:
96+
97+
The above copyright notice and this permission notice shall be included in
98+
all copies or substantial portions of the Software.
99+
100+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
101+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
102+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
103+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
104+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
105+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
106+
THE SOFTWARE.
107+
108+
[ MIT license: http://www.opensource.org/licenses/mit-license.php ]
109+
110+
===============================================================================
111+
[ LuaJIT includes code from Lua 5.1/5.2, which has this license statement: ]
112+
113+
Copyright (C) 1994-2012 Lua.org, PUC-Rio.
114+
115+
Permission is hereby granted, free of charge, to any person obtaining a copy
116+
of this software and associated documentation files (the "Software"), to deal
117+
in the Software without restriction, including without limitation the rights
118+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
119+
copies of the Software, and to permit persons to whom the Software is
120+
furnished to do so, subject to the following conditions:
121+
122+
The above copyright notice and this permission notice shall be included in
123+
all copies or substantial portions of the Software.
124+
125+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
126+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
127+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
128+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
129+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
130+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
131+
THE SOFTWARE.
132+
133+
===============================================================================
134+
[ LuaJIT includes code from dlmalloc, which has this license statement: ]
135+
136+
This is a version (aka dlmalloc) of malloc/free/realloc written by
137+
Doug Lea and released to the public domain, as explained at
138+
http://creativecommons.org/licenses/publicdomain
139+
140+
===============================================================================
141+
142+
*******************************************************************************
143+
144+
libjpeg-turbo:
145+
146+
*******************************************************************************
147+
148+
Copyright (C)2009-2019 D. R. Commander. All Rights Reserved.
149+
Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
150+
151+
Redistribution and use in source and binary forms, with or without
152+
modification, are permitted provided that the following conditions are met:
153+
154+
- Redistributions of source code must retain the above copyright notice,
155+
this list of conditions and the following disclaimer.
156+
- Redistributions in binary form must reproduce the above copyright notice,
157+
this list of conditions and the following disclaimer in the documentation
158+
and/or other materials provided with the distribution.
159+
- Neither the name of the libjpeg-turbo Project nor the names of its
160+
contributors may be used to endorse or promote products derived from this
161+
software without specific prior written permission.
162+
163+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS",
164+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
165+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
166+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
167+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
168+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
169+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
170+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
171+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
172+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
173+
POSSIBILITY OF SUCH DAMAGE.
174+
175+
*******************************************************************************
176+
177+
GIFLIB:
178+
179+
*******************************************************************************
180+
181+
The GIFLIB distribution is Copyright (c) 1997 Eric S. Raymond
182+
183+
Permission is hereby granted, free of charge, to any person obtaining a copy
184+
of this software and associated documentation files (the "Software"), to deal
185+
in the Software without restriction, including without limitation the rights
186+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
187+
copies of the Software, and to permit persons to whom the Software is
188+
furnished to do so, subject to the following conditions:
189+
190+
The above copyright notice and this permission notice shall be included in
191+
all copies or substantial portions of the Software.
192+
193+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
194+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
195+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
196+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
197+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
198+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
199+
THE SOFTWARE.
200+
201+
*******************************************************************************

README.md

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,50 @@
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.
45+
46+
## Licence
47+
48+
[MIT](https://opensource.org/licenses/MIT)
49+
50+
For 3rd-party licences, see [LICENSE](LICENSE).
51+
The licencing information is considered to be part of the documentation.

0 commit comments

Comments
 (0)