Building StarMade from source

This page is intended for developers who have access to the StarMade source repository. If you are looking for general instructions on how to mod StarMade, see the modding basics page.

Most players don’t have access to the upstream StarMade source repository, so these instructions are only useful for internal development and contributors.

Prerequisites

Building the release branch

  1. Clone the repository and check out the release branch:

    # example (Windows PowerShell)
    git clone <repo-url>
    cd <repo-name>
    git checkout release
    
  2. Copy the example environment file and populate required values (if present):

    Copy-Item -Path scripts\.env_example -Destination .env
    # then edit .env to set required variables
    
  3. Run the platform-specific build script from the scripts folder.

    • Windows (PowerShell):

      scripts\build_windows.ps1
      
    • Linux (bash):

      scripts/build_linux.sh
      
    • macOS (bash):

      scripts/build_macos.sh
      

Building the Universe Update branch

  1. Clone the repository and check out the master branch (or the branch used for the Universe Update):

    git clone <repo-url>
    cd <repo-name>
    git checkout master
    
  2. Build using Gradle from the repository root:

    gradle build