mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-06-24 16:21:12 +08:00
Tweaks.
This commit is contained in:
parent
7ced636a08
commit
131aa35864
@ -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 <https://aur.archlinux.org/packages/ftxui>.
|
||||
|
||||
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!
|
||||
|
||||
<div class="section_buttons">
|
||||
|
||||
| Previous |
|
||||
|
@ -1,15 +1,19 @@
|
||||
@page installation_conan Conan
|
||||
@tableofcontents
|
||||
|
||||
## Conan Package
|
||||
Unofficial recipe for FTXUI exists on Conan Center:
|
||||
<https://conan.io/center/recipes/ftxui>
|
||||
|
||||
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.
|
||||
|
||||
<div class="section_buttons">
|
||||
|
||||
|
@ -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<version>`
|
||||
- `libftxui-dev`
|
||||
- `libftxui-dom<version>`
|
||||
- `libftxui-screen<version>`
|
||||
|
||||
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.
|
||||
|
||||
<div class="section_buttons">
|
||||
|
||||
|
@ -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
|
||||
)
|
||||
```
|
||||
|
||||
|
||||
<div class="section_buttons">
|
||||
|
||||
| Previous |
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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 <https://build.opensuse.org/package/show/devel:libraries:c_c++/ftxui> 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.
|
||||
|
||||
|
||||
<div class="section_buttons">
|
||||
|
||||
| Previous |
|
||||
|
@ -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 <ftxui/component/screen_interactive.hpp>
|
||||
#include <ftxui/component/component.hpp>
|
||||
#include <ftxui/component/component_options.hpp>
|
||||
|
||||
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.
|
||||
|
||||
<div class="section_buttons">
|
||||
|
||||
|
@ -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.
|
||||
|
||||
---
|
||||
|
||||
<div class="section_buttons">
|
||||
|
||||
| Previous |
|
||||
|
Loading…
Reference in New Issue
Block a user