Developing on GNU/Linux
Step 1: Install xmake and Qt 6
On Debian or Debian derivatives:
sudo apt install xmake
sudo apt update
sudo apt install --yes build-essential libfontconfig1-dev qt6-base-dev libqt6svg6-dev qt6-image-formats-plugins libcurl4-openssl-dev libfreetype-dev libgit2-dev zlib1g-dev libssl-dev libjpeg-turbo8-dev cmakeSometimes, we need the latest xrepo:
xrepo update-repoStep 2: Build
xmake config --yes
xmake build stemIf Qt SDK is not found, we can config it manually:
xmake config --qt=/usr/lib/`arch`-linux-gnu/qt6/To switch to Qt 5, just:
xmake config --qt=/usr/lib/`arch`-linux-gnu/qt5/Step 3: Run tests
See How to test.
Step 4: Launch Mogan STEM
bash
xmake run stemUse VSCode to help code completion
Install VSCode, Clangd and the Clangd plugin for VSCode. Then execute in the mogan folder
xmake project -k compile_commandsThis will generate a compile_commands.json file under the mogan folder, and Clangd will read it to understand the organizational structure of the project, so as to avoid the error that the header file cannot be found.
