Desktop Application for delta.chat
If you are upgrading: please see UPGRADING.md
.
Click to expand
The application can be downloaded from the Releases
page. Here you'll find prebuilt releases for all supported platforms. See below for platform specific instructions. If you run into any problems please consult the Troubleshooting section below.
The primary distribution-independed way to install is to use the flatpak build. This is maintained in it's own repository, however a pre-built binary can be downloaded and installed from flathub which also has a setup guide for many Linux platforms.
WARNING: Currently the AUR package compiles from latest master. This can be more recent as the latest release, introduce new features but also new bugs.
If you have a AUR helper like yay installed, you can install it by running yay -S deltachat-desktop-git
and following the instruction in your terminal.
Otherwise you can still do it manually:
# Download the latest snapshot of the PKGBUILD
wget https://aur.archlinux.org/cgit/aur.git/snapshot/deltachat-desktop-git.tar.gz
# extract the archive and rm the archive file afterwards
tar xzfv deltachat-desktop-git.tar.gz && rm deltachat-desktop-git.tar.gz
# cd into extracted folder
cd deltachat-desktop-git
# build package
makepkg -si
# install package (you need to replace <version> with whatever version makepkg built)
sudo pacman -U deltachat-desktop-git-<version>.tar.xz
Simply install the .dmg
file as you do it with all other software on mac.
If you are getting an openssl error message at the first start up you need to install openssl.
$ brew install openssl
Get the code:
$ git clone https://github.com/deltachat/deltachat-desktop.git
$ cd deltachat-desktop
Install dependencies, there are two options:
- Use system-wide installed
libdeltachat.so
:
$ npm install --dc-system-lib=true
- Use the deltachat-core-rust code included as a git submodule in the deltachat-node bindings:
$ npm install
For both these see the instructions in the deltchat-node and deltachat-rust-core README files to set things up.
Build the app (only needed if the code has changed or if the app has never been built before):
$ npm run build
Start the application:
$ npm start
The configuration files and database are stored at application-config's default filepaths.
Each database is a sqlite file that represents the account for a given email address.
This module builds on top of deltachat-core-rust
, which in turn has external dependencies. Instructions below assumes a Linux system (e.g. Ubuntu 18.10).
If you get errors when running npm install
, they might be related to the build dependency rust
.
If rust
or cargo
is missing:
Follow the instruction on https://rustup.rs/ to install rust and cargo.
Then try running npm install
again.
Debug messages are disabled by default, enable them with the --log-debug
flag.
Flag | Effect |
---|---|
--log-debug |
Log debug messages |
--log-to-console |
Output the log to stout / chrome dev console |
--machine-readable-stacktrace |
Enable JSON stacktrace |
--no-color |
Disable colors in the output of main process |
The logs can be found in:
Linux: ~/.config/DeltaChat/logs/
Mac: ~/Library/Application\ Support/DeltaChat/logs
You can also access the log folder and the current log file under the View->Developer
menu:
The log files have the extension .log
, the file name represents the point in time the log started.
Basically the log files are tab separated csv
-files(also known as tsv
):
"2019-01-27T13:46:31.801Z" "main/deltachat" "INFO" [] "dc_get_info"
timestamp | location / module | level | stacktrace | arg1 | arg2 | ... |
---|---|---|---|---|---|---|
"2019-01-27T13:46:31.801Z" | "main/deltachat" | "INFO" | [] | "dc_get_info" | - | ... |
Some important folders and files:
├── _locales # translation files in xml and json
│ ├── _untranslated_en.json # can contain experimental language strings
│ └── languages.json # central file which keeps the human readable language
├── bin # various helper scripts
├── build # files needed only at build time
├── ci_scripts # scripts and dockerfiles used by the CI
├── images # image files used in conversations
├── index.js # entry point for the main process
├── jenkins # pipelines for building on Jenkins
names
├── scss # styelsheets which need preprocessing
├── src
│ ├── main # javascript for the main process
│ └── renderer # javascript for the renderer process
├── static
│ ├── bundle.js # javascript bundle built by webpack
│ ├── conversations.css # css bundle built from conversations scss files
│ ├── fonts # fonts
│ ├── main.css # main css file
│ └── main.html # main html file in renderer process
├── README_ASSETS # Images used in this readme file
├── test
│ ├── integration # integration tests
│ └── unit # unit tests
├── .travis.yml # build script for Travis
├── .tx # configuration for Transifex
└── webpack.config.js # configuration for webpack
While developing the following command will build the app and start electron
in debug mode with http cache disabled:
$ npm run dev
It's also handy to run this watch command in a separate terminal
$ npm run watch
Sometimes you need to add new language strings, but don't want to push them to
transifex immediately because it's unsure if the string will be adjusted in the
short future or it's unclear if the pr will even get merged or you simply don't
have push rights to the transifex language repo. To still be able to implement
new language strings, you can add them to the _locales/_untranslated_en.json
file. You can also overload every other language string if you need to.
The syntax is the exact same as for all other _locales/*.json
files.
Example:
{"foobar_desktop": {"message": "This is a test"}}
Tipp: run with
--translation-watch
(included innpm start
) to start in translation watch mode - which watches the experimental language strings and hot reloads them into dc-desktop on save
Running npm test
does the following:
- runs
standard
as code linter - runs the unit tests
Running npm run test-integration
executes the integration tests.
Make sure you specify the enviroment variables DC_ADDR
and DC_MAIL_PW
before running the integration tests.
The integration tests use spectron
and tape
. They click through the app, taking screenshots and comparing each one to a reference. Why screenshots?
- Ad-hoc checking makes the tests a lot more work to write
- Even diffing the whole HTML is not as thorough as screenshot diffing. For example, it wouldn't catch an bug where hitting ESC from a video doesn't correctly restore window size.
- Chrome's own integration tests use screenshot diffing iirc
- Small UI changes will break a few tests, but the fix is as easy as deleting the offending screenshots and running the tests, which will recreate them with the new look.
- The resulting Github PR will then show, pixel by pixel, the exact UI changes that were made! See https://github.com/blog/817-behold-image-view-modes
For MacOS, you'll need a Retina screen for the integration tests to pass. Your screen should have the same resolution as a 2016 12" Macbook.
For Windows, you'll need Windows 10 with a 1366x768 screen.
When running integration tests, keep the mouse on the edge of the screen and don't touch the mouse or keyboard while the tests are running.
Install the transifex-client and get added to the Delta Chat App
project.
And periodically we can run the following command to get the new translation strings from translators:
npm run update-translations
When you need to modify language strings, this should be done in _locales/en.xml
. Run the following command to sync with Transifex:
tx push --source
For Continuous Integration we currently use Travis.
- Create a draft release on github, e.g.
vX.Y.Z
. - Change
version
field inpackage.json
toX.Y.Z
. - Update, commit and push
static/chat.delta.desktopp.appdata.xml
with the new release information. - Regenerate
package-lock.json
usingnpm install
, commit and push modifiedpackage.json
andpackage-lock.json
(repeat until release is ready). - Once done, publish the release on github, which will create the tag.
- File an issue at https://github.com/flathub/chat.delta.desktop/issues to make a new release.
Also see https://www.electron.build/configuration/publish
Licensed under GPL-3.0-or-later
, see LICENSE file for details.
Copyright © 2019
DeltaChat
contributors.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.