Skip to content

Commit 29578e7

Browse files
johanjinogarethsb
andauthored
Add Installation Guide for nmos-cpp Using Conan (#386)
* Documentation to Install nmos-cpp with Conan 2 * Reformatting - Added Linux equivalents - Fixed typos Co-authored-by: Gareth Sylvester-Bradley <[email protected]> * Added and Verified Linux commands for direct deploy - direct deploy Linux equivalent commands added - Fixed formatting of %USERNAME% * Add link to Tutorial * Omit workaround for bindirs issue that will be fixed soon * Link to Installation-with-Conan.md * Mention installing Python 3... could link to Dependencies.md#conan as well? --------- Co-authored-by: Gareth Sylvester-Bradley <[email protected]> Co-authored-by: Gareth Sylvester-Bradley <[email protected]>
1 parent 7949ab5 commit 29578e7

File tree

2 files changed

+76
-1
lines changed

2 files changed

+76
-1
lines changed

Documents/Installation-with-Conan.md

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
## Install nmos-cpp Using Conan
2+
3+
The following steps describe how to install and set up nmos-cpp using the Conan package manager.
4+
For many platforms, a binary package is available from Conan Center Index so it isn't necessary to build nmos-cpp or any of its dependencies.
5+
6+
1. Install conan:
7+
```sh
8+
pip install --upgrade conan~=2.0.5
9+
```
10+
11+
`pip` is the package installer for Python. Install Python 3 if necessary.
12+
13+
If the python Scripts directory is not on the PATH you will get a warning like:
14+
> WARNING: The script conan.exe is installed in 'C:\Users\\%USERNAME%\\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\Scripts' which is not on PATH.
15+
> Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
16+
17+
On Windows, you can use _System Properties \> Environment Variables..._ to permanently add the directory to the user PATH. Restart the Command Prompt and run `conan --help` to ensure Conan is found.
18+
19+
2. Detect profile:
20+
```sh
21+
conan profile detect
22+
```
23+
This will create a Conan profile with values based on your current platform, compiler, etc.
24+
Ideally the profile should be similar to these:
25+
26+
Windows
27+
```ini
28+
[settings]
29+
arch=x86_64
30+
build_type=Release
31+
compiler=msvc
32+
compiler.cppstd=14
33+
compiler.runtime=dynamic
34+
compiler.version=193
35+
os=Windows
36+
```
37+
Linux
38+
```ini
39+
[settings]
40+
arch=x86_64
41+
build_type=Release
42+
compiler=gcc
43+
compiler.cppstd=17
44+
compiler.version=11
45+
os=Linux
46+
```
47+
48+
3. Install nmos-cpp:
49+
```sh
50+
conan install --tool-requires=nmos-cpp/cci.20240223
51+
```
52+
This installs the **nmos-cpp-registry** and **nmos-cpp-node** applications in the Conan cache, and generates a script to make these executables available in the current session.
53+
On Windows, run `.\conanbuild.bat` to add the install directory to the PATH.
54+
On Linux, run `./conanbuild.sh`.
55+
56+
Alternatively the nmos-cpp installation can be copied to the current working directory using a Conan deployer:
57+
```sh
58+
conan install --requires=nmos-cpp/cci.20240223 --deployer=direct_deploy
59+
```
60+
61+
On Windows, the executables are then found in the _.\direct_deploy\nmos-cpp\bin\Release_ directory.
62+
On Linux, the executables are found in the _./direct_deploy/nmos-cpp/bin_ directory.
63+
64+
4. Try starting nmos-cpp-registry and/or nmos-cpp-node:
65+
```sh
66+
nmos-cpp-registry
67+
```
68+
or
69+
```sh
70+
nmos-cpp-node
71+
```
72+
For more information about running these applications and the JSON configuration file that can be passed on the command-line, see the [tutorial](Tutorial.md).

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ Some information about the overall design of **nmos-cpp** is also included in th
3333
### Getting Started With NMOS
3434

3535
The [Easy-NMOS](https://github.com/rhastie/easy-nmos) starter kit allows the user to launch a simple NMOS setup with minimal installation steps.
36-
It relies on nmos-cpp to provide an NMOS Registry and a virtual NMOS Node in a Docker Compose network, along with the AMWA NMOS Testing Tool and supporting services.
36+
It relies on a containerized nmos-cpp build to provide an NMOS Registry and a virtual NMOS Node in a Docker Compose network, along with the AMWA NMOS Testing Tool and supporting services.
37+
38+
Alternatively, it is possible to install a pre-built package for many platforms.
39+
See the instructions for [installing with Conan](Documents/Installation-with-Conan.md).
3740

3841
### Getting Started For Developers
3942

0 commit comments

Comments
 (0)