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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ which can be used to add custom widgets.

[Documentation](#documentation)

[Testing](#testing)

[Folder Structure](#folder-structure)

[Code of Conduct](#code-of-conduct)
Expand Down Expand Up @@ -87,6 +89,61 @@ export IGN_CONFIG_PATH=$HOME/.ignition/tools/configs

This issue is tracked [here](https://github.com/ignitionrobotics/ign-tools/issues/8).

# Documentation

API documentation and tutorials can be accessed at
[https://ignitionrobotics.org/libs/gui](https://ignitionrobotics.org/libs/gui)

You can also generate the documentation from a clone of this repository by following these steps.

1. You will need [Doxygen](http://www.doxygen.org/). On Ubuntu Doxygen can be installed using

```
sudo apt-get install doxygen
```

2. Clone the repository

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

3. Configure and build the documentation.

```
cd ign-gui
mkdir build
cd build
cmake ../
make doc
```

4. View the documentation by running the following command from the `build` directory.

```
firefox doxygen/html/index.html
```

# Testing

Follow these steps to run tests and static code analysis in your clone of this repository.

1. Follow the [source install instruction](#source-install).

2. Run tests.

```
make test
```

3. Static code checker.

```
make codecheck
```

See the [Writing Tests section of the contributor guide](https://ignitionrobotics.org/docs/all/contributing#writing-tests) for help creating or modifying tests.

# Folder Structure

* `include/ignition/gui`: Contains all the files which will be installed, such as
Expand Down
79 changes: 45 additions & 34 deletions tutorials/01_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,15 @@ Install Ignition GUI:
Be sure to replace `<#>` with a number value, such as 1 or 2, depending on
which version you need.

### Windows

Binary install is pending ``ignition-rendering`` and ``ignition-gui`` being added to conda-forge.

## Source Install

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

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

Add OSRF packages:

Expand All @@ -75,8 +79,7 @@ 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 from source

Build and install as follows:

Expand All @@ -87,58 +90,66 @@ Build and install as follows:
make -j4
sudo make install

# Documentation
### Windows

#### Install 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 qt --channel conda-forge
```

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

API documentation and tutorials can be accessed at
[https://ignitionrobotics.org/libs/gui](https://ignitionrobotics.org/libs/gui)
```
conda install libignition-cmake<#> libignition-common<#> libignition-math<#> libignition-transport<#> libignition-msgs<#> libignition-plugin<#> libignition-tools<#> --channel conda-forge
```

You can also generate the documentation from a clone of this repository by following these steps.
Before [ign-rendering](https://github.com/ignitionrobotics/ign-rendering) becomes available on conda-forge, follow its tutorial to build it from source.

1. You will need [Doxygen](http://www.doxygen.org/). On Ubuntu Doxygen can be installed using
#### Build from source

1. Activate the Conda environment created in the prerequisites:

```
sudo apt-get install doxygen
conda activate ign-ws
```

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

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

3. Configure and build the documentation.
1. Configure and build

```
cd ign-gui
mkdir build
cd build
cmake ../
make doc
```

4. View the documentation by running the following command from the `build` directory.

```
firefox doxygen/html/index.html
```

# Testing

Follow these steps to run tests and static code analysis in your clone of this repository.

1. Follow the [source install instruction](#source-install).

2. Run tests.
Before ``ign-rendering`` becomes available on conda-forge, we need to build it from source and specify the path containing ``ignition-rendering<#>-config.cmake`` and ``ignition-rendering<#>-ogre-config.cmake`` in ``CMAKE_PREFIX_PATH``. That path could be ``ign-rendering-install-path\lib\cmake``, for example.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Before ``ign-rendering`` becomes available on conda-forge, we need to build it from source and specify the path containing ``ignition-rendering<#>-config.cmake`` and ``ignition-rendering<#>-ogre-config.cmake`` in ``CMAKE_PREFIX_PATH``. That path could be ``ign-rendering-install-path\lib\cmake``, for example.
As``ign-rendering`` is not available on conda-forge, we need to build it from source and specify the path containing ``ignition-rendering<#>-config.cmake`` and ``ignition-rendering<#>-ogre-config.cmake`` in ``CMAKE_PREFIX_PATH``. That path could be ``ign-rendering-install-path\lib\cmake``, for example.


```
make test
cmake .. -DBUILD_TESTING=OFF -DCMAKE_PREFIX_PATH=path\containing\ignition-rendering-config # Optionally, -DCMAKE_INSTALL_PREFIX=path\to\install
cmake --build . --config Release
```

3. Static code checker.
1. Optionally, install

```
make codecheck
cmake --install . --config Release
```

See the [Writing Tests section of the contributor guide](https://ignitionrobotics.org/docs/all/contributing#writing-tests) for help creating or modifying tests.