Welcome to Drifty Docs!
Drifty
Development
Building Executables

Building Installer or Executable Binaries for Drifty

Generating GraalVM Metadata

This step is required only if you want to see your code changes reflected in Drifty CLI or GUI executables. If you are only interested to know the process of building the installer or executable binaries, you can skip this step.

Prerequisites

Steps

Navigate to the project directory

Open the terminal and navigate to the project directory

Generate GraalVM metadata

Follow the below instructions to generate GraalVM metadata for Drifty CLI or GUI

  • Navigate to the GUI directory
    cd GUI
  • Run the below command to generate GraalVM metadata for Drifty GUI
    mvn gluonfx:runagent

Upon completion of the command, the GraalVM metadata will be generated in src/main/resources/META-INF/native-image directory of the respective project (GUI or CLI) directory.

Local Build

Prerequisites

Steps

Check if GraalVM is added to the system path by running native-image --version in the terminal. If the command is not recognized, add the GraalVM bin directory to the system path.

PATH=$GRAALVM_HOME/bin

Set the following environment variable to point to your GraalVM installation directory.

GRAALVM_HOME=<path-to-graalvm>

Replace <path-to-graalvm> with the actual path to the GraalVM installation directory.

Navigate to the project directory

Open the terminal and navigate to the project directory

Build executable binaries

Assuming you have installed the necessary project dependencies, run the below command to generate the C object file required only for building executable binaries for Drifty GUI

gcc -c config/missing_symbols.c -o config/missing_symbols-ubuntu-latest.o

Build the installer or executable binaries

Run the below command to build the installer or executable binaries

mvn -P build-drifty-gui-for-ubuntu-latest gluonfx:build gluonfx:package -rf :GUI -U

Build Complete

Upon completion of the build, the installer or executable binaries will be neatly organized in the directories listed below.

⚠️

The placeholder {arch} should be replaced with either x86_64 or aarch64, depending on your system's architecture.

GUI/target/gluonfx/{arch}-linux

Run the Installer or Binaries

You can now run the installer or executable binaries to use the application.

Remove generated files

To remove the generated files, run the below command

mvn clean

Docker Build

Prerequisites

Steps

  1. Open the terminal and navigate to the project directory
  2. Follow the below instructions to build and start the Drifty application in a Docker container
  • For Linux and Windows users,
    • Run the below command to add access to the X server (required for GUI applications running in Docker)
      xhost +local:docker
    • Run the below command to build and start the Drifty GUI native executable in a Docker container
      docker compose run gui
  • For macOS users, please follow these instructions