Skip to content

Commit

Permalink
[skip travis] Updated install docs
Browse files Browse the repository at this point in the history
  • Loading branch information
s1hofmann committed May 22, 2019
1 parent 17a9373 commit 703169c
Showing 1 changed file with 59 additions and 7 deletions.
66 changes: 59 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,80 @@ describe("Basic test", () => {

# Installation

Running
While `nut.js` comes with a pre-built version of OpenCV for your respective target platform, it currently still requires some 3rd-party dependencies to generate `node` bindings.
This setup will be enhanced in the future so no additional packages have to be installed on a target system.

Until then, the following tools / libraries need to be installed in order to use `nut.js`:

## Prerequisites

The installation process comes with a pre-built version of OpenCV for the respective target platform.
It's not required to manually build or install OpenCV, but the installation process has some 3rd-party dependencies.

#### Windows

In order to install `nut.js` on Windows, [Windows Build Tools](https://www.microsoft.com/en-us/download/details.aspx?id=48159) and [Python 2](https://www.python.org/downloads/windows/) are required.
You can either set them up manually, or install them via npm:

```bash
npm i @nut-tree/nut-js
npm install --global windows-build-tools
```

or

```bash
yarn add @nut-tree/nut-js
yarn global add windows-build-tools
```

will install nut.js and its required dependencies.
#### macOS

The installation process comes with a pre-built version of OpenCV for the respective target platform (via [opencv4nodejs](https://github.com/justadudewhohacks/opencv4nodejs)).
It's not required to manually build OpenCV, but the installation process has some 3rd-party dependencies.
On macOS, Xcode command line tools are required.
You can install them by running
```bash
xcode-select --install
```

#### Linux

Depending on your distribution, Linux setups may differ.

In general, `nut.js` requires

- Python 2
- g++
- make
- libXtst
- libPng

Installation on `*buntu` distributions:
```bash
sudo apt-get install build-essential python libxtst-dev libpng++-dev
```

Please make sure to also install all required peer dependencies:
Setups on other distributions might differ.

For reference, please see:

- [opencv4nodejs](https://github.com/justadudewhohacks/opencv4nodejs#how-to-install)
- [robotjs](http://robotjs.io/docs/building)

## Install `nut.js`

Running

```bash
npm i @nut-tree/nut-js
```

or

```bash
yarn add @nut-tree/nut-js
```

will install nut.js and its required dependencies.


# Examples

[nut-tree/trailmix](https://github.com/nut-tree/trailmix) contains a set of ready to use examples which demo the usage ot nut.js.
Expand Down

0 comments on commit 703169c

Please sign in to comment.