From 2534e5896c3e141f82974b6559ece00a1f1fbbdf Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Tue, 15 Sep 2020 01:17:25 +0200 Subject: [PATCH] Add build instructions to readme --- README.md | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8f24acd..0119388 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,10 @@ orotool is released under the GPL3+ ## Compiling the project ## -Work in progress +To compile orotool you will need: + +* [meson](https://mesonbuild.com/) +* [gcc](https://gcc.gnu.org/) with C++17 support ### Dependencies ### @@ -32,6 +35,45 @@ Work in progress * [magic_enum](https://github.com/Neargye/magic_enum/) (compulsory, bundled) * [gnulib](https://git.savannah.gnu.org/gitweb/?p=gnulib.git) (compulsory, bundled) +### Building ### + +1. download the source code +2. create an empty directory +3. cd into your new directory and run `meson setup -Dbuildtype=release ` +4. compile with the command `ninja` +5. if compilation succeeds, you will find the binary inside the src directory +6. run `ninja install` to copy files into your system install location + +You can change the command at step 3 to customise certain aspects of orotool. +You can for example specify `--sysconfdir ` for the path where `orotool.conf` +should be found in. `-Dprefix` will change the install prefix. For example: + +``` +meson setup -Dprefix=/usr -Dsysconfdir=/etc -Dbuildtype=release ~/dev/orotool/ +``` + +Other options can be found in `meson_options.txt`. In meson you specify options +with the `-Doption` syntax to the setup subcommand, just like `-Dbuildtype`. +For example `-Dbase_url`. + +For options of type `feature` (see inside `meson_options.txt`) possible values +are: `enabled`, `disabled`, `auto`. A short description of each: + +* `enabled` the feature must be compiled in, configuration will fail if dependencies are missing +* `disabled` the feature is disabled +* `auto` the feature will only be compiled in if the required dependencies are present on the system + +For more informations please read the meson [documentation](https://mesonbuild.com/Build-options.html#features). + +Details about supported options: + +* `base_url` allows you to change the url of the remote API address (mostly useful when debugging) +* `def_sqlite_db_name` this is the default value for the `db_path` option in the config file +* `tests` enable building tests (currently it only has effect on some subprojects) +* `with_sqlite` if you want to compile with SQLite support (this is the only available backend at the moment) +* `rest_lib` which method will be used to access the remote API. `nap` is the internal one (curl+simdjson). `restc-cpp` is currently broken due to a [bug](https://github.com/jgaa/restc-cpp/issues/101) upstream +* `with_lzma` adds support for JSON logs compression (option `json_store_mode=xz` in the config file) + ## Contact ## The best way to get in touch is on IRC: