docs: update contributing

This commit is contained in:
ppoelzl
2021-03-09 07:12:07 +01:00
committed by Trevor Lund
parent d90d2b16d7
commit f25ec632cb

View File

@@ -32,19 +32,18 @@ Feature requests are always welcome. Note that not all requests will receive an
#### When submitting a pull request:
* **Pull requests must be made against the 'dev' branch**, as all changes to the code are staged there before merging to 'master'.
* Make sure that the changes have been thoroughly tested!
* Make sure not to commit `./Data/ModCache.lua`. This is a very large, automatically generated file that is updated in the repository for releases only.
* There are many more files in the `./Data` directory that are automatically generated. To change these, instead change the scripts in the `./Export` directory.
* Make sure not to commit `./src/Data/ModCache.lua`. This is a very large, automatically generated file that is updated in the repository for releases only.
* There are many more files in the `./src/Data` directory that are automatically generated. To change these, instead change the scripts in the `./src/Export` directory.
#### Setting up a development install
Note: This tutorial assumes that you are already familiar with Git and basic command line tools.
#### Setting up a development installation
Note: This tutorial assumes that you are already familiar with Git.
The easiest way to make and test changes is by setting up a development install, in which the program runs directly from a local copy of the repository:
The easiest way to make and test changes is by setting up a development installation, in which the program runs directly from a local copy of the repository:
1. Clone the repository using this command:
git clone -b dev https://github.com/PathOfBuildingCommunity/PathOfBuilding.git
2. Create a shortcut to the 'Path of Building.exe' in your main installation of the program.
3. Add the path to `./Launch.lua` as an argument to the shortcut. You should end up with something like: `"C:\%APPDATA%\Path of Building Community\Path of Building.exe" "C:\PathOfBuilding\Launch.lua"`.
2. Start Path of Building from the repository by running `./runtime/Path of Building.exe`.
You can now use the shortcut to run the program from the repository. Running the program in this manner automatically enables 'Dev Mode', which has some handy debugging feature:
* `F5` restarts the program in-place (this is what usually happens when an update is applied).
@@ -98,7 +97,7 @@ They are all free and open source and support [EmmyLua](https://github.com/EmmyL
1. Create a new 'Debug Configuration' of type 'EmmyLua New Debug'
2. Open the Visual Studio Code extensions folder. On Windows, this defaults to `%USERPROFILE%/.vscode/extensions`.
3. Find the sub-folder that contains `emmy_core.dll`. You should find both x86 and x64; pick x86. For example, `C:/Users/someuser/.vscode/extensions/tangzx.emmylua-0.3.28/debugger/emmy/windows/x86`.
4. Paste the following code snippet directly below `function launch:OnInit()` in `./Launch.lua`:
4. Paste the following code snippet directly below `function launch:OnInit()` in `./src/Launch.lua`:
```lua
-- This is the path to emmy_core.dll. The ?.dll at the end is intentional.
package.cpath = package.cpath .. ';C:/Users/someuser/.vscode/extensions/tangzx.emmylua-0.3.28/debugger/emmy/windows/x86/?.dll'
@@ -116,7 +115,7 @@ dbg.tcpListen('localhost', 9966)
1. Create a new 'Debug Configuration' of type 'Emmy Debugger(NEW)'.
2. Select 'x86' version.
3. Select if you want the program to block (checkbox) until you attached the debugger (useful if you have to debug the startup process).
4. Copy the generated code snippet directly below `function launch:OnInit()` in `./Launch.lua`.
4. Copy the generated code snippet directly below `function launch:OnInit()` in `./src/Launch.lua`.
5. Start Path of Building Community
6. Attach the debugger
@@ -125,12 +124,12 @@ dbg.tcpListen('localhost', 9966)
Note: This tutorial assumes that you are already familiar with the GGPK and its structure. [poe-tool-dev/ggpk.discussion](https://github.com/poe-tool-dev/ggpk.discussion/wiki)
is a good starting point.
The `./Data` folder contains generated files which are created using the scripts in the `./Export/Scripts` folder based on Path of Exile game data.
If you change any logic/configuration in `./Export`, you will need to regenerate the appropriate `./Data` files. You can do so by running the `./Export` scripts using the `.dat` viewer at `./Export/Launch.lua`:
The `./src/Data` folder contains generated files which are created using the scripts in the `./src/Export/Scripts` folder based on Path of Exile game data.
If you change any logic/configuration in `./src/Export`, you will need to regenerate the appropriate `./src/Data` files. You can do so by running the `./src/Export` scripts using the `.dat` viewer at `./src/Export/Launch.lua`:
1. Obtain a copy of an OOZ extractor and copy it into `./Export/ggpk/`.
2. Create a shortcut to `Path of Building.exe` with the path to `./Export/Launch.lua` as first argument. You should end up with something like: `"C:\%APPDATA%\Path of Building Community\Path of Building.exe" "C:\PathOfBuilding\Export\Launch.lua"`.
1. Obtain a copy of an OOZ extractor and copy it into `./src/Export/ggpk/`.
2. Create a shortcut to `./runtime/Path of Building.exe` with the path to `./src/Export/Launch.lua` as first argument. You should end up with something like: `"<path to repo>\runtime\Path of Building.exe" "<path to repo>\src\Export\Launch.lua"`.
3. Run the shortcut, and the GGPK data viewer UI will appear. If you get an error, be sure you're using the latest release of Path of Building Community.
4. Paste the path to `Content.ggpk` (or, for Steam users, `C:\Program Files (x86)\Steam\steamapps\common\Path of Exile`) into the text box in the top left, and hit `Enter` to read the GGPK. If successful, you will see a list of the data tables in the GGPK file. Note: This will not work on the GGPK from the torrent file released before league launches, as it contains no `./Data` section.
4. Paste the path to `Content.ggpk` (or, for Steam users, `C:\Program Files (x86)\Steam\steamapps\common\Path of Exile`) into the text box in the top left, and hit `Enter` to read the GGPK. If successful, you will see a list of the data tables in the GGPK file. Note: This will not work on the GGPK from the torrent file released before league launches, as it contains no `Data` section.
5. Click `Scripts >>` to show the list of available export scripts. Double-clicking a script will run it, and the box to the right will show any output from the script.
6. If you run into any errors, update the code in `./Export` as necessary and try again.
6. If you run into any errors, update the code in `./src/Export` as necessary and try again.