diff --git a/README.md b/README.md index e3496417..d5f09215 100644 --- a/README.md +++ b/README.md @@ -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) -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 -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) diff --git a/g++ftxui b/g++ftxui new file mode 100644 index 00000000..815a7eb5 --- /dev/null +++ b/g++ftxui @@ -0,0 +1,8 @@ +#!/bin/bash + +/usr/bin/g++ \ + -I~/FTXUI/include \ + -L~/FTXUI/build \ + "$@" \ + -lftxui-component -lftxui-dom -lftxui-screen + diff --git a/install b/install new file mode 100644 index 00000000..6b0481c9 --- /dev/null +++ b/install @@ -0,0 +1,3 @@ +#!/bin/bash + +sudo cp g++ftxui /usr/local/bin/ && sudo chmod +x /usr/local/bin/g++ftxui