Update README to say how to build the desktop app

This commit is contained in:
David Baker 2016-12-09 18:29:06 +00:00
parent 3921aa4e54
commit f7cd5cb76f
1 changed files with 32 additions and 12 deletions

View File

@ -119,24 +119,44 @@ You can configure the app by copying `config.sample.json` to
Running as a Desktop app Running as a Desktop app
======================== ========================
In future we'll do an official distribution of Riot as an desktop app. Meanwhile, Riot can also be run as a desktop app, wrapped in electron. You can download a
there are a few options: pre-built version from https://riot.im/download/desktop/ or, if you prefer,
built it yourself.
@asdf:matrix.org points out that you can use nativefier and it just works(tm):
To run as a desktop app:
``` ```
sudo npm install nativefier -g npm install
nativefier https://riot.im/app/ npm install electron
node_modules/.bin/electron .
``` ```
krisa has a dedicated electron project at To build packages, use electron-builder. This is configured to output:
https://github.com/krisak/vector-electron-desktop (although you should swap out * dmg + zip for macOS
the 'vector' folder for the latest vector tarball you want to run. Get a * exe + nupkg for Windows
tarball from https://github.com/vector-im/vector-web/releases or build your own * deb for Linux
- see Building From Source above). But this can be customised by editing the `build` section of package.json
as per https://github.com/electron-userland/electron-builder/wiki/Options
There's also a (much) older electron distribution at https://github.com/stevenhammerton/vector-desktop See https://github.com/electron-userland/electron-builder/wiki/Multi-Platform-Build
for dependencies required for building packages for various platforms.
The only platform that can build packages for all three platforms is macOS:
```
brew install wine --without-x11
brew install mono
npm install
npm run build:electron
```
For other packages, use electron-builder manually. For example, to build a package
for 64 bit Linux:
```
npm install
npm run build
node_modules/.bin/build -l --x64
```
All electron packages go into `electron/dist/`
Development Development
=========== ===========