Skip to content

Getting Started for Developers

Dan Royer edited this page Mar 2, 2022 · 6 revisions

We really appreciate you taking the time to help make this better, faster, and smoother for everyone. Thank you!
This document is to guide you through the process of setting up the code repository on your local machine and running your first test.
We strongly recommend that you read the CONTRIBUTING tips. too.

There are some “One time actions” to get setup and “Repeating actions” after that to refresh the project and run the very latest edition.

One time actions

You’ll need the JDK, Github Desktop, the project files, and an IDE.

Install JDK

This app requires the Open Java Development Kit . The latest version is the “ready to use” edition.

- Windows instructions untested
- Linux instructions untested
- macOS: Unarchive the OpenJDK tar, and place the resulting folder (i.e. jdk-17.jdk) into your `/Library/Java/JavaVirtualMachines/` folder. If you are using IntelliJ IDE you can skip this step.

Install Github desktop

This step is optional and highly recommended.

Install Makelangelo Software source code.

Install an IDE

An Integrated Developer Environment is the tool for assisted code writing, compiling Java apps, and running tests. Our favorite flavors are IntelliJ and Eclipse.

IntelliJ IDE

  • Download IntelliJ IDE
  • Install and run IntelliJ
  • Select File > Open… and locate the destination folder for Makelangelo Software.
  • Select Maven project
  • Use the Project tab to locate makelangelo-software > src/main/java/com.marginallyclever.makelangelo.
  • Right click on the Makelangelo class and choose Debug Makelangelo.main()
  • wait while IntelliJ builds the workspace

Eclipse IDE

  • Download Eclipse IDE
  • Install and run Eclipse
  • Select File > Import > Maven > Existing Maven Projects > (locate the project folder)
  • Right click on the project name in the Package Explorer and choose Maven > Update Project…
  • Select Makelangelo-software > Debug As > Java Application
  • Select com.marginallyclever.makelangelo.Makelangelo as main class.
  • wait while Eclipse builds the workspace

After IDE install

When launching the application, set the environment variable `DEV` to `true` in order to get the application log on stdout.

At this point you may see an error that the kabeja-0.4 library is missing.
on linux/osx, copy kabeja folder from ./java/local-maven-repo to ~/.m2/repository/org
on windows, copy kabeja*.jar from ./java/local-maven-repo to c:/users/[your name]/.m2/repository/org
Run again.

Building from console with Maven

  • Open a terminal emulator (`cmd` on Windows, `Terminal` on macOS or GNU/Linux) in the extracted folder.
  • Build the application with `mvnw` (the first time, it downloads a lot of files):
  • on macOS or GNU/Linux:
    ./mvnw clean install -DskipTests
  • on Windows:
    mvnw.cmd clean install -DskipTests
  • run
    java -jar target/Makelangelo*-with-dependencies.jar
    to launch the application. Note that it may fail if your computer is headless – if it has no graphics environment to draw the user interface.

Repeating actions

  • To get the latest version of the software, run Github desktop and choose “Pull Origin”.
  • Eclipse will automatically rebuild everything. All you have to do is click Run (the icon looks like a green ladybug)

More

If you have any friction with this process, please visit the marginallyclever.com support forums
or post an issue ticket to this repository.

Thank you to Chris Mills for contributing the original version of these instructions.