Skip to content

JetBrains Project Setup Manual (for JetBrains organisation to Test)

Intro

The project can only be build from Linux and Windows.
Windows only using the Cygwin install like here.
The project only configures (CMake) when all dependencies are met.

Clone Shallow

Clone including the required submodules (only 1).

git clone --recurse-submodules --branch jetbrains-test https://git.scanframe.com/shared/qt-concepts.git

How to Build

Build with Docker

The container image used with all dependencies for Qt v6.7.2 is nexus.scanframe.com/amd64/gnu-cpp:24.04-6.8.1 and build from using this repository and with script cpp-builder.sh

Docker from CLI

Docker is the easiest since the image contains all the needed dependencies already.
The command ./docker-build.sh executes ./build.sh from within the container forwarding X11 when present.
So from here follow the direction from building

CLion Toolchain

The Docker toolchain needs some special setup (root user) since I change the uid of the user in the container so it matches the calling user or the user of the project files. Also the container mounts the Qt libraries located in zip-files.

Debugging from here has not been possible yet.
Only setting up gdbserver is a solution for debugging.

The following Docker settings are required to be able to run it from CLion.

-u 0:0 
-e DISPLAY 
-v /home/arjan/.Xauthority:/home/user/.Xauthority:ro 
--privileged 
--network host

The CMake options are: -G Ninja --preset "gnu-debug"

Build on Linux (native)

The repository is only tested on Ubuntu 24.04 LTS and Windows 11 in combination Cygwin.

No MacOS, since there is no Docker image for it :|
The Windows target can be build in Linux (MinGW preset gw-debug) and tested using Wine.

To build preset gnu-debug (Linux using GNU compiler only) required packages need to be installed uusing the following command.

./build.sh --required lnx

Without the required packages the build.sh script cannot run!

Common

All ./build.sh <args> script commands can be executed in the Docker container using the script ./docker-build.sh -- <args>.

Individual steps are:

# Configure the make file(s).
./build.sh -m gnu-debug
# Build the targets.
./build.sh -b gnu-debug
# Run the configured tests.
./build.sh -t gnu-debug
# Package the application.
./build.sh -p gnu-debug
# All commands above sequentially also called from pipelines.
./build.sh -w gnu-debug

To get help for running the script ./build.sh --help and for information
on the configured presets (file CMakePresets.json) run ./build.sh --info.

JetBrains Gateway

A really simple solution is to start the IDE with 'JetBrains - Gateway' in the Docker container using ssh.
For this the command ./docker-build.sh sshd can be used which starts a ssh server on port 3022.
The command ./docker-build.sh stop stops the container and ./docker-build.sh attach opens a terminal to the running container. The user in the docker container is named user and the password is also user.