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

Windows installation via conda-forge #139

Merged
merged 16 commits into from
Jan 21, 2021
106 changes: 97 additions & 9 deletions tutorials/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,52 @@ Install Ignition CMake:
Be sure to replace `<#>` with a number value, such as 1 or 2, 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.

Open a Visual Studio Command Prompt (search for "x64 Native Tools Command Prompt for VS 2019" in the Windows search near the Start button).
Optionally, right-click and pin to the task bar for quick access in the future.

If you did not add Conda to your `PATH` environment variable during Conda installation, you may need to navigate to the location of `condabin` in order to use the `conda` command.
To find `condabin`, search for "Anaconda Prompt" in the Windows search near the Start button, open it, run `where conda`, and look for a line containing the directory `condabin`.

1. Navigate to your `condabin` if necessary, and then create and activate a Conda environment:

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

Once you have activated an environment, a prefix like `(ign-ws)` will be prepended to your prompt, and you can use the `conda` command outside of `condabin`.

You can use `conda info --envs` to see all your environments.

To remove an environment, use `conda env remove --name <env_name>`.

1. Install Ignition CMake:

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

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

You can view all the versions with

conda search libignition-cmake* --channel conda-forge

and view their dependencies with

conda search libignition-cmake* --channel conda-forge --info

and install a specific minor version with

conda install libignition-cmake=2.6.1 --channel conda-forge

## Source Install

### Prerequisites
### Ubuntu Bionic 18.04 or above

#### Ubuntu Bionic 18.04 or above
#### Prerequisites

Add OSRF packages:

Expand All @@ -60,6 +101,12 @@ Add OSRF packages:
wget http://packages.osrfoundation.org/gazebo.key -O - | apt-key add -
sudo apt-add-repository -s "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -c -s) main"

Only on Bionic, update the GCC compiler version:

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8 --slave /usr/bin/gcov gcov /usr/bin/gcov-8

#### Building from source

Clone source code:

# This checks out the `main` branch. You can append `-b ign-cmake#` (replace # with a number) to checkout a specific version
Expand All @@ -69,13 +116,6 @@ Install dependencies

sudo apt -y install $(sort -u $(find . -iname 'packages.apt') | tr '\n' ' ')

Only on Bionic, update the GCC compiler version:

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8 --slave /usr/bin/gcov gcov /usr/bin/gcov-8


### Building from source

Build and install as follows:

cd ign-cmake
Expand All @@ -85,6 +125,54 @@ Build and install as follows:
make -j4
sudo make install

### Windows 10

#### Prerequisites

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

1. Install [Visual Studio 2019](https://visualstudio.microsoft.com/downloads/).
The Community version is free for students, open-source contributors, and individuals.
Check "Desktop development with C++" in the "Workloads" tab, and uncheck "C++ CMake Tools". We will install `cmake` via Conda.

#### Building from source

Open a Visual Studio Command Prompt (search for "x64 Native Tools Command Prompt for VS 2019" in the search field near the Windows button).
Optionally, right-click and pin to the task bar for quick access in the future.

If you did not add Conda to your `PATH` environment variable during Conda installation, you may need to navigate to the location of `condabin` in order to use the `conda` command.
To find `condabin`, search for "Anaconda Prompt" in the search field near the Windows button, open it, run `where conda`, and look for a line containing the directory `condabin`.

1. Navigate to your `condabin` if necessary, and then create and activate a Conda environment:

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

Once you have activated an environment, a prefix like `(ign-ws)` will be prepended to your prompt, and you can use the `conda` command outside of `condabin`.

You can use `conda info --envs` to see all your environments.

To remove an environment, use `conda env remove --name <env_name>`.

1. Install dependencies

conda install git cmake pkg-config --channel conda-forge

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

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

1. Build. Tests do not build at this time, so we turn tests off.
JShep1 marked this conversation as resolved.
Show resolved Hide resolved

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

# Documentation

API documentation and tutorials can be accessed at
Expand Down