From d3bca2d140eb6c75dfecfe08def20a49a5b3920a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Thu, 25 Jun 2026 19:25:48 +0200 Subject: [PATCH 01/29] Add RSA as submodule --- .gitmodules | 3 +++ lib/RSA | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 lib/RSA diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..b32830f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "lib/RSA"] + path = lib/RSA + url = https://github.com/ParallelEngineering/RSA.git diff --git a/lib/RSA b/lib/RSA new file mode 160000 index 0000000..480dfb0 --- /dev/null +++ b/lib/RSA @@ -0,0 +1 @@ +Subproject commit 480dfb017249f79769978e23fe9bd5167e5a6b4d From e5b909573cc72c0a1bfd6757a4c917df43985dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Thu, 25 Jun 2026 20:29:03 +0200 Subject: [PATCH 02/29] Setup cmake with two executables --- CMakeLists.txt | 12 ++++++++++++ lib/CMakeLists.txt | 4 ++++ src/CMakeLists.txt | 3 +++ src/client/CMakeLists.txt | 1 + src/server/CMakeLists.txt | 1 + 5 files changed, 21 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e69de29..42f67cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -0,0 +1,12 @@ +cmake_minimum_required(VERSION 3.28.3) +project(Messenger) + +# Enforce C++20 and disable compiler-specific extensions +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + +add_subdirectory(lib) +add_subdirectory(src) + +#target_link_libraries(Messenger PRIVATE RSA) \ No newline at end of file diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index e69de29..23c1a9b 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -0,0 +1,4 @@ +if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/RSA/CMakeLists.txt") + message(FATAL_ERROR "RSA submodule not initialized. Run: git submodule update --init --recursive") +endif() +add_subdirectory(RSA) \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e69de29..38199f7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -0,0 +1,3 @@ +add_subdirectory(shared) +add_subdirectory(client) +add_subdirectory(server) diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt index e69de29..52ed5a9 100644 --- a/src/client/CMakeLists.txt +++ b/src/client/CMakeLists.txt @@ -0,0 +1 @@ +add_executable(messenger_client client.cpp) \ No newline at end of file diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt index e69de29..542603d 100644 --- a/src/server/CMakeLists.txt +++ b/src/server/CMakeLists.txt @@ -0,0 +1 @@ +add_executable(messenger_server server.cpp) \ No newline at end of file From f9941775b6011620198a21e2041db4e09ef33e04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Thu, 25 Jun 2026 20:33:12 +0200 Subject: [PATCH 03/29] Create singleton in client and server --- src/client/client.cpp | 15 +++++++++++++++ src/client/client.h | 21 +++++++++++++++++++++ src/server/server.cpp | 19 +++++++++++++++++++ src/server/server.h | 21 +++++++++++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 src/client/client.cpp create mode 100644 src/client/client.h create mode 100644 src/server/server.cpp create mode 100644 src/server/server.h diff --git a/src/client/client.cpp b/src/client/client.cpp new file mode 100644 index 0000000..82cf9d0 --- /dev/null +++ b/src/client/client.cpp @@ -0,0 +1,15 @@ +#include "client.h" + +client& client::getInstance() { + static client instance; + return instance; +} + +client::client() = default; + +int main() { + auto& clientInstance = client::getInstance(); + (void)clientInstance; + + return 0; +} diff --git a/src/client/client.h b/src/client/client.h new file mode 100644 index 0000000..36f38d2 --- /dev/null +++ b/src/client/client.h @@ -0,0 +1,21 @@ +#ifndef MESSENGER_CLIENT_H +#define MESSENGER_CLIENT_H + + + +class client { +public: + static client& getInstance(); + + client(const client&) = delete; + client& operator=(const client&) = delete; + client(client&&) = delete; + client& operator=(client&&) = delete; + +private: + client(); +}; + + + +#endif //MESSENGER_CLIENT_H diff --git a/src/server/server.cpp b/src/server/server.cpp new file mode 100644 index 0000000..0f0f0d4 --- /dev/null +++ b/src/server/server.cpp @@ -0,0 +1,19 @@ +#include "server.h" + +#include + +server& server::getInstance() { + static server instance; + return instance; +} + +server::server() { + std::printf("Starting Messenger Server"); +} + +int main() { + auto& serverInstance = server::getInstance(); + (void)serverInstance; + + return 0; +} diff --git a/src/server/server.h b/src/server/server.h new file mode 100644 index 0000000..8ee4451 --- /dev/null +++ b/src/server/server.h @@ -0,0 +1,21 @@ +#ifndef MESSENGER_SERVER_H +#define MESSENGER_SERVER_H + + + +class server { +public: + static server& getInstance(); + + server(const server&) = delete; + server& operator=(const server&) = delete; + server(server&&) = delete; + server& operator=(server&&) = delete; + +private: + server(); +}; + + + +#endif //MESSENGER_SERVER_H From 073b049627c7dc5872020ae7ff17a3c0a80bb2ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Thu, 25 Jun 2026 20:40:59 +0200 Subject: [PATCH 04/29] Add destructor to client and server --- src/client/client.cpp | 2 ++ src/client/client.h | 1 + src/server/server.cpp | 8 ++++++-- src/server/server.h | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/client/client.cpp b/src/client/client.cpp index 82cf9d0..12a6dd2 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -7,6 +7,8 @@ client& client::getInstance() { client::client() = default; +client::~client() = default; + int main() { auto& clientInstance = client::getInstance(); (void)clientInstance; diff --git a/src/client/client.h b/src/client/client.h index 36f38d2..71b7073 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -6,6 +6,7 @@ class client { public: static client& getInstance(); + ~client(); client(const client&) = delete; client& operator=(const client&) = delete; diff --git a/src/server/server.cpp b/src/server/server.cpp index 0f0f0d4..3b21baf 100644 --- a/src/server/server.cpp +++ b/src/server/server.cpp @@ -1,6 +1,6 @@ #include "server.h" -#include +#include server& server::getInstance() { static server instance; @@ -8,7 +8,11 @@ server& server::getInstance() { } server::server() { - std::printf("Starting Messenger Server"); + std::cout << "Starting Messenger Server ...\n"; +} + +server::~server() { + std::cout << "Stopping Messenger Server ...\n"; } int main() { diff --git a/src/server/server.h b/src/server/server.h index 8ee4451..d6bb782 100644 --- a/src/server/server.h +++ b/src/server/server.h @@ -6,6 +6,7 @@ class server { public: static server& getInstance(); + ~server(); server(const server&) = delete; server& operator=(const server&) = delete; From 7a439ce52b629a542acec53f4a8802686d7b561e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Thu, 25 Jun 2026 20:43:14 +0200 Subject: [PATCH 05/29] Rename executable --- src/client/CMakeLists.txt | 2 +- src/server/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt index 52ed5a9..5e94053 100644 --- a/src/client/CMakeLists.txt +++ b/src/client/CMakeLists.txt @@ -1 +1 @@ -add_executable(messenger_client client.cpp) \ No newline at end of file +add_executable(Messenger-Client client.cpp) \ No newline at end of file diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt index 542603d..aada557 100644 --- a/src/server/CMakeLists.txt +++ b/src/server/CMakeLists.txt @@ -1 +1 @@ -add_executable(messenger_server server.cpp) \ No newline at end of file +add_executable(Messenger-Server server.cpp) \ No newline at end of file From 28b83f8509341569061dbaf9a51cf07b31bf0eba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Fri, 26 Jun 2026 07:07:27 +0200 Subject: [PATCH 06/29] Add QT QML to project --- src/client/CMakeLists.txt | 21 ++++++++++++++++++++- src/client/client.cpp | 16 ++++++++++++++-- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt index 5e94053..8c3985f 100644 --- a/src/client/CMakeLists.txt +++ b/src/client/CMakeLists.txt @@ -1 +1,20 @@ -add_executable(Messenger-Client client.cpp) \ No newline at end of file +find_package(Qt6 COMPONENTS Quick Qml REQUIRED) + +qt_standard_project_setup(REQUIRES 6.5) + +qt_add_executable(Messenger-Client + client.cpp +) + +qt_add_qml_module(Messenger-Client + URI Messenger.Client + VERSION 1.0 + QML_FILES + Main.qml +) + +target_link_libraries(Messenger-Client + PRIVATE + Qt6::Quick + Qt6::Qml +) diff --git a/src/client/client.cpp b/src/client/client.cpp index 12a6dd2..a329b5f 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -1,5 +1,8 @@ #include "client.h" +#include +#include + client& client::getInstance() { static client instance; return instance; @@ -9,9 +12,18 @@ client::client() = default; client::~client() = default; -int main() { +int main(int argc, char* argv[]) { + QGuiApplication app(argc, argv); + auto& clientInstance = client::getInstance(); (void)clientInstance; - return 0; + QQmlApplicationEngine engine; + engine.loadFromModule("Messenger.Client", "Main"); + + if (engine.rootObjects().isEmpty()) { + return -1; + } + + return app.exec(); } From e1c821a980992c6bbcab2eee13ddfdefc0acb337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Fri, 26 Jun 2026 15:16:20 +0200 Subject: [PATCH 07/29] Remove terminal window on client start --- src/client/CMakeLists.txt | 7 +++++++ src/client/client.cpp | 25 ++++++++++++++++--------- src/client/client.h | 7 +++++++ 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt index 8c3985f..6574985 100644 --- a/src/client/CMakeLists.txt +++ b/src/client/CMakeLists.txt @@ -3,9 +3,16 @@ find_package(Qt6 COMPONENTS Quick Qml REQUIRED) qt_standard_project_setup(REQUIRES 6.5) qt_add_executable(Messenger-Client + WIN32 + MACOSX_BUNDLE client.cpp ) +set_target_properties(Messenger-Client PROPERTIES + MACOSX_BUNDLE_BUNDLE_NAME Messenger + MACOSX_BUNDLE_GUI_IDENTIFIER de.ParallelEngineering.Messenger +) + qt_add_qml_module(Messenger-Client URI Messenger.Client VERSION 1.0 diff --git a/src/client/client.cpp b/src/client/client.cpp index a329b5f..c9ff8d3 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -12,18 +12,25 @@ client::client() = default; client::~client() = default; +int client::run(QGuiApplication& app) { + engine_ = std::make_unique(); + engine_->loadFromModule("Messenger.Client", "Main"); + + if (engine_->rootObjects().isEmpty()) { + engine_.reset(); + return -1; + } + + const auto exitCode = app.exec(); + engine_.reset(); + + return exitCode; +} + int main(int argc, char* argv[]) { QGuiApplication app(argc, argv); auto& clientInstance = client::getInstance(); - (void)clientInstance; - - QQmlApplicationEngine engine; - engine.loadFromModule("Messenger.Client", "Main"); - - if (engine.rootObjects().isEmpty()) { - return -1; - } - return app.exec(); + return clientInstance.run(app); } diff --git a/src/client/client.h b/src/client/client.h index 71b7073..b582313 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -1,13 +1,18 @@ #ifndef MESSENGER_CLIENT_H #define MESSENGER_CLIENT_H +#include +class QGuiApplication; +class QQmlApplicationEngine; class client { public: static client& getInstance(); ~client(); + int run(QGuiApplication& app); + client(const client&) = delete; client& operator=(const client&) = delete; client(client&&) = delete; @@ -15,6 +20,8 @@ class client { private: client(); + + std::unique_ptr engine_; }; From 6173230dcf054d6da63a30f816ce32dbfc5972fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Fri, 26 Jun 2026 15:16:36 +0200 Subject: [PATCH 08/29] Add qml file --- src/client/Main.qml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/client/Main.qml diff --git a/src/client/Main.qml b/src/client/Main.qml new file mode 100644 index 0000000..f71ebff --- /dev/null +++ b/src/client/Main.qml @@ -0,0 +1,10 @@ +import QtQuick + +Window { + width: 960 + height: 640 + visible: true + title: qsTr("Messenger Client") + + color: "#f7f8fa" +} From 8ff9564eb09e3ca3c6515dfd3f1b9f7f180f891f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Fri, 26 Jun 2026 15:30:24 +0200 Subject: [PATCH 09/29] Update README --- README.md | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9e07021..5eddce7 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,37 @@ # Messenger -A client to server chat system based on RSA + +Messenger is a cross-platform client-server messenger application based on the RSA algorithm. The project is still in an early stage and currently provides the foundation for the client and server. + +## Architecture + +The repository contains two applications: `Messenger-Client` and `Messenger-Server`. The client is built with Qt/QML; the server is a terminal program. + +Both applications use a singleton through `getInstance()`. The project is built with CMake and C++20, with the RSA library included as a submodule. + +## Setup + +> [!NOTE] +> Qt must be installed locally for the client so CMake can resolve `find_package(Qt6 COMPONENTS Quick Qml REQUIRED)`. The official installation guide is available in the [Qt documentation](https://doc.qt.io/qt-6/get-and-install-qt.html). + +Clone the repository including its submodules: + +```bash +git clone --recurse-submodules https://github.com/ParallelEngineering/Messenger.git +``` + +If the repository has already been cloned without submodules, they can be initialized recursively with remote updates: + +```bash +git submodule update --init --recursive --remote +``` + +## Build + +The project can be configured and built with CMake: + +```bash +cmake -S . -B cmake-build-debug +cmake --build cmake-build-debug +``` + +This creates the `Messenger-Client` and `Messenger-Server` targets. From ff4075ba2f179c24d4f1e3035c3477d0e278db47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Fri, 26 Jun 2026 21:46:03 +0200 Subject: [PATCH 10/29] Update dependency chart in README --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 5eddce7..3190d37 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,25 @@ The repository contains two applications: `Messenger-Client` and `Messenger-Serv Both applications use a singleton through `getInstance()`. The project is built with CMake and C++20, with the RSA library included as a submodule. +## Dependencies + +```mermaid +flowchart TD + Client["Messenger-Client"] + Server["Messenger-Server"] + RSA["RSA\nEncryption"] + QtGUI["Qt Quick / QML\nGUI"] + QtNetwork["Qt Network\nNetworking"] + + Client --> QtGUI + Client --> QtNetwork + Server --> QtNetwork + Client --> RSA + Server --> RSA +``` + +The application depends on the RSA library for encryption, Qt Quick/QML for the graphical client, and Qt Network for networking functionality. + ## Setup > [!NOTE] From 0a9b7740ae802ee5e37cedbec1a2ea607f6257e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Fri, 26 Jun 2026 21:54:50 +0200 Subject: [PATCH 11/29] Refine labels in README diagram Updated diagram labels for clarity. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3190d37..4327aad 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,9 @@ Both applications use a singleton through `getInstance()`. The project is built flowchart TD Client["Messenger-Client"] Server["Messenger-Server"] - RSA["RSA\nEncryption"] - QtGUI["Qt Quick / QML\nGUI"] - QtNetwork["Qt Network\nNetworking"] + RSA["RSA"] + QtGUI["Qt QML"] + QtNetwork["Qt Network"] Client --> QtGUI Client --> QtNetwork From 82ee03461ca1c80ec111b2f078241b7f6d0bbb4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Tue, 30 Jun 2026 20:28:07 +0200 Subject: [PATCH 12/29] Add qt network module --- src/client/CMakeLists.txt | 3 ++- src/server/CMakeLists.txt | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt index 6574985..8775839 100644 --- a/src/client/CMakeLists.txt +++ b/src/client/CMakeLists.txt @@ -1,4 +1,4 @@ -find_package(Qt6 COMPONENTS Quick Qml REQUIRED) +find_package(Qt6 COMPONENTS Quick Qml Network REQUIRED) qt_standard_project_setup(REQUIRES 6.5) @@ -24,4 +24,5 @@ target_link_libraries(Messenger-Client PRIVATE Qt6::Quick Qt6::Qml + Qt6::Network ) diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt index aada557..ba9761d 100644 --- a/src/server/CMakeLists.txt +++ b/src/server/CMakeLists.txt @@ -1 +1,5 @@ -add_executable(Messenger-Server server.cpp) \ No newline at end of file +find_package(Qt6 REQUIRED COMPONENTS Network) + +add_executable(Messenger-Server server.cpp) + +target_link_libraries(Messenger-Server PRIVATE Qt6::Network) From 387be6ccf5d7bf05048f0afd39ee171ff5896923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Tue, 30 Jun 2026 20:49:02 +0200 Subject: [PATCH 13/29] Add links to graphic --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 4327aad..03314ab 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,10 @@ flowchart TD Server --> QtNetwork Client --> RSA Server --> RSA + + click QtGUI "https://doc.qt.io/qt-6/qtquick-index.html" "Qt Quick/QML documentation" + click QtNetwork "https://doc.qt.io/qt-6/qtnetwork-index.html" "Qt Network documentation" + click RSA "https://github.com/ParallelEngineering/RSA" ``` The application depends on the RSA library for encryption, Qt Quick/QML for the graphical client, and Qt Network for networking functionality. From ea8b2c5678e4298c0e99a3acc40ae9e8c8ff2495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Tue, 30 Jun 2026 21:22:00 +0200 Subject: [PATCH 14/29] Update CI pipeline for multi platform support --- .github/workflows/ci.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2434e00..981167b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,9 +16,9 @@ jobs: fail-fast: false matrix: config: - - { name: "Windows gcc", os: windows-latest, cc: "gcc", cxx: "g++" } - - { name: "Ubuntu gcc", os: ubuntu-latest, cc: "gcc", cxx: "g++" } - - { name: "MacOS clang", os: macos-latest, cc: "clang", cxx: "clang++" } + - { name: "Windows gcc", os: windows-latest, cc: "gcc", cxx: "g++", qt-arch: "win64_mingw", qt-tools: "tools_mingw1120,qt.tools.win64_mingw1120" } + - { name: "Ubuntu gcc", os: ubuntu-latest, cc: "gcc", cxx: "g++", qt-arch: "gcc_64", qt-tools: "" } + - { name: "MacOS clang", os: macos-latest, cc: "clang", cxx: "clang++", qt-arch: "clang_64", qt-tools: "" } build-configuration: [ Debug, Release ] steps: @@ -31,7 +31,7 @@ jobs: if: runner.os == 'Linux' run: | sudo apt-get update - sudo apt-get install -y ninja-build + sudo apt-get install -y ninja-build libgl1-mesa-dev - name: Install Ninja (macOS) if: runner.os == 'macOS' @@ -46,9 +46,18 @@ jobs: shell: pwsh run: choco install ninja -y + - name: Install Qt + uses: jurplel/install-qt-action@v4 + with: + version: '6.5.3' + target: 'desktop' + arch: ${{ matrix.config.qt-arch }} + archives: 'qtbase qtdeclarative' + tools: ${{ matrix.config.qt-tools }} + - name: Configure CMake run: | - cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build-configuration }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} + cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build-configuration }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_PREFIX_PATH="${{ env.QT_ROOT_DIR }}" - name: Build Project run: cmake --build build --config ${{ matrix.build-configuration }} @@ -107,4 +116,4 @@ jobs: gh release create "$TAG_NAME" ./release-artifacts/*.zip \ --title "Development Build $TAG_NAME" \ --prerelease \ - --generate-notes \ No newline at end of file + --generate-notes From de76c2f93e37257c94758626b2f35b19710650a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Tue, 30 Jun 2026 21:28:26 +0200 Subject: [PATCH 15/29] Add pipeline support for recursive submodules --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 981167b..60d3277 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v6 with: - submodules: true + submodules: recursive - name: Install Ninja (Linux) if: runner.os == 'Linux' From 64b82b3068901a86d499a956bd14e05642b628bd Mon Sep 17 00:00:00 2001 From: LordofGhost <134922046+LordofGhost@users.noreply.github.com> Date: Tue, 30 Jun 2026 19:34:39 +0000 Subject: [PATCH 16/29] Apply Clang formatting --- src/client/client.h | 8 +++----- src/server/server.cpp | 8 ++------ src/server/server.h | 10 +++------- 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/src/client/client.h b/src/client/client.h index b582313..6eec7b3 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -7,7 +7,7 @@ class QGuiApplication; class QQmlApplicationEngine; class client { -public: + public: static client& getInstance(); ~client(); @@ -18,12 +18,10 @@ class client { client(client&&) = delete; client& operator=(client&&) = delete; -private: + private: client(); std::unique_ptr engine_; }; - - -#endif //MESSENGER_CLIENT_H +#endif // MESSENGER_CLIENT_H diff --git a/src/server/server.cpp b/src/server/server.cpp index 3b21baf..7a1b330 100644 --- a/src/server/server.cpp +++ b/src/server/server.cpp @@ -7,13 +7,9 @@ server& server::getInstance() { return instance; } -server::server() { - std::cout << "Starting Messenger Server ...\n"; -} +server::server() { std::cout << "Starting Messenger Server ...\n"; } -server::~server() { - std::cout << "Stopping Messenger Server ...\n"; -} +server::~server() { std::cout << "Stopping Messenger Server ...\n"; } int main() { auto& serverInstance = server::getInstance(); diff --git a/src/server/server.h b/src/server/server.h index d6bb782..2825dfe 100644 --- a/src/server/server.h +++ b/src/server/server.h @@ -1,10 +1,8 @@ #ifndef MESSENGER_SERVER_H #define MESSENGER_SERVER_H - - class server { -public: + public: static server& getInstance(); ~server(); @@ -13,10 +11,8 @@ class server { server(server&&) = delete; server& operator=(server&&) = delete; -private: + private: server(); }; - - -#endif //MESSENGER_SERVER_H +#endif // MESSENGER_SERVER_H From 71c755ab5e31d83db316fd42c3ed66d0cfe342f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Tue, 30 Jun 2026 21:42:31 +0200 Subject: [PATCH 17/29] fix windows at install --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60d3277..d4e27b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,9 +16,9 @@ jobs: fail-fast: false matrix: config: - - { name: "Windows gcc", os: windows-latest, cc: "gcc", cxx: "g++", qt-arch: "win64_mingw", qt-tools: "tools_mingw1120,qt.tools.win64_mingw1120" } - - { name: "Ubuntu gcc", os: ubuntu-latest, cc: "gcc", cxx: "g++", qt-arch: "gcc_64", qt-tools: "" } - - { name: "MacOS clang", os: macos-latest, cc: "clang", cxx: "clang++", qt-arch: "clang_64", qt-tools: "" } + - { name: "Windows gcc", os: windows-latest, cc: "gcc", cxx: "g++", qt-arch: "" } + - { name: "Ubuntu gcc", os: ubuntu-latest, cc: "gcc", cxx: "g++", qt-arch: "gcc_64" } + - { name: "MacOS clang", os: macos-latest, cc: "clang", cxx: "clang++", qt-arch: "clang_64" } build-configuration: [ Debug, Release ] steps: @@ -41,31 +41,58 @@ jobs: fi - - name: Install Ninja (Windows) - if: runner.os == 'Windows' - shell: pwsh - run: choco install ninja -y - - - name: Install Qt + - name: Install Qt (Linux/macOS) + if: runner.os != 'Windows' uses: jurplel/install-qt-action@v4 with: version: '6.5.3' target: 'desktop' arch: ${{ matrix.config.qt-arch }} archives: 'qtbase qtdeclarative' - tools: ${{ matrix.config.qt-tools }} - - name: Configure CMake + - name: Install Qt (Windows) + if: runner.os == 'Windows' + uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + update: true + install: >- + mingw-w64-x86_64-gcc + mingw-w64-x86_64-cmake + mingw-w64-x86_64-ninja + mingw-w64-x86_64-qt6-base + mingw-w64-x86_64-qt6-declarative + + - name: Configure CMake (Linux/macOS) + if: runner.os != 'Windows' run: | cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build-configuration }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_PREFIX_PATH="${{ env.QT_ROOT_DIR }}" - - name: Build Project + - name: Configure CMake (Windows) + if: runner.os == 'Windows' + shell: msys2 {0} + run: | + cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build-configuration }} -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_PREFIX_PATH=/mingw64 + + - name: Build Project (Linux/macOS) + if: runner.os != 'Windows' run: cmake --build build --config ${{ matrix.build-configuration }} - - name: Run Catch2 Unit Tests + - name: Build Project (Windows) + if: runner.os == 'Windows' + shell: msys2 {0} + run: cmake --build build --config ${{ matrix.build-configuration }} + + - name: Run Catch2 Unit Tests (Linux/macOS) + if: runner.os != 'Windows' # Runs the unit tests you specified run: ctest --test-dir build -C ${{ matrix.build-configuration }} --output-on-failure + - name: Run Catch2 Unit Tests (Windows) + if: runner.os == 'Windows' + shell: msys2 {0} + run: ctest --test-dir build -C ${{ matrix.build-configuration }} --output-on-failure + # We only package and upload 'Release' builds to save storage and time - name: Compress Release Build Directory if: matrix.build-configuration == 'Release' From dc2f9acb4a02ee5ed7252fb63793217cadf6ddbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Tue, 30 Jun 2026 21:49:06 +0200 Subject: [PATCH 18/29] fix ubuntu runner --- .github/workflows/ci.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4e27b7..84d6653 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,34 @@ jobs: if: runner.os == 'Linux' run: | sudo apt-get update - sudo apt-get install -y ninja-build libgl1-mesa-dev + sudo apt-get install -y \ + ninja-build \ + libgl1-mesa-dev \ + libfontconfig1-dev \ + libfreetype6-dev \ + libx11-dev \ + libx11-xcb-dev \ + libxcb-cursor-dev \ + libxcb-glx0-dev \ + libxcb-icccm4-dev \ + libxcb-image0-dev \ + libxcb-keysyms1-dev \ + libxcb-randr0-dev \ + libxcb-render-util0-dev \ + libxcb-shape0-dev \ + libxcb-shm0-dev \ + libxcb-sync-dev \ + libxcb-util-dev \ + libxcb-xfixes0-dev \ + libxcb-xinerama0-dev \ + libxcb-xkb-dev \ + libxcb1-dev \ + libxext-dev \ + libxfixes-dev \ + libxi-dev \ + libxkbcommon-dev \ + libxkbcommon-x11-dev \ + libxrender-dev - name: Install Ninja (macOS) if: runner.os == 'macOS' From d23ec672e43a5de074eaec76cf928c47faa4c198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Wed, 1 Jul 2026 10:56:45 +0200 Subject: [PATCH 19/29] Cleanup ci pipeline --- .github/workflows/ci.yml | 164 +++++++++++++++++---------------------- 1 file changed, 71 insertions(+), 93 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84d6653..6fa36cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,24 +2,42 @@ name: CI/CD Pipeline on: pull_request: - branches: [ "main" ] + branches: [main] push: - branches: [ "main" ] + branches: [main] + +env: + BUILD_DIR: build + QT_VERSION: "6.5.3" jobs: - # JOB 1: Build and test matrix - # Runs on PRs and pushes to main across OS's build-and-test: - name: Build & Test (${{ matrix.config.name }} - ${{ matrix.build-configuration }}) + name: ${{ matrix.config.name }} (${{ matrix.build-configuration }}) runs-on: ${{ matrix.config.os }} + strategy: fail-fast: false matrix: config: - - { name: "Windows gcc", os: windows-latest, cc: "gcc", cxx: "g++", qt-arch: "" } - - { name: "Ubuntu gcc", os: ubuntu-latest, cc: "gcc", cxx: "g++", qt-arch: "gcc_64" } - - { name: "MacOS clang", os: macos-latest, cc: "clang", cxx: "clang++", qt-arch: "clang_64" } - build-configuration: [ Debug, Release ] + - name: Windows gcc + os: windows-latest + cc: gcc + cxx: g++ + shell: "msys2 {0}" + qt-arch: "" + - name: Ubuntu gcc + os: ubuntu-latest + cc: gcc + cxx: g++ + shell: bash + qt-arch: gcc_64 + - name: MacOS clang + os: macos-latest + cc: clang + cxx: clang++ + shell: bash + qt-arch: clang_64 + build-configuration: [Debug, Release] steps: - name: Checkout repository @@ -27,55 +45,27 @@ jobs: with: submodules: recursive - - name: Install Ninja (Linux) - if: runner.os == 'Linux' - run: | - sudo apt-get update - sudo apt-get install -y \ - ninja-build \ - libgl1-mesa-dev \ - libfontconfig1-dev \ - libfreetype6-dev \ - libx11-dev \ - libx11-xcb-dev \ - libxcb-cursor-dev \ - libxcb-glx0-dev \ - libxcb-icccm4-dev \ - libxcb-image0-dev \ - libxcb-keysyms1-dev \ - libxcb-randr0-dev \ - libxcb-render-util0-dev \ - libxcb-shape0-dev \ - libxcb-shm0-dev \ - libxcb-sync-dev \ - libxcb-util-dev \ - libxcb-xfixes0-dev \ - libxcb-xinerama0-dev \ - libxcb-xkb-dev \ - libxcb1-dev \ - libxext-dev \ - libxfixes-dev \ - libxi-dev \ - libxkbcommon-dev \ - libxkbcommon-x11-dev \ - libxrender-dev - - - name: Install Ninja (macOS) - if: runner.os == 'macOS' + - name: Install Ninja (Linux/macOS) + if: runner.os != 'Windows' run: | - if ! command -v ninja >/dev/null 2>&1; then - brew install ninja - fi - + case "${{ runner.os }}" in + Linux) + sudo apt-get update + sudo apt-get install -y ninja-build + ;; + macOS) + command -v ninja >/dev/null 2>&1 || brew install ninja + ;; + esac - name: Install Qt (Linux/macOS) if: runner.os != 'Windows' uses: jurplel/install-qt-action@v4 with: - version: '6.5.3' - target: 'desktop' + version: ${{ env.QT_VERSION }} + target: desktop arch: ${{ matrix.config.qt-arch }} - archives: 'qtbase qtdeclarative' + archives: qtbase qtdeclarative - name: Install Qt (Windows) if: runner.os == 'Windows' @@ -90,46 +80,37 @@ jobs: mingw-w64-x86_64-qt6-base mingw-w64-x86_64-qt6-declarative - - name: Configure CMake (Linux/macOS) - if: runner.os != 'Windows' + - name: Configure CMake + shell: ${{ matrix.config.shell }} run: | - cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build-configuration }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_PREFIX_PATH="${{ env.QT_ROOT_DIR }}" - - - name: Configure CMake (Windows) - if: runner.os == 'Windows' - shell: msys2 {0} - run: | - cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build-configuration }} -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_PREFIX_PATH=/mingw64 - - - name: Build Project (Linux/macOS) - if: runner.os != 'Windows' - run: cmake --build build --config ${{ matrix.build-configuration }} + qt_prefix="$QT_ROOT_DIR" + if [ "${{ runner.os }}" = "Windows" ]; then + qt_prefix=/mingw64 + fi - - name: Build Project (Windows) - if: runner.os == 'Windows' - shell: msys2 {0} - run: cmake --build build --config ${{ matrix.build-configuration }} + cmake -B "$BUILD_DIR" -G Ninja \ + -DCMAKE_BUILD_TYPE=${{ matrix.build-configuration }} \ + -DCMAKE_C_COMPILER=${{ matrix.config.cc }} \ + -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \ + -DCMAKE_PREFIX_PATH="$qt_prefix" - - name: Run Catch2 Unit Tests (Linux/macOS) - if: runner.os != 'Windows' - # Runs the unit tests you specified - run: ctest --test-dir build -C ${{ matrix.build-configuration }} --output-on-failure + - name: Build project + shell: ${{ matrix.config.shell }} + run: cmake --build "$BUILD_DIR" --config ${{ matrix.build-configuration }} - - name: Run Catch2 Unit Tests (Windows) - if: runner.os == 'Windows' - shell: msys2 {0} - run: ctest --test-dir build -C ${{ matrix.build-configuration }} --output-on-failure + - name: Run Catch2 unit tests + shell: ${{ matrix.config.shell }} + run: ctest --test-dir "$BUILD_DIR" -C ${{ matrix.build-configuration }} --output-on-failure - # We only package and upload 'Release' builds to save storage and time - - name: Compress Release Build Directory + - name: Compress release build directory if: matrix.build-configuration == 'Release' uses: thedoctor0/zip-release@0.7.5 with: - type: 'zip' - path: 'build' - filename: '${{ matrix.config.os }}-build.zip' + type: zip + path: ${{ env.BUILD_DIR }} + filename: ${{ matrix.config.os }}-build.zip - - name: Upload Artifacts for Release + - name: Upload release artifact if: matrix.build-configuration == 'Release' uses: actions/upload-artifact@v7 with: @@ -137,36 +118,33 @@ jobs: path: ${{ matrix.config.os }}-build.zip retention-days: 1 - - # JOB 2: Create Pre-Release - # Runs only on pushes to main, after tests pass release: - name: Create Pre-Release + name: Create pre-release needs: build-and-test if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest + permissions: contents: write + steps: - - name: Checkout Code + - name: Checkout repository uses: actions/checkout@v6 - - name: Download all OS Artifacts + - name: Download release artifacts uses: actions/download-artifact@v8 with: path: ./release-artifacts - merge-multiple: true # Puts the Mac, Win, and Linux zip files in the same folder + merge-multiple: true - - name: Generate Tag & Publish Release + - name: Generate tag and publish release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - # Create naming convention DATE=$(date +'%d_%m_%Y') SHORT_SHA=${GITHUB_SHA::8} TAG_NAME="dev-${SHORT_SHA}-${DATE}" - - # Create Pre-Release and attach all downloaded .zip files using modern GitHub CLI + gh release create "$TAG_NAME" ./release-artifacts/*.zip \ --title "Development Build $TAG_NAME" \ --prerelease \ From 24b35d2b4a74b88a3553f76ad2cdc8ad235c33a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Wed, 1 Jul 2026 11:13:54 +0200 Subject: [PATCH 20/29] Update CI --- .github/workflows/ci.yml | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6fa36cf..cd08759 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ env: jobs: build-and-test: - name: ${{ matrix.config.name }} (${{ matrix.build-configuration }}) + name: ${{ matrix.config.name }} (${{ matrix.build_configuration }}) runs-on: ${{ matrix.config.os }} strategy: @@ -24,20 +24,23 @@ jobs: cc: gcc cxx: g++ shell: "msys2 {0}" - qt-arch: "" + qt_arch: "" + extra_cmake_args: "" - name: Ubuntu gcc os: ubuntu-latest cc: gcc cxx: g++ shell: bash - qt-arch: gcc_64 + qt_arch: gcc_64 + extra_cmake_args: "" - name: MacOS clang os: macos-latest cc: clang cxx: clang++ shell: bash - qt-arch: clang_64 - build-configuration: [Debug, Release] + qt_arch: clang_64 + extra_cmake_args: -DCMAKE_OSX_ARCHITECTURES=arm64 + build_configuration: [Debug, Release] steps: - name: Checkout repository @@ -64,7 +67,7 @@ jobs: with: version: ${{ env.QT_VERSION }} target: desktop - arch: ${{ matrix.config.qt-arch }} + arch: ${{ matrix.config.qt_arch }} archives: qtbase qtdeclarative - name: Install Qt (Windows) @@ -89,21 +92,22 @@ jobs: fi cmake -B "$BUILD_DIR" -G Ninja \ - -DCMAKE_BUILD_TYPE=${{ matrix.build-configuration }} \ + -DCMAKE_BUILD_TYPE=${{ matrix.build_configuration }} \ -DCMAKE_C_COMPILER=${{ matrix.config.cc }} \ -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \ - -DCMAKE_PREFIX_PATH="$qt_prefix" + -DCMAKE_PREFIX_PATH="$qt_prefix" \ + ${{ matrix.config.extra_cmake_args }} - name: Build project shell: ${{ matrix.config.shell }} - run: cmake --build "$BUILD_DIR" --config ${{ matrix.build-configuration }} + run: cmake --build "$BUILD_DIR" --config ${{ matrix.build_configuration }} - name: Run Catch2 unit tests shell: ${{ matrix.config.shell }} - run: ctest --test-dir "$BUILD_DIR" -C ${{ matrix.build-configuration }} --output-on-failure + run: ctest --test-dir "$BUILD_DIR" -C ${{ matrix.build_configuration }} --output-on-failure - name: Compress release build directory - if: matrix.build-configuration == 'Release' + if: matrix.build_configuration == 'Release' uses: thedoctor0/zip-release@0.7.5 with: type: zip @@ -111,7 +115,7 @@ jobs: filename: ${{ matrix.config.os }}-build.zip - name: Upload release artifact - if: matrix.build-configuration == 'Release' + if: matrix.build_configuration == 'Release' uses: actions/upload-artifact@v7 with: name: ${{ matrix.config.os }}-build From dbd686d6446b65c47f69e8b5c7a46fe771aeb77a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Wed, 1 Jul 2026 11:16:40 +0200 Subject: [PATCH 21/29] Rollback CI to previous state --- .github/workflows/ci.yml | 149 ++++++++++++++++++--------------------- 1 file changed, 70 insertions(+), 79 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd08759..4ba203b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,45 +2,24 @@ name: CI/CD Pipeline on: pull_request: - branches: [main] + branches: [ "main" ] push: - branches: [main] - -env: - BUILD_DIR: build - QT_VERSION: "6.5.3" + branches: [ "main" ] jobs: + # JOB 1: Build and test matrix + # Runs on PRs and pushes to main across OS's build-and-test: - name: ${{ matrix.config.name }} (${{ matrix.build_configuration }}) + name: Build & Test (${{ matrix.config.name }} - ${{ matrix.build-configuration }}) runs-on: ${{ matrix.config.os }} - strategy: fail-fast: false matrix: config: - - name: Windows gcc - os: windows-latest - cc: gcc - cxx: g++ - shell: "msys2 {0}" - qt_arch: "" - extra_cmake_args: "" - - name: Ubuntu gcc - os: ubuntu-latest - cc: gcc - cxx: g++ - shell: bash - qt_arch: gcc_64 - extra_cmake_args: "" - - name: MacOS clang - os: macos-latest - cc: clang - cxx: clang++ - shell: bash - qt_arch: clang_64 - extra_cmake_args: -DCMAKE_OSX_ARCHITECTURES=arm64 - build_configuration: [Debug, Release] + - { name: "Windows gcc", os: windows-latest, cc: "gcc", cxx: "g++", qt-arch: "" } + - { name: "Ubuntu gcc", os: ubuntu-latest, cc: "gcc", cxx: "g++", qt-arch: "gcc_64" } + - { name: "MacOS clang", os: macos-latest, cc: "clang", cxx: "clang++", qt-arch: "clang_64" } + build-configuration: [ Debug, Release ] steps: - name: Checkout repository @@ -48,27 +27,28 @@ jobs: with: submodules: recursive - - name: Install Ninja (Linux/macOS) - if: runner.os != 'Windows' + - name: Install Ninja (Linux) + if: runner.os == 'Linux' run: | - case "${{ runner.os }}" in - Linux) - sudo apt-get update - sudo apt-get install -y ninja-build - ;; - macOS) - command -v ninja >/dev/null 2>&1 || brew install ninja - ;; - esac + sudo apt-get update + sudo apt-get install -y ninja-build libgl1-mesa-dev + + - name: Install Ninja (macOS) + if: runner.os == 'macOS' + run: | + if ! command -v ninja >/dev/null 2>&1; then + brew install ninja + fi + - name: Install Qt (Linux/macOS) if: runner.os != 'Windows' uses: jurplel/install-qt-action@v4 with: - version: ${{ env.QT_VERSION }} - target: desktop - arch: ${{ matrix.config.qt_arch }} - archives: qtbase qtdeclarative + version: '6.5.3' + target: 'desktop' + arch: ${{ matrix.config.qt-arch }} + archives: 'qtbase qtdeclarative' - name: Install Qt (Windows) if: runner.os == 'Windows' @@ -83,73 +63,84 @@ jobs: mingw-w64-x86_64-qt6-base mingw-w64-x86_64-qt6-declarative - - name: Configure CMake - shell: ${{ matrix.config.shell }} + - name: Configure CMake (Linux/macOS) + if: runner.os != 'Windows' run: | - qt_prefix="$QT_ROOT_DIR" - if [ "${{ runner.os }}" = "Windows" ]; then - qt_prefix=/mingw64 - fi + cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build-configuration }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_PREFIX_PATH="${{ env.QT_ROOT_DIR }}" + + - name: Configure CMake (Windows) + if: runner.os == 'Windows' + shell: msys2 {0} + run: | + cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build-configuration }} -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_PREFIX_PATH=/mingw64 + + - name: Build Project (Linux/macOS) + if: runner.os != 'Windows' + run: cmake --build build --config ${{ matrix.build-configuration }} - cmake -B "$BUILD_DIR" -G Ninja \ - -DCMAKE_BUILD_TYPE=${{ matrix.build_configuration }} \ - -DCMAKE_C_COMPILER=${{ matrix.config.cc }} \ - -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \ - -DCMAKE_PREFIX_PATH="$qt_prefix" \ - ${{ matrix.config.extra_cmake_args }} + - name: Build Project (Windows) + if: runner.os == 'Windows' + shell: msys2 {0} + run: cmake --build build --config ${{ matrix.build-configuration }} - - name: Build project - shell: ${{ matrix.config.shell }} - run: cmake --build "$BUILD_DIR" --config ${{ matrix.build_configuration }} + - name: Run Catch2 Unit Tests (Linux/macOS) + if: runner.os != 'Windows' + # Runs the unit tests you specified + run: ctest --test-dir build -C ${{ matrix.build-configuration }} --output-on-failure - - name: Run Catch2 unit tests - shell: ${{ matrix.config.shell }} - run: ctest --test-dir "$BUILD_DIR" -C ${{ matrix.build_configuration }} --output-on-failure + - name: Run Catch2 Unit Tests (Windows) + if: runner.os == 'Windows' + shell: msys2 {0} + run: ctest --test-dir build -C ${{ matrix.build-configuration }} --output-on-failure - - name: Compress release build directory - if: matrix.build_configuration == 'Release' + # We only package and upload 'Release' builds to save storage and time + - name: Compress Release Build Directory + if: matrix.build-configuration == 'Release' uses: thedoctor0/zip-release@0.7.5 with: - type: zip - path: ${{ env.BUILD_DIR }} - filename: ${{ matrix.config.os }}-build.zip + type: 'zip' + path: 'build' + filename: '${{ matrix.config.os }}-build.zip' - - name: Upload release artifact - if: matrix.build_configuration == 'Release' + - name: Upload Artifacts for Release + if: matrix.build-configuration == 'Release' uses: actions/upload-artifact@v7 with: name: ${{ matrix.config.os }}-build path: ${{ matrix.config.os }}-build.zip retention-days: 1 + + # JOB 2: Create Pre-Release + # Runs only on pushes to main, after tests pass release: - name: Create pre-release + name: Create Pre-Release needs: build-and-test if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest - permissions: contents: write - steps: - - name: Checkout repository + - name: Checkout Code uses: actions/checkout@v6 - - name: Download release artifacts + - name: Download all OS Artifacts uses: actions/download-artifact@v8 with: path: ./release-artifacts - merge-multiple: true + merge-multiple: true # Puts the Mac, Win, and Linux zip files in the same folder - - name: Generate tag and publish release + - name: Generate Tag & Publish Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + # Create naming convention DATE=$(date +'%d_%m_%Y') SHORT_SHA=${GITHUB_SHA::8} TAG_NAME="dev-${SHORT_SHA}-${DATE}" - + + # Create Pre-Release and attach all downloaded .zip files using modern GitHub CLI gh release create "$TAG_NAME" ./release-artifacts/*.zip \ --title "Development Build $TAG_NAME" \ --prerelease \ - --generate-notes + --generate-notes \ No newline at end of file From dad7ef9f39712e107a8e70a2450c578b56f3b290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Wed, 1 Jul 2026 11:39:56 +0200 Subject: [PATCH 22/29] Fix ubuntu runner --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ba203b..ae07516 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,6 +50,10 @@ jobs: arch: ${{ matrix.config.qt-arch }} archives: 'qtbase qtdeclarative' + - name: Expose Qt runtime libraries (Linux) + if: runner.os == 'Linux' + run: echo "LD_LIBRARY_PATH=${QT_ROOT_DIR}/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" >> "$GITHUB_ENV" + - name: Install Qt (Windows) if: runner.os == 'Windows' uses: msys2/setup-msys2@v2 @@ -143,4 +147,4 @@ jobs: gh release create "$TAG_NAME" ./release-artifacts/*.zip \ --title "Development Build $TAG_NAME" \ --prerelease \ - --generate-notes \ No newline at end of file + --generate-notes From ca0d2a6d77e53147de32c63c60b20e28f1d3844f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Wed, 1 Jul 2026 13:33:55 +0200 Subject: [PATCH 23/29] try new ubuntu runner pipeline --- .github/workflows/ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae07516..8f1712b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,14 +45,15 @@ jobs: if: runner.os != 'Windows' uses: jurplel/install-qt-action@v4 with: - version: '6.5.3' + version: '6.8.*' target: 'desktop' arch: ${{ matrix.config.qt-arch }} - archives: 'qtbase qtdeclarative' - - name: Expose Qt runtime libraries (Linux) + - name: Verify Qt tool dependencies (Linux) if: runner.os == 'Linux' - run: echo "LD_LIBRARY_PATH=${QT_ROOT_DIR}/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" >> "$GITHUB_ENV" + run: | + ldd "$QT_ROOT_DIR/libexec/qmlimportscanner" + ! ldd "$QT_ROOT_DIR/libexec/qmlimportscanner" | grep "not found" - name: Install Qt (Windows) if: runner.os == 'Windows' From 18bfda5a14f4c2f43f0c5d9a7caaa37d6108bec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Wed, 1 Jul 2026 13:40:03 +0200 Subject: [PATCH 24/29] Set Qt version --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f1712b..9c99c18 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: if: runner.os != 'Windows' uses: jurplel/install-qt-action@v4 with: - version: '6.8.*' + version: '6.8.2' target: 'desktop' arch: ${{ matrix.config.qt-arch }} From 75ad0e86431531387d37d777de991d311e0879bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Wed, 1 Jul 2026 13:53:39 +0200 Subject: [PATCH 25/29] different qt version --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c99c18..c413599 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: if: runner.os != 'Windows' uses: jurplel/install-qt-action@v4 with: - version: '6.8.2' + version: '6.5.3' target: 'desktop' arch: ${{ matrix.config.qt-arch }} From 7b2b30ea638b173a14a711390fdbdcd46c3f0d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Wed, 1 Jul 2026 14:10:54 +0200 Subject: [PATCH 26/29] user macos 26 --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c413599..72d3628 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,9 +16,9 @@ jobs: fail-fast: false matrix: config: - - { name: "Windows gcc", os: windows-latest, cc: "gcc", cxx: "g++", qt-arch: "" } - - { name: "Ubuntu gcc", os: ubuntu-latest, cc: "gcc", cxx: "g++", qt-arch: "gcc_64" } - - { name: "MacOS clang", os: macos-latest, cc: "clang", cxx: "clang++", qt-arch: "clang_64" } + - { name: "Windows gcc", os: windows-latest, cc: "gcc", cxx: "g++", qt-version: "", qt-arch: "", cmake-extra: "" } + - { name: "Ubuntu gcc", os: ubuntu-latest, cc: "gcc", cxx: "g++", qt-version: "6.5.3", qt-arch: "gcc_64", cmake-extra: "" } + - { name: "MacOS clang", os: macos-26, cc: "clang", cxx: "clang++", qt-version: "6.8.2", qt-arch: "clang_64", cmake-extra: "-DCMAKE_OSX_ARCHITECTURES=arm64" } build-configuration: [ Debug, Release ] steps: @@ -45,7 +45,7 @@ jobs: if: runner.os != 'Windows' uses: jurplel/install-qt-action@v4 with: - version: '6.5.3' + version: ${{ matrix.config.qt-version }} target: 'desktop' arch: ${{ matrix.config.qt-arch }} @@ -71,7 +71,7 @@ jobs: - name: Configure CMake (Linux/macOS) if: runner.os != 'Windows' run: | - cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build-configuration }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_PREFIX_PATH="${{ env.QT_ROOT_DIR }}" + cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build-configuration }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_PREFIX_PATH="${{ env.QT_ROOT_DIR }}" ${{ matrix.config.cmake-extra }} - name: Configure CMake (Windows) if: runner.os == 'Windows' From f0b703f43285ae3895edcf7ef8083026cc1838e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Wed, 1 Jul 2026 14:20:22 +0200 Subject: [PATCH 27/29] rollback to macos 15 because of AGL framework --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72d3628..6b375e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,8 @@ jobs: config: - { name: "Windows gcc", os: windows-latest, cc: "gcc", cxx: "g++", qt-version: "", qt-arch: "", cmake-extra: "" } - { name: "Ubuntu gcc", os: ubuntu-latest, cc: "gcc", cxx: "g++", qt-version: "6.5.3", qt-arch: "gcc_64", cmake-extra: "" } - - { name: "MacOS clang", os: macos-26, cc: "clang", cxx: "clang++", qt-version: "6.8.2", qt-arch: "clang_64", cmake-extra: "-DCMAKE_OSX_ARCHITECTURES=arm64" } + # macOS 26 is not supported here because AGL.framework is no longer available + - { name: "MacOS clang", os: macos-15-intel, cc: "clang", cxx: "clang++", qt-version: "6.5.3", qt-arch: "clang_64", cmake-extra: "" } build-configuration: [ Debug, Release ] steps: From e9fb357d8ef599be63588f3a249b377ca02a1861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Wed, 1 Jul 2026 14:34:24 +0200 Subject: [PATCH 28/29] Add macos 26 with later qt version --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b375e0..80651f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,8 +18,9 @@ jobs: config: - { name: "Windows gcc", os: windows-latest, cc: "gcc", cxx: "g++", qt-version: "", qt-arch: "", cmake-extra: "" } - { name: "Ubuntu gcc", os: ubuntu-latest, cc: "gcc", cxx: "g++", qt-version: "6.5.3", qt-arch: "gcc_64", cmake-extra: "" } - # macOS 26 is not supported here because AGL.framework is no longer available + # Qt 6.5.3 stays on macOS 15 because AGL.framework is no longer available on macOS 26. - { name: "MacOS clang", os: macos-15-intel, cc: "clang", cxx: "clang++", qt-version: "6.5.3", qt-arch: "clang_64", cmake-extra: "" } + - { name: "MacOS 26 clang", os: macos-26, cc: "clang", cxx: "clang++", qt-version: "6.9.2", qt-arch: "clang_64", cmake-extra: "-DCMAKE_OSX_ARCHITECTURES=arm64" } build-configuration: [ Debug, Release ] steps: From 41f991207c16fb96f8e81e3fbdfccab5d75b6ab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Wed, 1 Jul 2026 14:39:25 +0200 Subject: [PATCH 29/29] Remove old macos version --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80651f3..5b90ed8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,8 +18,6 @@ jobs: config: - { name: "Windows gcc", os: windows-latest, cc: "gcc", cxx: "g++", qt-version: "", qt-arch: "", cmake-extra: "" } - { name: "Ubuntu gcc", os: ubuntu-latest, cc: "gcc", cxx: "g++", qt-version: "6.5.3", qt-arch: "gcc_64", cmake-extra: "" } - # Qt 6.5.3 stays on macOS 15 because AGL.framework is no longer available on macOS 26. - - { name: "MacOS clang", os: macos-15-intel, cc: "clang", cxx: "clang++", qt-version: "6.5.3", qt-arch: "clang_64", cmake-extra: "" } - { name: "MacOS 26 clang", os: macos-26, cc: "clang", cxx: "clang++", qt-version: "6.9.2", qt-arch: "clang_64", cmake-extra: "-DCMAKE_OSX_ARCHITECTURES=arm64" } build-configuration: [ Debug, Release ]