Skip to content

Commit 605d24e

Browse files
authored
Merge pull request #91 from lgeiger/readme-electron
Update installation instructions
2 parents 4e7761f + 7e1196a commit 605d24e

File tree

1 file changed

+42
-10
lines changed

1 file changed

+42
-10
lines changed

README.md

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# zeromq
22

33
[![codecov](https://codecov.io/gh/zeromq/zeromq.js/branch/master/graph/badge.svg)](https://codecov.io/gh/zeromq/zeromq.js)
4-
[![](https://img.shields.io/badge/version-latest-blue.svg)](https://github.com/nteract/zmq-prebuilt)
4+
[![](https://img.shields.io/badge/version-latest-blue.svg)](https://github.com/zeromq/zeromq.js)
55
[![Build Status](https://travis-ci.org/zeromq/zeromq.js.svg?branch=master)](https://travis-ci.org/zeromq/zeromq.js)
66
[![Build status](https://ci.appveyor.com/api/projects/status/6u7saauir2msxpou?svg=true)](https://ci.appveyor.com/project/zeromq/zeromq.js)
7-
[![](https://img.shields.io/badge/version-stable-blue.svg)](https://github.com/nteract/zmq-prebuilt/releases/tag/v1.4.0)
7+
[![](https://img.shields.io/badge/version-stable-blue.svg)](https://github.com/zeromq/zeromq.js/releases)
88
[![Build Status](https://travis-ci.org/nteract/zmq-prebuilt-testing.svg?branch=master)](https://travis-ci.org/nteract/zmq-prebuilt-testing)
99
[![Build status](https://ci.appveyor.com/api/projects/status/ox85p208tsxw6vt1?svg=true)](https://ci.appveyor.com/project/nteract/zmq-prebuilt-testing)
1010

11-
[**Users**](#installation--users) | [**Contributors and Development**](#installation---contributors-and-development) | [**Maintainers**](#for-maintainers-creating-a-release)
11+
[**Users**](#installation---users) | [**From Source**](#installation---from-source) | [**Contributors and Development**](#installation---contributors-and-development) | [**Maintainers**](#for-maintainers-creating-a-release)
1212

1313
**zeromq**: Your ready to use, prebuilt [ØMQ](http://www.zeromq.org/)
1414
bindings for [Node.js](https://nodejs.org/en/).
@@ -40,25 +40,26 @@ npm install zeromq
4040

4141
Now, prepare to be amazed by the wonders of binaries.
4242

43+
## Installation - From Source
4344

44-
## Installation - Contributors and Development
45+
If you want to use `zeromq` inside your [Electron](http://electron.atom.io/) application
46+
or if you are working on a Linux 32-bit system, you have to build `zeromq` from source.
4547

46-
To set up `zeromq` for development, fork this repository and
47-
clone your fork to your system.
48+
### Prerequisites
4849

49-
**Prerequisites for Linux**
50+
**Linux**
5051
- `python` (`v2.7` recommended, `v3.x.x` is not supported)
5152
- `make`
5253
- A proper C/C++ compiler toolchain, like [GCC](https://gcc.gnu.org/)
5354

5455
Use your distribution's package manager to install.
5556

56-
**Prerequisites for macOS**
57+
**macOS**
5758

5859
- `python` (`v2.7` recommended, `v3.x.x` is not supported): already installed on Mac OS X
5960
- `Xcode Command Line Tools`: Can be installed with `xcode-select --install`
6061

61-
**Prerequisites for Windows**
62+
**Windows**
6263

6364
- **Option 1:** Install all the required tools and configurations using Microsoft's [windows-build-tools](https://github.com/felixrieseberg/windows-build-tools) by running `npm install -g windows-build-tools` from an elevated PowerShell (run as Administrator).
6465
- **Option 2:** Install dependencies and configuration manually
@@ -72,7 +73,38 @@ Use your distribution's package manager to install.
7273
3. Launch cmd, `npm config set msvs_version 2015`
7374

7475

75-
**Installation**
76+
### Installation
77+
78+
Now you can install `zeromq` with the following:
79+
80+
```bash
81+
npm install zeromq
82+
```
83+
84+
85+
### Rebuilding for Electron
86+
87+
If you want to use `zeromq` inside your [Electron](http://electron.atom.io/) application
88+
it needs to be rebuild against Electron headers.
89+
90+
We highly recommend [`electron-builder`](https://github.com/electron-userland/electron-builder)
91+
which handles this automatically.
92+
93+
If you don't want to use `electron-builder` you can rebuild `zeromq` manually by running:
94+
```
95+
npm rebuild zeromq --runtime=electron --target=1.4.5 --disturl=https://atom.io/download/atom-shell --build-from-source
96+
```
97+
Where `target` is your desired Electron version.
98+
99+
You can find more information on the [Electron website](http://electron.atom.io/docs/tutorial/using-native-node-modules/).
100+
101+
102+
## Installation - Contributors and Development
103+
104+
To set up `zeromq` for development, fork this repository and
105+
clone your fork to your system.
106+
107+
Make sure you have the required [dependencies for building `zeromq` from source](#installation---from-source) installed.
76108

77109
Install a development version of `zeromq` with the following:
78110

0 commit comments

Comments
 (0)