Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Building from source

Buj edited this page May 27, 2023 · 1 revision

Rosepad's build system might be quite frustrating to use for newcomers, so please be sure to get used to it before actually beginning to contribute to the project

Setting up

Make sure you have Java Development Kit (Version 8) installed. If you're on Windows, it's preferable to use Git Bash, MSYS2 or Windows Subsystem for Linux. For further it will be assumed that you're using bash shell.

You might also want to install Java Development Kit (Version 17) natively. To make Rosepad use system JDK17, define TOOLKIT_JAVA17 environment variable with the path to JDK17's Java Home.

Due to JDK autodownload bug on Windows, users of that OS have to complete this step anyway

After cloning the repo (git clone https://github.com/RosepadMC/Rosepad.git --recursive --depth 3), make sure you are using Java 8 (check with java -version). If not, set JAVA_HOME environment variable with export JAVA_HOME=/path/to/java_home_8 (this will only set it for your current terminal session). Build Rosepad using ./gradlew prepare pack. Build should take several minutes to complete. Jars are located at loader/build/libs

IDE

todo!();

Modifying code

Rosepad's source code is located at client/src/main/ and server/src/main/. There you can also find orig directory, which is a helper directory used for creating and applying patches. Modifying files in orig may lead to breaking your development environment, in which case you need to delete the repository and re-do the setup process.

To build modified sources, you need to generate new patches with ./gradlew createPatches. Then you can do ./gradlew pack to build the jars.

To start server or client, generate the patches and run ./gradlew runServer or ./gradlew runClient respectively. Both can be running at the same time. Files for server and client are located at run.

Clone this wiki locally