You want to build the sources yourself? Great! This little guide will help you achieve just that.
- Prerequisites
- Windows
- Linux
- OSX
- How to build
- Build and run from sources
- Create redistribuable packages
- Keep your sources up-to-date
A few tools are required in order to build the sources:
- NodeJS (Javascript runtime engine):
nodejs >= 4.x.x
- NPM (NodeJS package ecosystem):
npm >= 3.x.x
- Git (Distributed revision control system):
git >= 2.x.x
You'll also need about 2000MB (~2GB) of free space.
Compatible platforms:
- Windows 7 and above
- Mac OSX 10.7 and above
- Linux: Arch, Debian 6 and above, Ubuntu 12.04 and above, Fedora 17 and above
- Download NodeJS: https://nodejs.org
- Install NodeJS and NPM (NPM is part of NodeJS)
- Update NPM: https://github.com/npm
- Download Git: https://git-for-windows.github.io
- Install Git BASH (you don't need Git GUI, but you can install it)
- Install NodeJS and NPM: https://nodejs.org
- Update NPM:
npm install -g npm@3
- Install Git via your package manager:
- Debian/Ubuntu/Mint/Elementary:
sudo apt-get install git
- Arch/Manjaro:
pacman -S git
- Fedora/RedHat/CentOS:
sudo yum install git
- Download NodeJS: https://nodejs.org
- Install NodeJS and NPM (NPM is part of NodeJS)
- Update NPM:
npm install -g npm@3
- Install Git: https://sourceforge.net
Now that the requirements are met, we can get the source code and build the application. All the following instructions happen in a console (git bash, gnome-terminal, ...)
-
Install
gulp
, the development task automation toolkit:npm install -g gulp-cli
-
Get the sources from the GitHub repository:
git clone https://github.com/butterproject/butter-desktop.git
-
Install the application dependencies:
npm install
-
Build the application with
gulp
:gulp build
Note: an unpacked build is available under the
/build/Butter/<platform>
directory -
Run the application from sources:
gulp run
Note: on old Linux distributions, see libudev.so.1 workaround.
Gulp
can automate the packing of redistribuable packages from the source code you built. You'll need a few more prerequisites if you want to produce .deb
or .exe
installers:
- NSIS (version 3): Allows to compile a Windows installer. Download it on Windows or Debian/Ubuntu. It is not available on OSX.
- dpkg-deb: Allows to compile .deb packages. Available only on Linux:
sudo apt-get install dpkg-deb fakeroot
To build the application redistribuable binaries, you can run:
gulp dist --platforms=all
With git
, you can stay up-to-date easily and track the upstream modifications. To update and run the application, simply use:
git pull
npm install
gulp build
gulp run