From 022d63c8a90f36ca494964537cb54af1a38bc567 Mon Sep 17 00:00:00 2001 From: Renovate Date: Thu, 24 Sep 2026 00:24:27 +0000 Subject: [PATCH 1/2] Update dependency ArthurSonzogni/ftxui to v7 --- .github/workflows/cmake.yml | 2 +- CMakeLists.txt | 2 +- README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 574c0632..05564d00 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -32,7 +32,7 @@ env: BUILD_DIR: "build" EXT_DIR: "ext" # renovate: datasource=github-tags depName=ArthurSonzogni/ftxui versioning=loose - FTXUI_VERSION: "v6.1.9" + FTXUI_VERSION: "v7.0.3" defaults: diff --git a/CMakeLists.txt b/CMakeLists.txt index 87a9adb9..ec96cfdf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,7 +45,7 @@ FetchContent_Declare( ftxui GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui.git # renovate: datasource=github-tags depName=ArthurSonzogni/ftxui versioning=loose - GIT_TAG v6.1.9 # > + GIT_TAG v7.0.3 # > GIT_SHALLOW 1 # works only with branches or tags, not with arbitrary commit hashes GIT_PROGRESS ON ) diff --git a/README.md b/README.md index debb739b..7313bc05 100644 --- a/README.md +++ b/README.md @@ -189,5 +189,5 @@ The [template repository](https://github.com/mcmarius/oop-template) itself is li - FTXUI - - Versiune: [v6.1.9](https://github.com/ArthurSonzogni/ftxui/releases/tag/v6.1.9) (MIT) + - Versiune: [v7.0.3](https://github.com/ArthurSonzogni/ftxui/releases/tag/v7.0.3) (MIT) - adăugați trimiteri **detaliate** către resursele externe care v-au ajutat sau pe care le-ați folosit \ No newline at end of file From 16a6834c89a6e4ea4d91aa32259e1d2488314b97 Mon Sep 17 00:00:00 2001 From: mcmarius <23401453+mcmarius@users.noreply.github.com> Date: Thu, 24 Sep 2026 13:37:39 +0300 Subject: [PATCH 2/2] fix(ftxui): adapt the example to FTXUI v7 - include , and explicitly: the v7 headers do not provide them transitively anymore, so std::thread was not declared - use ftxui::App (and ) instead of ScreenInteractive, which was renamed in v7 (the old name only survives as a compatibility alias) - link Threads::Threads explicitly: v7 dropped the PUBLIC Threads::Threads link it used to propagate, while the example still spawns a thread; without this the link may fail on targets that need an explicit thread library (winpthread with MinGW) --- CMakeLists.txt | 6 ++++-- main.cpp | 12 ++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ec96cfdf..3da82839 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,7 +56,9 @@ FetchContent_MakeAvailable(ftxui) # external dependencies with find_package -# find_package(Threads REQUIRED) +find_package(Threads REQUIRED) + +# find_package( REQUIRED) ############################################################################### @@ -89,7 +91,7 @@ target_include_directories(${MAIN_EXECUTABLE_NAME} SYSTEM PRIVATE # target_link_directories(${MAIN_EXECUTABLE_NAME} PRIVATE ${_BINARY_DIR}/lib) # target_link_libraries(${MAIN_EXECUTABLE_NAME} ) -target_link_libraries(${MAIN_EXECUTABLE_NAME} ftxui::screen ftxui::dom ftxui::component) +target_link_libraries(${MAIN_EXECUTABLE_NAME} ftxui::screen ftxui::dom ftxui::component Threads::Threads) ############################################################################### diff --git a/main.cpp b/main.cpp index 821a8c07..ba09f0fc 100644 --- a/main.cpp +++ b/main.cpp @@ -1,6 +1,10 @@ +#include +#include +#include + +#include // for App #include // for Slider, Renderer, Vertical #include // for ComponentBase -#include // for ScreenInteractive #include // for separator, operator|, Element, size, text, vbox, xflex, bgcolor, hbox, GREATER_THAN, WIDTH, border, HEIGHT, LESS_THAN #include // for Color @@ -55,7 +59,7 @@ int main() { /// /////////////////////////////////////////////////////////////////////////// - ftxui::ScreenInteractive screen = ftxui::ScreenInteractive::TerminalOutput(); + ftxui::App app = ftxui::App::TerminalOutput(); /////////////////////////////////////////////////////////////////////////////////////////////////////// /// Exemplu culori RGB /// @@ -99,11 +103,11 @@ int main() { /// Programul se va opri automat dupa 5 secunde // std::thread auto_close([&] { // std::this_thread::sleep_for(std::chrono::seconds(5)); // - screen.Exit(); // + app.Exit(); // }); // ////////////////////////////////////////////////////////////////////// - screen.Loop(renderer); + app.Loop(renderer); auto_close.join();