From 1ee2a3c8c84dd96c52eea826a3a238a5e140976e Mon Sep 17 00:00:00 2001 From: Vasile Vilvoiu Date: Sat, 26 Aug 2023 19:02:29 +0300 Subject: Basic build/install instructions. --- README.md | 52 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 55be6cd..3bcab10 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,51 @@ # libsstv -SSTV C encoder/decoder library for embedded systems. -## Usage: +*NOTE: The current pre-release version of the library only supports encoding of images in a multitude of modes. Decoding support is planned for the 1.0.0 version, but as of yet no work has been done in that direction.* + +SSTV C encoder/decoder library suitable for both desktop and embedded applications. + +## Building and installing + +Compiling the library and encoding tool: + ``` -./sstv-encode - -input (input image) type: string default: "" - -mode (SSTV mode for encoder) type: string default: "" - -output (output WAV file) type: string default: "" - -sample_rate (output audio sample rate) type: uint64 default: 48000 +cmake . +make ``` -## Install +This will generate the following files: +- `lib/libsstv.so` - dynamic linking version +- `include/libsstv.h` - C header file for library +- `bin/sstv-encode` - encoding tool -install dependencies (tested on devuan 4 chimaera - debian 11 bullseye based and debian 11 on raspberry pi): +If you want to skip building the encoding tool (and thus its dependencies) then you can do so by turning off the `BUILD_TOOLS` flag: ``` -sudo apt update -sudo apt install libgoogle-glog-dev libgflags-dev libmagick++-dev libsndfile1-dev make cmake +cmake . -DBUILD_TOOLS=OFF +make ``` -go to the `bin` folder, run cmake and then compile with make: + +Installation can be performed in the following manner: ``` -cd bin -cmake .. +cmake . -DCMAKE_INSTALL_PREFIX= make +make install +``` + +## Dependencies + +The library has no dependecies. + +Building the encoding tool requires `ImageMagick++` and `libsndfile`. + +To install these packages in Ubuntu: +``` +apt install libmagick++-dev libsndfile1-dev +``` + +To install these packages in ArchLinux: +``` +pacman -S imagemagick libsndfile ``` -now you can run `./sstv-encode` ## Acknowledgements -- cgit v1.2.3