diff --git a/doc/installation_arch.md b/doc/installation_arch.md index 14f04355..574c5cc2 100644 --- a/doc/installation_arch.md +++ b/doc/installation_arch.md @@ -1,7 +1,4 @@ @page installation_arch Arch Linux -@tableofcontents - -## Arch User Repository (Unofficial) FTXUI is packaged on the AUR. Install using an AUR helper: @@ -11,6 +8,23 @@ yay -S ftxui You can also manually download the PKGBUILD from . +Once installed, you can use it in your CMake projects by adding the following to your `CMakeLists.txt`: + +```cmake +find_package(ftxui REQUIRED) +add_executable(main main.cpp) +target_link_libraries(main + PRIVATE ftxui::screen + PRIVATE ftxui::dom + PRIVATE ftxui::component +) +``` + +> [!note] +> This is an unofficial package. That means it is not maintained by the FTXUI +> team, but by the community. The package maintainers seems to actively update +> the package to the latest version. Thanks to the maintainers for their work! +
| Previous | diff --git a/doc/installation_conan.md b/doc/installation_conan.md index a17a8747..5aa24710 100644 --- a/doc/installation_conan.md +++ b/doc/installation_conan.md @@ -1,15 +1,19 @@ @page installation_conan Conan -@tableofcontents -## Conan Package +Unofficial recipe for FTXUI exists on Conan Center: + -Unofficial support for FTXUI exists on Conan Center: +> [!note] +> This is an unofficial recipe. That means it is not maintained by the FTXUI +> team, but by the community. The package maintainers seems to actively update +> the package to the latest version. Thanks to the maintainers for their work! -- https://conan.io/center/recipes/ftxui -## TODO +@todo Add instructions on how to use the conan recipe. -This page is incomplete. If you use FTXUI with Conan and can provide a minimal working setup, feel free to contribute. +@todo Please consider adding an "official" recipe to Conan Center if know how. +It could be a github action that will automatically update the conan center +when a new release is made.
diff --git a/doc/installation_debian.md b/doc/installation_debian.md index 5e7a5d61..de456693 100644 --- a/doc/installation_debian.md +++ b/doc/installation_debian.md @@ -1,5 +1,4 @@ @page installation_debian Debian/Ubuntu -@tableofcontents ## Debian and Ubuntu Packages (Unofficial) @@ -9,7 +8,30 @@ Pre-built packages are provided by the distributions. Install with: sudo apt install libftxui-dev ``` -These packages are maintained by the distro maintainers, not by the FTXUI project. +The following packages are available: +- `ftxui-doc` +- `ftxui-examples` +- `libftxui-component` +- `libftxui-dev` +- `libftxui-dom` +- `libftxui-screen` + +Once installed, you can use it in your CMake projects by adding the following to +your `CMakeLists.txt`: + +```cmake +find_package(ftxui REQUIRED) +add_executable(main main.cpp) +target_link_libraries(main + PRIVATE ftxui::screen + PRIVATE ftxui::dom + PRIVATE ftxui::component +) +``` + +> [!note] +> This is an **unofficial** package. That means it is not maintained by the FTXUI +> team, but by the community.
diff --git a/doc/installation_manual.md b/doc/installation_manual.md index dea70368..56c39720 100644 --- a/doc/installation_manual.md +++ b/doc/installation_manual.md @@ -8,17 +8,24 @@ Clone and build the project using CMake: ```bash git clone https://github.com/ArthurSonzogni/FTXUI.git cd FTXUI -cmake -S . -B build -DFTXUI_ENABLE_INSTALL=ON +cmake -S . -B build -DFTXUI_ENABLE_INSTALL=ON -D cmake --build build -j sudo cmake --install build ``` -Link the libraries in your application: +Once installed you can use it in your CMake projects by adding the following to your `CMakeLists.txt`: -```bash -g++ main.cpp -lftxui-component -lftxui-dom -lftxui-screen +```cmake +find_package(ftxui REQUIRED) +add_executable(main main.cpp) +target_link_libraries(main + PRIVATE ftxui::screen + PRIVATE ftxui::dom + PRIVATE ftxui::component +) ``` +
| Previous | diff --git a/doc/installation_nix.md b/doc/installation_nix.md index a41d35b5..e84d10ae 100644 --- a/doc/installation_nix.md +++ b/doc/installation_nix.md @@ -1,7 +1,11 @@ @page installation_nix Nix -@tableofcontents -## Nix Flake (Official) +> [!note] +> FTXUI author is not very knowledgeable about Nix. This page has been mostly +> generated by AI. If you have any suggestions to improve it, please open a +> PR. + +## Nix Flake FTXUI ships with a `flake.nix` providing both packages and a development shell. diff --git a/doc/installation_opensuse.md b/doc/installation_opensuse.md index 2df437ef..3acb26b5 100644 --- a/doc/installation_opensuse.md +++ b/doc/installation_opensuse.md @@ -1,9 +1,8 @@ @page installation_opensuse openSUSE -@tableofcontents ## openSUSE Package (Unofficial) -FTXUI is available from the `devel:libraries:c_c++` repository. +FTXUI seems to be available from the `devel:libraries:c_c++` repository. ```bash sudo zypper addrepo https://download.opensuse.org/repositories/devel:libraries:c_c++/openSUSE_Leap_$releasever/devel:libraries:c_c++.repo @@ -12,6 +11,18 @@ sudo zypper install ftxui See for details. +> [!note] +> This is an **unofficial** package. That means it is not maintained by the FTXUI +> team, but by the community. + +-- + +> [!note] +> The FTXUI author is not very knowledgeable about openSUSE. This page has been +> mostly generated by AI. If you have any suggestions to improve it, please open +> a PR. + +
| Previous | diff --git a/doc/installation_vcpkg.md b/doc/installation_vcpkg.md index c2905deb..63368f74 100644 --- a/doc/installation_vcpkg.md +++ b/doc/installation_vcpkg.md @@ -1,15 +1,74 @@ @page installation_vcpkg Vcpkg @tableofcontents -## Vcpkg Package +# Vcpkg Package -FTXUI is available in the Vcpkg registry: +FTXUI is available in the [Vcpkg registry](https://vcpkg.link/ports/ftxui) + +To use it, you can add the following to your `vcpkg.json`: + +```json +{ + "name": "your-project", + "version-string": "0.1.0", + "dependencies": [ + { + "name": "ftxui", + "version>=": "6.1.9" + } + ] +} +``` + +# Install FTXUI using Vcpkg +```bash +vcpkg install --triplet x64-linux # or x64-windows / arm64-osx etc. +``` + +# Configure your build system. +If you are using CMake, you can use the following in your `CMakeLists.txt`: + +**CMakeLists.txt** +```cmake +cmake_minimum_required(VERSION 3.15) +project(my_project) + +# Make sure vcpkg toolchain file is passed at configure time +find_package(ftxui CONFIG REQUIRED) + +add_executable(main main.cpp) +target_link_libraries(main + PRIVATE ftxui::screen + PRIVATE ftxui::dom + PRIVATE ftxui::component +) +``` + +**main.cpp** +```cpp +#include +#include +#include + +int main() { + using namespace ftxui; + + auto screen = ScreenInteractive::TerminalOutput(); + auto button = Button("Click me", [] { std::cout << "Clicked!\n"; }); + + screen.Loop(button); +} +``` + +**Configure and build the project** +```bash +cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake +cmake --build build +./build/main +``` -- https://vcpkg.link/ports/ftxui -## TODO -This page is incomplete. If you use FTXUI with Vcpkg, please help improve this page by contributing working configuration examples.
diff --git a/doc/installation_xmake.md b/doc/installation_xmake.md index 581e7d82..e6b107ad 100644 --- a/doc/installation_xmake.md +++ b/doc/installation_xmake.md @@ -3,7 +3,7 @@ ## XMake Package (Unofficial) -FTXUI is available in the [xmake-repo](https://github.com/xmake-io/xmake-repo). +FTXUI is available in the [xmake-repo](https://github.com/xmake-io/xmake-repo/blob/dev/packages/f/ftxui/xmake.lua) Example `xmake.lua` snippet: @@ -18,6 +18,19 @@ target("demo") Refer to the [XMake documentation](https://xmake.io) for further options. +> [!note] +> This is an **unofficial** package. That means it is not maintained by the FTXUI +> team, but by the community. + +--- + +> [!note] +> The FTXUI author is not very knowledgeable about openSUSE. This page has been +> mostly generated by AI. If you have any suggestions to improve it, please open +> a PR. + +--- +
| Previous |