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
- Java 21 (opens in a new tab)
- Download (opens in a new tab) and install (opens in a new tab) Maven (Maven v3.8.8 is required for generating GraalVM metadata for Drifty GUI (opens in a new tab))
- GraalVM 21 (opens in a new tab)
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
directorycd 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 GUI/src/main/resources/META-INF/native-image
directory.
Local Build
Prerequisites
- Java 21 (opens in a new tab)
- Download (opens in a new tab) and install (opens in a new tab) Maven (Maven v3.8.8 is required for building installer or executable binaries for Drifty GUI (opens in a new tab), locally)
- GraalVM 21 (opens in a new tab)
- GCC (opens in a new tab)
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.
Replace gcc
with the path to the GCC compiler if it is not in the system path.
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
Navigate to the project directory
Open the terminal and navigate to the project directory
Build and start the Drifty application in a Docker container
Follow the below instructions to build and start the Drifty application in a Docker container
- 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