Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Windows installation; move installation in README to tutorial #146

Merged
merged 13 commits into from
Jan 21, 2021
70 changes: 1 addition & 69 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@ encoding/decoding to thread pools.

[Install](#install)

* [Binary Install](#binary-install)

* [Source Install](#source-install)

* [Prerequisites](#prerequisites)

* [Building from Source](#building-from-source)

[Usage](#usage)

[Documentation](#documentation)
Expand Down Expand Up @@ -68,67 +60,7 @@ callback system.

# Install

We recommend following the [Binary Install](#binary-install) instructions to get up and running as quickly and painlessly as possible.

The [Source Install](#source-install) instructions should be used if you need the very latest software improvements, you need to modify the code, or you plan to make a contribution.

## Binary Install

On Ubuntu systems, `apt-get` can be used to install `ignition-common`:

```
sudo apt install libignition-common<#>-dev
```

Be sure to replace `<#>` with a number value, such as 2 or 3, depending on
which version you need.

## Source Install

Source installation can be performed in UNIX systems by first installing the
necessary prerequisites followed by building from source.

### Prerequisites

Ignition Common requires:

* [Ignition CMake](https://ignitionrobotics.org/libs/cmake)
* [Ignition Math](https://ignitionrobotics.org/libs/math).

The Graphics component requires:

* [FreeImage](http://freeimage.sourceforge.net/)
* [GTS](http://gts.sourceforge.net/).

The AV component requires:

* [libswscale](https://www.ffmpeg.org/libswscale.html)
* [libavdevice](https://www.ffmpeg.org/libavdevice.html)
* [libavformat](https://www.ffmpeg.org/libavformat.html)
* [libavcodec](https://www.ffmpeg.org/libavcodec.html)
* [libavutil](https://www.ffmpeg.org/libavutil.html)

### Building from source

1. Clone the repository

```
git clone https://github.com/ignitionrobotics/ign-common
```

2. Install the [Prerequisites](#prerequisites).

3. Configure and build

```
cd ign-common; mkdir build;cd build; cmake ..; make
```

4. Optionally, install Ignition Common

```
sudo make install
```
See the [installation tutorial](https://ignitionrobotics.org/api/common/3.9/tutorials.html).

# Usage

Expand Down
1 change: 1 addition & 0 deletions tutorials.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Ignition @IGN_DESIGNATION_CAP@ library and how to use the library effectively.

**The tutorials**

1. \subpage install "Installation"
1. \subpage profiler "Profiler"

## License
Expand Down
150 changes: 150 additions & 0 deletions tutorials/install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
\page install Installation

Next Tutorial: \ref profiler

# Install

These instructions are for installing only Ignition Common.
If you're interested in using all the Ignition libraries, check out this [Ignition installation](https://ignitionrobotics.org/docs/latest/install).

We recommend following the Binary Install instructions to get up and running as quickly and painlessly as possible.

The Source Install instructions should be used if you need the very latest software improvements, you need to modify the code, or you plan to make a contribution.

## Binary Install

### Ubuntu

On Ubuntu systems, `apt-get` can be used to install `ignition-common`:

```
sudo apt install libignition-common<#>-dev
```

Be sure to replace `<#>` with a number value, such as 2 or 3, depending on
which version you need.

### Windows

Install [Conda package management system](https://docs.conda.io/projects/conda/en/latest/user-guide/install/download.html).
Miniconda suffices.

Create if necessary, and activate a Conda environment:

```
conda create -n ign-ws
conda activate ign-ws
```

Install `ignition-common`:

```
conda install libignition-common<#> --channel conda-forge
```

Be sure to replace `<#>` with a number value, such as 1 or 2, depending on
which version you need.

## Source Install

Source installation can be performed by first installing the necessary
prerequisites followed by building from source.

### Prerequisites

Ignition Common requires:

* [Ignition CMake](https://ignitionrobotics.org/libs/cmake)
* [Ignition Math](https://ignitionrobotics.org/libs/math).

The Graphics component requires:

* [FreeImage](http://freeimage.sourceforge.net/)
* [GTS](http://gts.sourceforge.net/).

The AV component requires:

* [libswscale](https://www.ffmpeg.org/libswscale.html)
* [libavdevice](https://www.ffmpeg.org/libavdevice.html)
* [libavformat](https://www.ffmpeg.org/libavformat.html)
* [libavcodec](https://www.ffmpeg.org/libavcodec.html)
* [libavutil](https://www.ffmpeg.org/libavutil.html)

#### Windows

First, follow the [ign-cmake](https://github.com/ignitionrobotics/ign-cmake) tutorial for installing Conda, Visual Studio, CMake, etc., prerequisites, and creating a Conda environment.

Navigate to ``condabin`` if necessary to use the ``conda`` command (i.e., if Conda is not in your `PATH` environment variable. You can find the location of ``condabin`` in Anaconda Prompt, ``where conda``).

Activate the Conda environment:

```
conda activate ign-ws
```

Install prerequisites:

```
conda install freeimage gts glib dlfcn-win32 ffmpeg --channel conda-forge
```

Install Ignition dependencies:

You can view available versions and their dependencies:

```
conda search libignition-common* --channel conda-forge --info
```

Install dependencies, replacing `<#>` with the desired versions:

```
conda install libignition-cmake<#> libignition-math<#> --channel conda-forge
```

### Building from source

#### Ubuntu

1. Clone the repository

```
git clone https://github.com/ignitionrobotics/ign-common
```

1. Configure and build

```
cd ign-common; mkdir build;cd build; cmake ..; make
mabelzhang marked this conversation as resolved.
Show resolved Hide resolved
```

1. Optionally, install Ignition Common

```
sudo make install
```

#### Windows

1. Navigate to where you would like to build the library, and clone the repository.

```
# Optionally, append `-b ign-common#` (replace # with a number) to check out a specific version
git clone https://github.com/ignitionrobotics/ign-common.git
```

1. Configure and build

```
cd ign-common
mkdir build
cd build
cmake .. -DBUILD_TESTING=OFF # Optionally, -DCMAKE_INSTALL_PREFIX=path\to\install
cmake --build . --config Release
```

1. Optionally, install

```
cmake --install . --config Release
```