Skip to content

Commit 703169c

Browse files
committed
[skip travis] Updated install docs
1 parent 17a9373 commit 703169c

File tree

1 file changed

+59
-7
lines changed

1 file changed

+59
-7
lines changed

README.md

Lines changed: 59 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,28 +58,80 @@ describe("Basic test", () => {
5858

5959
# Installation
6060

61-
Running
61+
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.
62+
This setup will be enhanced in the future so no additional packages have to be installed on a target system.
63+
64+
Until then, the following tools / libraries need to be installed in order to use `nut.js`:
65+
66+
## Prerequisites
67+
68+
The installation process comes with a pre-built version of OpenCV for the respective target platform.
69+
It's not required to manually build or install OpenCV, but the installation process has some 3rd-party dependencies.
70+
71+
#### Windows
72+
73+
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.
74+
You can either set them up manually, or install them via npm:
6275

6376
```bash
64-
npm i @nut-tree/nut-js
77+
npm install --global windows-build-tools
6578
```
6679

6780
or
6881

6982
```bash
70-
yarn add @nut-tree/nut-js
83+
yarn global add windows-build-tools
7184
```
7285

73-
will install nut.js and its required dependencies.
86+
#### macOS
7487

75-
The installation process comes with a pre-built version of OpenCV for the respective target platform (via [opencv4nodejs](https://github.com/justadudewhohacks/opencv4nodejs)).
76-
It's not required to manually build OpenCV, but the installation process has some 3rd-party dependencies.
88+
On macOS, Xcode command line tools are required.
89+
You can install them by running
90+
```bash
91+
xcode-select --install
92+
```
93+
94+
#### Linux
95+
96+
Depending on your distribution, Linux setups may differ.
97+
98+
In general, `nut.js` requires
99+
100+
- Python 2
101+
- g++
102+
- make
103+
- libXtst
104+
- libPng
105+
106+
Installation on `*buntu` distributions:
107+
```bash
108+
sudo apt-get install build-essential python libxtst-dev libpng++-dev
109+
```
77110

78-
Please make sure to also install all required peer dependencies:
111+
Setups on other distributions might differ.
112+
113+
For reference, please see:
79114

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

118+
## Install `nut.js`
119+
120+
Running
121+
122+
```bash
123+
npm i @nut-tree/nut-js
124+
```
125+
126+
or
127+
128+
```bash
129+
yarn add @nut-tree/nut-js
130+
```
131+
132+
will install nut.js and its required dependencies.
133+
134+
83135
# Examples
84136

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

0 commit comments

Comments
 (0)