docs: add installation guides

This commit is contained in:
Arthur Sonzogni 2025-06-05 11:45:06 +02:00
parent 14da21b0ee
commit 7ced636a08
8 changed files with 159 additions and 2 deletions

View File

@ -52,6 +52,7 @@ A simple cross-platform C++ library for terminal based user interfaces!
- [Arch Linux](https://aur.archlinux.org/packages/ftxui/) - [Arch Linux](https://aur.archlinux.org/packages/ftxui/)
- [OpenSUSE](https://build.opensuse.org/package/show/devel:libraries:c_c++/ftxui) - [OpenSUSE](https://build.opensuse.org/package/show/devel:libraries:c_c++/ftxui)
- [XMake](https://xmake.io) repository [package](https://github.com/xmake-io/xmake-repo/blob/dev/packages/f/ftxui/xmake.lua) - [XMake](https://xmake.io) repository [package](https://github.com/xmake-io/xmake-repo/blob/dev/packages/f/ftxui/xmake.lua)
- [Nix](https://github.com/ArthurSonzogni/FTXUI/blob/main/flake.nix)
* Good practices: documentation, tests, fuzzers, performance tests, automated CI, automated packaging, etc... * Good practices: documentation, tests, fuzzers, performance tests, automated CI, automated packaging, etc...
## Documentation ## Documentation
@ -430,6 +431,7 @@ If you don't, FTXUI may be used from the following packages:
- [Ubuntu package](https://launchpad.net/ubuntu/+source/ftxui), - [Ubuntu package](https://launchpad.net/ubuntu/+source/ftxui),
- [Arch Linux](https://aur.archlinux.org/packages/ftxui/), - [Arch Linux](https://aur.archlinux.org/packages/ftxui/),
- [OpenSUSE](https://build.opensuse.org/package/show/devel:libraries:c_c++/ftxui), - [OpenSUSE](https://build.opensuse.org/package/show/devel:libraries:c_c++/ftxui),
[Nix](https://github.com/ArthurSonzogni/FTXUI/blob/main/flake.nix),
[![Packaging status](https://repology.org/badge/vertical-allrepos/libftxui.svg)](https://repology.org/project/libftxui/versions) [![Packaging status](https://repology.org/badge/vertical-allrepos/libftxui.svg)](https://repology.org/project/libftxui/versions)

View File

@ -16,6 +16,11 @@ This page serves as an entry point for the available integration methods.
- @subpage installation_vcpkg - @subpage installation_vcpkg
- @subpage installation_conan - @subpage installation_conan
- @subpage installation_manual - @subpage installation_manual
- @subpage installation_nix
- @subpage installation_debian
- @subpage installation_arch
- @subpage installation_opensuse
- @subpage installation_xmake
## Next Steps ## Next Steps

20
doc/installation_arch.md Normal file
View File

@ -0,0 +1,20 @@
@page installation_arch Arch Linux
@tableofcontents
## Arch User Repository (Unofficial)
FTXUI is packaged on the AUR. Install using an AUR helper:
```bash
yay -S ftxui
```
You can also manually download the PKGBUILD from <https://aur.archlinux.org/packages/ftxui>.
<div class="section_buttons">
| Previous |
|:------------------|
| [Getting Started](getting-started.html) |
</div>

View File

@ -0,0 +1,20 @@
@page installation_debian Debian/Ubuntu
@tableofcontents
## Debian and Ubuntu Packages (Unofficial)
Pre-built packages are provided by the distributions. Install with:
```bash
sudo apt install libftxui-dev
```
These packages are maintained by the distro maintainers, not by the FTXUI project.
<div class="section_buttons">
| Previous |
|:------------------|
| [Getting Started](getting-started.html) |
</div>

View File

@ -0,0 +1,28 @@
@page installation_manual Manual
@tableofcontents
## Building from Source (Official)
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 --build build -j
sudo cmake --install build
```
Link the libraries in your application:
```bash
g++ main.cpp -lftxui-component -lftxui-dom -lftxui-screen
```
<div class="section_buttons">
| Previous |
|:------------------|
| [Getting Started](getting-started.html) |
</div>

34
doc/installation_nix.md Normal file
View File

@ -0,0 +1,34 @@
@page installation_nix Nix
@tableofcontents
## Nix Flake (Official)
FTXUI ships with a `flake.nix` providing both packages and a development shell.
### Build the Library
```bash
nix build github:ArthurSonzogni/FTXUI
```
The resulting package is accessible via the `result` link.
### Use as a Dependency
Add FTXUI to your flake inputs:
```nix
{
inputs.ftxui.url = "github:ArthurSonzogni/FTXUI";
}
```
Then reference `ftxui.packages.<system>.ftxui` in your outputs.
<div class="section_buttons">
| Previous |
|:------------------|
| [Getting Started](getting-started.html) |
</div>

View File

@ -0,0 +1,21 @@
@page installation_opensuse openSUSE
@tableofcontents
## openSUSE Package (Unofficial)
FTXUI is 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
sudo zypper install ftxui
```
See <https://build.opensuse.org/package/show/devel:libraries:c_c++/ftxui> for details.
<div class="section_buttons">
| Previous |
|:------------------|
| [Getting Started](getting-started.html) |
</div>

27
doc/installation_xmake.md Normal file
View File

@ -0,0 +1,27 @@
@page installation_xmake XMake
@tableofcontents
## XMake Package (Unofficial)
FTXUI is available in the [xmake-repo](https://github.com/xmake-io/xmake-repo).
Example `xmake.lua` snippet:
```lua
add_requires("ftxui", {system = false})
target("demo")
set_kind("binary")
add_files("src/*.cpp")
add_packages("ftxui")
```
Refer to the [XMake documentation](https://xmake.io) for further options.
<div class="section_buttons">
| Previous |
|:------------------|
| [Getting Started](getting-started.html) |
</div>