Add more precise instructions for the handbook (#2359)

* Add more precise instructions for the handbook

* Reformat Building section
This commit is contained in:
Ceris White 2023-09-13 20:02:20 -05:00 committed by GitHub
parent 4f62e484ad
commit 98a83b649e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,25 +46,49 @@ Grasscutter uses Gradle to handle dependencies & building.
**Requirements:** **Requirements:**
- [Java SE Development Kits - 17](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) or higher - [Java Development Kit 17](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) or higher
- [Git](https://git-scm.com/downloads) - [Git](https://git-scm.com/downloads)
- [NodeJS](https://nodejs.org/en/download) (Optional, for building the handbook)
##### Windows ##### Clone
```shell ```shell
git clone --recurse-submodules https://github.com/Grasscutters/Grasscutter.git git clone --recurse-submodules https://github.com/Grasscutters/Grasscutter.git
cd Grasscutter cd Grasscutter
.\gradlew.bat # Setting up environments
.\gradlew jar # Compile
``` ```
##### Linux (GNU) ##### Compile
**Note**: Handbook generation may fail on some systems. To disable the handbook generation, append `-PskipHandbook=1` to the `gradlew jar` command.
Windows:
```shell
.\gradlew.bat # Setting up environments
.\gradlew jar
```
Linux (GNU):
```bash ```bash
git clone --recurse-submodules https://github.com/Grasscutters/Grasscutter.git
cd Grasscutter
chmod +x gradlew chmod +x gradlew
./gradlew jar # Compile ./gradlew jar
```
##### Compiling the Handbook (Manually)
With Gradle:
```shell
./gradlew generateHandbook
```
With NPM:
```shell
cd src/handbook
npm install
npm run build
``` ```
You can find the output jar in the root of the project folder. You can find the output jar in the root of the project folder.