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 #154

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 90 additions & 11 deletions tutorials/01_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ Next Tutorial: \ref configuration

## Overview

Instructions to install Ignition Fuel Tools on all the platforms
supported: major Linux distributions, Mac OS X and Windows.
Instructions to install Ignition Fuel Tools on all the platforms supported.

## Ubuntu Linux
## Binary Install

### Ubuntu Linux

Setup your computer to accept software from
*packages.osrfoundation.org*:

```{.sh}
```
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
```

Expand All @@ -29,7 +30,7 @@ sudo apt-get update
sudo apt-get install libignition-fuel-tools5-dev
```

## Mac OS X
### Mac OS X

Ignition Fuel Tools and several of its dependencies can be compiled on OS
X with [Homebrew](http://brew.sh/) using the [osrf/simulation
Expand All @@ -54,11 +55,30 @@ brew tap osrf/simulation
brew install ignition-fuel-tools5
```

## Windows
### 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:

At this moment, Windows instructions are not available.
```
conda install libignition-fuel-tools<#> --channel conda-forge
```

## Install from sources (Ubuntu Linux)
Be sure to replace `<#>` with a number value, such as 1 or 2, depending on
which version you need.

## Source Install

### Ubuntu Linux

For compiling the latest version of Ignition Fuel Tools you will need an
Ubuntu distribution equal to 16.04 (Xenial) or newer.
Expand Down Expand Up @@ -139,14 +159,73 @@ modify your `LD_LIBRARY_PATH`:
echo "export LD_LIBRARY_PATH=<install_path>/local/lib:$LD_LIBRARY_PATH" >> ~/.bashrc
```

### Uninstalling Source-based Install
#### Uninstalling Source Install

If you need to uninstall Ignition Fuel Tools or switch back to a
Debian-based install when you currently have installed the library from
source, navigate to your source code directory's build folders and run
`make uninstall`:

\code
```
cd /tmp/ign-fuel-tools/build
sudo make uninstall
\endcode
```

### Windows

#### Prerequisites

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``).

Create if necessary, and activate a Conda environment:

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

Install dependencies:

```
conda install jsoncpp libzip --channel conda-forge
```

Install Ignition dependencies:

You can view available versions and their dependencies:

```
conda search libignition-fuel-tools* --channel conda-forge --info
```

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

```
conda install libignition-cmake<#> libignition-common<#> libignition-msgs<#> libignition-tools<#> --channel conda-forge
```

#### Building from source

1. Activate the Conda environment created in the prerequisites:
```
conda activate ign-ws
```
2. Navigate to where you would like to build the library, and clone the repository.
```
# Optionally, append `-b ign-fuel-tools#` (replace # with a number) to check out a specific version
git clone https://github.com/ignitionrobotics/ign-fuel-tools.git
```
3. Configure and build
```
cd ign-fuel-tools
mkdir build
cd build
cmake .. -DBUILD_TESTING=OFF # Optionally, -DCMAKE_INSTALL_PREFIX=path\to\install
cmake --build . --config Release
```
4. Optionally, install
```
cmake --install . --config Release
```