Skip to content

Compiling for Linux

Starciad edited this page Dec 23, 2025 · 4 revisions

Introduction

Compiling for Linux is a straightforward process that requires just a few steps. If you have already followed the instructions in Compiling the Game and Development Setup, you are ready to proceed.

Preparation

First, you need to clone the repository locally on your machine. To do this, use the command below:

git clone --recursive--submodules "https://github.com/Starciad/StardustSandbox.git"

The --recursive--submodules flag complements the command, causing submodules to be initialized and updated automatically. This is important for synchronization with project assets located in another repository on GitHub.

If you forgot the flag, don't worry! You can follow the sequence of commands below to do the same thing:

# Step 1: Clone the repository into the current directory.
git clone "https://github.com/Starciad/StardustSandbox.git"

# Step 2: Enter the directory.
cd "StardustSandbox"

# Step 3: Initialize the submodules.
git submodule init

# Step 4: Update the submodules.
git submodule update

After that, the assets will be available locally.

Compiling

After extracting the source code, navigate to the src directory. Locate the solution file you want to use, following the same naming pattern:

SS.{Platform}.sln

Open the terminal for your distribution in the directory and execute the following command to compile the project:

dotnet build "SS.Linux.sln"

To optimize and publish the game, use:

dotnet publish "SS.Linux.sln"

The process will download the necessary libraries and build all project components. This might take a while, so please wait.

If everything completes without errors, the game will be successfully compiled.

Running and Debugging

After compiling the project, the executable file will be available at:

StardustSandbox/src/Game/bin/Debug/{runtime}/StardustSandbox

or

StardustSandbox/src/Game/bin/Release/{runtime}/StardustSandbox

Clone this wiki locally