6.3 KiB
Improve development guide
Development setup
This is a guide to running the Zulip desktop app from a source tree, in order to contribute to developing it. The Zulip electron development environment can be installed on macOS, Windows, and Linux (Debian or Ubuntu recommended). You’ll need at least 2GB of available RAM. Installing the Zulip electron development environment requires downloading several hundred megabytes of dependencies, so you will need an active, reasonably fast, internet connection throughout the entire installation processes.
Set up Git & GitHub
You can skip this step if you already have Git, GitHub.
Follow our Git Guide in order to install Git, set up a GitHub account
Install Prerequisites
Jump to:
MacOS
Node JS
Go to the Node.js Downloads page. Download Node.js for MacOS (v6.9.0 or above recommended). Run the downloaded Node.js .pkg Installer. You're finished! To ensure Node.js has been installed, run node -v in your terminal - you should get something like v6.9.0 or above
if NPM and node-gyp don't come bundled with your Node.js installation, Download manually
Now you are ready for next step : Get Zulip Desktop Code.
Ubuntu/Debian
If you’re in a hurry, you can copy and paste the following into your terminal
sudo apt install git nodejs node-gyp python build-essential snapcraft libxext-dev libxtst-dev lib xkbfile-dev libgconf-2-4
after pasting you can jump to next step : Get Zulip Desktop Code.
For a step-by-step explanation, read on.
-
Node JS
$ sudo apt-get install nodejs -
Install Node-gyp
-
Python (v2.7.x recommended)
$ sudo apt install python2.7 -
C++ compiler compatible with C++11
$ sudo apt install build-essential -
Snapcraft
$ sudo apt install snapcraft -
Development headers
$ sudo apt install libxext-dev libxtst-dev libxkbfile-dev libgconf-2-4
if NPM don't come bundled with your Node.js installation, Download manually
Now you are ready for next step : Get Zulip Desktop Code.
Windows
Node JS
Go to the Node.js Downloads page. Download Node.js for windows (v6.9.0 or above recommended). Run the downloaded Node.js .msi Installer. You're finished! To ensure Node.js has been installed, run node -v in your terminal - you should get something like v6.9.0 or above
Followings are optional yet recommended prerequisites -
Cmder
- Download the latest release
- Extract the archive. Note: This path should not be
C:\Program Filesor anywhere else that would require Administrator access for modifying configuration files - (optional) Place your own executable files into the
%cmder_root%\binfolder to be injected into your PATH. - Run
Cmder.exe
Chocolatey You can download chocolatey from here https://chocolatey.org/ and for Installing Chocolatey on your machine follow this steps
- First, ensure that you are using an administrative shell.
- Copy the text specific to your command shell - cmd.exe or powershell.exe.
- Paste the copied text into your shell and press Enter.
- Wait a few seconds for the command to complete.
- If you don't see any errors, you are ready to use Chocolatey! Type
chocoorchoco -?
System specific dependencies
- use only 32bit or 64bit for all of the installers, do not mix architectures
- install using default settings
- open Windows Powershell as Admin and paste this C:\Windows\system32> npm install --global --production windows-build-tools
if NPM and node-gyp don't come bundled with your Node.js installation, Download manually
Now you are ready for next step : Get Zulip Desktop Code.
Get Zulip Desktop Code
- In your browser, visit https://github.com/zulip/zulip-desktop and click the
forkbutton. You will need to be logged in to GitHub to do this. - Open Terminal (macOS/Ubuntu) or Git BASH (Windows; must run as an Administrator).
- In Terminal/Git BASH, clone your fork of the zulip-desktop repository and connect the zulip-desktop upstream repository
Clone to your machine
-
On GitHub, navigate to the main page of your fork repository.
-
Under the repository name, click Clone or download.
-
In the Clone with HTTPs section, click to copy the clone URL for the repository.
-
Open Terminal, Change the current working directory to the location where you want the cloned directory to be made.
git clone https://github.com/YOURUSERNAME/zulip-desktop.git
Don’t forget to replace YOURUSERNAME with your git username
Connect your fork to zulip-desktop upstream
cd zulip-desktop
git remote add -f upstream https://github.com/zulip/zulip-desktop.git
build and run
Install project dependencies:
$ npm install
There two ways to start the app:
vanilla method
$ npm start
start and watch changes recommended for dev’s
$ npm run dev