This commit is contained in:
PiGames 2025-06-20 17:37:17 +01:00 committed by GitHub
commit 34ed175ed8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 2 deletions

View File

@ -435,9 +435,14 @@ If you don't, FTXUI may be used from the following packages:
[![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)
If you choose to build and link FTXUI yourself, `ftxui-component` must be first in the linking order relative to the other FTXUI libraries, i.e. If you choose to build with g++, you can use bash script:
1. Run the installer:
```bash ```bash
g++ . . . -lftxui-component -lftxui-dom -lftxui-screen . . . chmod +x install && ./install
```
2. Compile your codes:
```bash
g++ftxui -o out source_code.cpp
``` ```
To build FTXUI with modules, check [documentation](https://arthursonzogni.github.io/FTXUI/cpp20-modules.html) To build FTXUI with modules, check [documentation](https://arthursonzogni.github.io/FTXUI/cpp20-modules.html)

8
g++ftxui Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash
/usr/bin/g++ \
-I~/FTXUI/include \
-L~/FTXUI/build \
"$@" \
-lftxui-component -lftxui-dom -lftxui-screen

3
install Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
sudo cp g++ftxui /usr/local/bin/ && sudo chmod +x /usr/local/bin/g++ftxui