You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Documentation - Add more tips to CONTRIBUTING.md (#4611)
* DOCS: Mention forcing dev mode off in CONTRIBUTING.md and building emmylua from source
* DOCS: Add more tips
* FIX: Spelling and typos. Mention adding java path in settings.json
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+74-27Lines changed: 74 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,49 @@ You can now use the shortcut to run the program from the repository. Running the
74
74
* While in the Tree tab, holding `Alt` also highlights nodes that have unrecognised modifiers.
75
75
* Holding `Ctrl` while launching the program will rebuild the mod cache.
76
76
77
-
Note that automatic updates are disabled in Dev Mode, so you must update manually.
77
+
Note that automatic updates are disabled in Dev Mode.
78
+
79
+
### Forcing Dev Mode OFF when using dev branch
80
+
81
+
Sometimes you may need to force Dev mode OFF when running from the dev branch to debug a specific part of Path of Building (e.g. the update system).
82
+
83
+
To do so [comment out Line 54 to line 58](./src/Launch.lua#L54-L58) of the [Launch.lua](./src/Launch.lua) file:
84
+
```
85
+
--if localManXML and not self.versionBranch and not self.versionPlatform then
86
+
-- -- Looks like a remote manifest, so we're probably running from a repository
87
+
-- -- Enable dev mode to disable updates and set user path to be the script path
88
+
-- self.devMode = true
89
+
--end
90
+
```
91
+
92
+
and create a valid mainfest.xml file in the ./src directory. Then run the `./runtime/Path{space}of{space}Building.exe` as usual. You should get the typical update popup in the bottom left corner.
93
+
94
+
The manifest.xml file deserves its own in depth document, but usually copying from release and editing accordingly works well enough.
95
+
96
+
## Keeping your fork up to date
97
+
98
+
Note: This tutorial assumes that you are already familiar with Git and basic command line tools.
99
+
100
+
Note: If you've configured a remote already, you can skip ahead to step 3.
101
+
102
+
1. Add a new remote repository and name it `upstream`.
3. Fetch all branches and their commits from upstream.
109
+
110
+
git fetch upstream
111
+
4. Check out your local `dev` branch if you haven't already.
112
+
113
+
git checkout dev
114
+
5. Merge all changes from `upstream/dev` into your local `dev` branch.
115
+
116
+
git rebase upstream/dev
117
+
6. Push your updated branch to GitHub.
118
+
119
+
git push -f origin dev
78
120
79
121
## Setting up a development environment
80
122
@@ -86,7 +128,11 @@ They are all free and support [EmmyLua](https://github.com/EmmyLua), a Lua plugi
86
128
It is recommended to use it over the built-in Lua plugins.
87
129
88
130
Please note that EmmyLua is not available for other editors based on Visual Studio Code,
89
-
such as [VSCodium](https://vscodium.com) or [Eclipse Theia](https://theia-ide.org).
131
+
such as [VSCodium](https://vscodium.com) or [Eclipse Theia](https://theia-ide.org) but can be built from source if needed.
132
+
133
+
Note that you will need to have java installed to use emmyLua, and have either the JAVA_HOME environment variable correctly setup or have the path to java added to the `settings.json` file. Example:
Depending on the amount of system ram you have available and the amount that gets assigned to the jvm running the emmylua language server you might run into issues when trying to debug Path of building.
158
+
Files in /Data /Export and /TreeData can be massive and cause the emmyLua language server to use a significant amount of memory. Sometimes causing the language server to crash. To avoid this and speed up initialization consider adding an `emmy.config.json` file to the .vscode folder in the root of the Path of building repository with the following content:
159
+
160
+
```
161
+
{
162
+
"source": [
163
+
{
164
+
"dir": "../",
165
+
"exclude": [
166
+
"src/Export/**.lua",
167
+
"src/Data/**.lua",
168
+
"src/TreeData/**.lua"
169
+
]
170
+
}
171
+
]
172
+
}
173
+
```
174
+
109
175
### PyCharm Community / IntelliJ Idea Community
110
176
111
177
1. Create a new "Debug Configuration" of type "Emmy Debugger(NEW)".
If you're on windows, consider downloading [git for windows](https://git-scm.com/downloads) and installing git bash. Git bash comes with a variety of typical linux tools such as grep that can make navigating the code base much easier.
186
+
187
+
If you're using linux you can run the ./runtime/Path{space}of{space}Building.exe executable with wine. You will need to provide a valid wine path to the emmy lua debugger directory.
188
+
189
+
118
190
## Testing
119
191
120
192
PoB uses the [Busted](https://olivinelabs.com/busted/) framework to run its tests. Tests are stored under `spec/System` and run automatically when a PR is modified.
@@ -143,31 +215,6 @@ Docker alternative:
143
215
1. Add the new build XML (if applicable) to the `TestBuilds` folder
144
216
2. Run `docker-compose up -d` to generate a LUA file that contains the current stats of that build and run the tests
145
217
146
-
## Keeping your fork up to date
147
-
148
-
Note: This tutorial assumes that you are already familiar with Git and basic command line tools.
149
-
150
-
Note: If you've configured a remote already, you can skip ahead to step 3.
151
-
152
-
1. Add a new remote repository and name it `upstream`.
0 commit comments