Skip to content

Full Workspace Setup

Avalancs edited this page Sep 27, 2019 · 10 revisions

Full Workspace Setup

The Destination Sol engine (and for the time being, module) repository at https://github.com/MovingBlocks/DestinationSol is the heart and central workspace of mostly everything Destination Sol.

To set up the workspace is a fairly easy process:

  • Git clone or download a source zip from GitHub to some location on your computer
    • See GitHub or Google for various Git tutorials. In short you'd clone with git clone https://github.com/MovingBlocks/DestinationSol.git into a local workspace directory
  • Run gradlew once in the root of the chosen directory via command prompt / terminal

Note

In OSX or Linux, the command is ./gradlew instead of gradlew

That's it, really! You should now have a fully-functioning game workspace.

Requirements

Okay, you might want a little more than that. The only mandatory requirement is a Java 8 SDK which you either download from Oracle or get via OpenJDK.

Note

Using OpenJDK has a slightly higher risk for encountering common issues.

Beyond that you might want an IDE and some IDE plugins. Maybe even a tool like YourKit to help profile game performance. But everything else really is optional!

Most our automation and project setup happens through Gradle which the gradlew script downloads a version of if needed. The initial gradlew execution will download all project dependencies (Maven style - downloading half the internet). Just give it a while.

Run game from source

As long as you have the code and Java 8 you can run the game from source simply with gradlew run

Any problem encountered at this point is usually from Java not being configured right, such as having an older version as your default Java.

Note

Ask in the Destination Sol Forum if issues remain, or come join us on #terasology on Freenode IRC. IRC isn't necessarily instant communication and it may take a while to get a reply.

IntelliJ

Running from command line is good and fine and some enjoy simply working in a plain text editor. For those preferring a full integrated development environment (IDE) we recommend IntelliJ

We have a series of customizations that prepare run configurations, Git integration, and so on for the project, specifically for IntelliJ. Eclipse has fewer of these but is still entirely usable, as is NetBeans, but you'll need to figure out some details there yourself.

To prepare project files for IntelliJ simply run gradlew idea which as any gradlew also does the initial dependency fetch so you can go straight from source download to gradlew idea you don't need a separate plain gradlew step.

Open the resulting DestinationSol.ipr as an existing project in IntelliJ

Warning

Do not create a new project or attempt to import the project via Gradle. It is possible to get that working but it may miss customizations and cause confusion.

Warning

After openning DestinationSol.ipr, IntelliJ will show: Unlinked Gradle project? Don't click on Import Gradle project. If you accidentally clicked on it, or otherwise customizations/running the game does not work, you should try closing the project in IntelliJ, running `gradlew cleanIdea idea', and then re-opening the project in.

The opened project should leave you with a series of run configurations to execute the game (and server) in various formats. It'll hook up our license header as a template, configure code analytics, and so on.

Git

Git will be enabled as source control, however going deeper into the details of using Git is outside the scope of this wiki. Please see the excellent resources on GitHub for more like their bootcamp series.

See Also

  • :ref:Contributing <contributing> - understand how to work on the GitHub (fork code repositories on GitHub,interact with several at once, etc).