Skip to content

Setting up your development environment. Intellij

Ryandw11 edited this page Jul 12, 2021 · 7 revisions

Requirements

  1. Java 11 JDK installed
  2. Intellij

Creating and setting the project.

  1. Create a new project by cloning Kakara.
  2. Wait for Gradle and its dependencies to finish installing.
  3. Add a new remote inside the git setting for the original Kakara project. This will allow you to reset your code easily.

Setting up the Client

  1. Download the klauncher for your Operating System from ci.kingtux.dev.
  2. Take the klanuncher executable and put it in the root directory of the Kakara project. (Do not add it to git.)
  3. Create a build.bat or build.sh file in the root directory of the Kakara project. (Do not add it to git.)
  4. Add the following code to your build.bat or build.sh file:
    1. If on Windows:
    gradlew.bat clean shadowJar --warning-mode all --refresh-dependencies -Pbranch=master && klauncher.exe --working_dir client\test\ --game client\build\libs\client-1.0-SNAPSHOT-all.jar --engine jenkins:master --test_mode
    1. If on Linux:
    ./gradlew clean shadowJar --warning-mode all --refresh-dependencies -Pbranch=master && ./klauncher --working_dir client\test\ --game client\build\libs\client-1.0-SNAPSHOT-all.jar --engine jenkins:master --test_mode
  5. Edit your Run Configuration by going to Run > Edit Configurations...
  6. Click the + button at the top left of the menu and select the Shell Script option.
    1. Name the script something like Run.
    2. Change the Script Path to the location of the build.bat or build.sh file you just created in the root directory of the project. Ex: D:\{other_dirs}\Kakara\build.bat
    3. Change the Working Directory to the root directory of the project. Ex: D:\{other_dirs}\Kakara
    4. Click Apply and Ok.
  7. Now click the green run button. It should compile successfully and start the game.

You have now successfully setup the development environment for the Kakara Client. Any changes made to the code will now be reflected when you build the client.

Setting Up the Server

//TODO Server has not been started yet.