A glossy Matrix collaboration client for desktop.
Go to file
Michael Telatynski a0a9ec830c
Build & EV Sign Windows builds (#517
* Add way to provide apple ID and app password to notarise script

* Add utility to generate electron-builder.json for release & nightly builds

* Run Build & Test on staging too

* First attempt at build & deploy for macOS with signing and notarisation

* Fix quote mismatch

* use correct quotes

* add runs-on

* Fix inputs.mode usage

* remove quotes

* chmod +x

* Fix artifact paths

* Fix deploy condition

* Fix deploy condition

* Fix artifact path

* Iterate

* Fix workflow

* Fix env

* Iterate

* Fix missing env

* Fix version calculation

* Iterate

* Fix config not taking effect

* Update build_and_deploy.yaml

* Fix alignments

* delint

* Fix alignment

* Update build_macos.yaml

* Add ability to EV sign using eSigner CKA

* Initial work to build & sign Windows nightlies in CI

* Format

* Format

* Fix gha

* fix winSign

* Fix install command

* Add signtool to path

* Update build_and_deploy.yaml

* Fix quotes

* Test

* Fix comments

* Fix cmd

* Try again

* arg slashes

* Fix exe path

* Fix matrix strategy

* Use ampersand-call

* fwd slash ftw?

* ls *

* 🌲

* tree dist

* prepend path

* Specify /fd and /td to modern signtool

* /tr not /t for CKA

* Test signing

* missing comma

* 🤦‍♂️

* Fix wrong mv

* Lets sign

* Fix config gen

* Debug

* Fix typo

* Multiple drives why

* Try NVL sandbox creds

* Update

* Attempt to disable logger

* Try again

* Iterate

* Update build_macos.yaml

* Update build_and_deploy.yaml

* Update build_macos.yaml

* Update build_and_deploy.yaml

* Update build_and_deploy.yaml

* Try custom build of eSigner CKA

* Fix typos

* Update build_windows.yaml

* Update build_and_deploy.yaml

* Update build_windows.yaml

* Update build_and_deploy.yaml

* Fix symlinking

* Fix working-directory incantation

* exe

* remove debug

* Prettier

* Vendor check in SSL.com executable

* Download CKA from packages.element.io instead

* Use demo creds

* StrictMode

* Switch back to 0207 (unsigned)

* Fix call syntax

* Revert env inc

* Partial rollback

* Trace

* Trace less

* Fix CN being passed wrong

* DEBUG

* Debug 2

* Fix ConvertFrom-StringData

* 0214

* Test

* Test

* Untested

* Revert to 0207

* stash

* Try with 20230221

* Restore scripts/electron_winSign.js

* Prepare for merge

* Update build_windows.yaml

* Update build_and_deploy.yaml

* Restore .github/workflows/build_and_deploy.yaml

* Restore .github/workflows/build_and_deploy.yaml

* Fix bad restore
2023-02-22 13:51:19 +00:00
.github Build & EV Sign Windows builds (#517 2023-02-22 13:51:19 +00:00
build Update rebrand stub to run 'Element.exe' 2020-07-28 16:02:40 +01:00
debian/conf Build & Package signed Linux builds (#527) 2023-02-20 12:09:45 +00:00
dockerbuild Update to Node 16 (#441) 2022-11-07 18:49:46 +00:00
docs Format all files with prettier 2022-12-15 11:52:12 +00:00
element.io No more ehome config (#545) 2023-02-16 16:38:25 +00:00
hak Format all files with prettier 2022-12-15 11:52:12 +00:00
packages.element.io Format all files with prettier 2022-12-15 11:52:12 +00:00
res/img More icon updates 2020-07-15 13:50:00 +01:00
scripts Build & EV Sign Windows builds (#517 2023-02-22 13:51:19 +00:00
src Translated using Weblate (Japanese) 2023-02-16 10:33:34 +00:00
test Format all files with prettier 2022-12-15 11:52:12 +00:00
.eslintrc.js Format all files with prettier 2022-12-15 11:52:12 +00:00
.gitignore Enable strict mode on hak tsconfig (#483) 2022-12-14 10:47:35 +00:00
.prettierignore Format all files with prettier 2022-12-15 11:52:12 +00:00
.prettierrc.js Format all files with prettier 2022-12-15 11:52:12 +00:00
babel.config.js Format all files with prettier 2022-12-15 11:52:12 +00:00
CHANGELOG.md Prepare changelog for v1.11.23 2023-02-14 10:52:28 +00:00
LICENSE Initial commit 2019-12-06 13:07:37 +00:00
package.json Build & Package signed Linux builds (#527) 2023-02-20 12:09:45 +00:00
README.md Format all files with prettier 2022-12-15 11:52:12 +00:00
release_config.yaml Switch to new changelog generator 2021-08-03 18:13:25 +01:00
release.sh Simplify releases: consolidate scripts (#409) 2022-09-06 12:10:32 +01:00
tsconfig.json Format all files with prettier 2022-12-15 11:52:12 +00:00
yarn.lock Update jest monorepo to v29.4.3 (#537) 2023-02-17 10:44:50 +00:00

Build Static Analysis Weblate Quality Gate Status Vulnerabilities Bugs

Element Desktop

Element Desktop is a Matrix client for desktop platforms with Element Web at its core.

First Steps

Before you do anything else, fetch the dependencies:

yarn install

Fetching Element

Since this package is just the Electron wrapper for Element Web, it doesn't contain any of the Element Web code, so the first step is to get a working copy of Element Web. There are a few ways of doing this:

# Fetch the prebuilt release Element package from the element-web GitHub releases page. The version
# fetched will be the same as the local element-desktop package.
# We're explicitly asking for no config, so the packaged Element will have no config.json.
yarn run fetch --noverify --cfgdir ""

...or if you'd like to use GPG to verify the downloaded package:

# Fetch the Element public key from the element.io web server over a secure connection and import
# it into your local GPG keychain (you'll need GPG installed). You only need to to do this
# once.
yarn run fetch --importkey
# Fetch the package and verify the signature
yarn run fetch --cfgdir ""

...or either of the above, but fetching a specific version of Element:

# Fetch the prebuilt release Element package from the element-web GitHub releases page. The version
# fetched will be the same as the local element-desktop package.
yarn run fetch --noverify --cfgdir "" v1.5.6

If you only want to run the app locally and don't need to build packages, you can provide the webapp directory directly:

# Assuming you've checked out and built a copy of element-web in ../element-web
ln -s ../element-web/webapp ./

[TODO: add support for fetching develop builds, arbitrary URLs and arbitrary paths]

Building

Native Build

TODO: List native pre-requisites

Optionally, build the native modules, which include support for searching in encrypted rooms and secure storage. Skipping this step is fine, you just won't have those features.

Then, run

yarn run build

This will do a couple of things:

  • Run the setversion script to set the local package version to match whatever version of Element you installed above.
  • Run electron-builder to build a package. The package built will match the operating system you're running the build process on.

Docker

Alternatively, you can also build using docker, which will always produce the linux package:

# Run this once to make the docker image
yarn run docker:setup

yarn run docker:install
# if you want to build the native modules (this will take a while)
yarn run docker:build:native
yarn run docker:build

After running, the packages should be in dist/.

Starting

If you'd just like to run the electron app locally for development:

# Install electron - we don't normally need electron itself as it's provided
# by electron-builder when building packages
yarn add electron
yarn start

Config

If you'd like the packaged Element to have a configuration file, you can create a config directory and place config.json in there, then specify this directory with the --cfgdir option to yarn run fetch, eg:

mkdir myconfig
cp /path/to/my/config.json myconfig/
yarn run fetch --cfgdir myconfig

The config dir for the official Element app is in element.io. If you use this, your app will auto-update itself using builds from element.io.

Profiles

To run multiple instances of the desktop app for different accounts, you can launch the executable with the --profile argument followed by a unique identifier, e.g element-desktop --profile Work for it to run a separate profile and not interfere with the default one.

Alternatively, a custom location for the profile data can be specified using the --profile-dir flag followed by the desired path.

User-specified config.json

  • %APPDATA%\$NAME\config.json on Windows
  • $XDG_CONFIG_HOME/$NAME/config.json or ~/.config/$NAME/config.json on Linux
  • ~/Library/Application Support/$NAME/config.json on macOS

In the paths above, $NAME is typically Element, unless you use --profile $PROFILE in which case it becomes Element-$PROFILE, or it is using one of the above created by a pre-1.7 install, in which case it will be Riot or Riot-$PROFILE.

Translations

To add a new translation, head to the translating doc.

For a developer guide, see the translating dev doc.

translationsstatus

Report bugs & give feedback

If you run into any bugs or have feedback you'd like to share, please let us know on GitHub.

To help avoid duplicate issues, please view existing issues first (and add a +1) or create a new issue if you can't find it. Please note that this issue tracker is associated with the element-web repo, but is also applied to the code in this repo as well.