Compare commits

..

70 Commits

Author SHA1 Message Date
RiotRobot
cf2925853c v1.6.3 2020-06-04 15:19:33 +01:00
RiotRobot
e4aab36428 Prepare changelog for v1.6.3 2020-06-04 15:19:32 +01:00
RiotRobot
d106d23e2e Upgrade matrix-js-sdk to 6.2.0 2020-06-04 15:06:20 +01:00
RiotRobot
aaa3e71077 v1.6.3-rc.1 2020-06-02 13:58:27 +01:00
RiotRobot
b9d00395ed Prepare changelog for v1.6.3-rc.1 2020-06-02 13:58:26 +01:00
RiotRobot
00cf95e86b Upgrade matrix-js-sdk to 6.2.0-rc.1 2020-06-02 13:53:28 +01:00
Michael Telatynski
e56311fc06 Merge pull request #96 from vector-im/t3chguy/fix-save-as
Fix electron context menu copy/save-as
2020-06-01 17:09:03 +01:00
Travis Ralston
2e907b6e36 Merge pull request #97 from drlellinger/patch-1
Fixed error in README.md/User-specified config.json
2020-05-31 18:28:19 -06:00
drlellinger
c82c80a2e0 Fixed error in User-specified config.json
A / was missing
2020-05-31 18:25:26 +02:00
Michael Telatynski
20fb0f477b tidy comment
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-05-31 12:28:15 +01:00
Michael Telatynski
c6620735b4 Fix electron context menu copy/save-as
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-05-31 12:23:23 +01:00
Michael Telatynski
27b7db2b30 Merge pull request #92 from vector-im/t3chguy/modular-utm
Update Modular hosting link
2020-05-29 20:16:16 +01:00
Travis Ralston
d33ce95dd0 Merge pull request #91 from vector-im/travis/ipc-renderer
Enforce sandbox on all spawned BrowserWindow objects
2020-05-27 10:03:28 -06:00
Michael Telatynski
be30a2fbab Merge pull request #93 from vector-im/t3chguy/flush-on-update
Run before-quit on updates too to flush rageshake
2020-05-26 11:58:22 +01:00
Michael Telatynski
66d9204578 Run before-quit on updates too to flush rageshake
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-05-23 11:52:49 +01:00
Michael Telatynski
ba0518005e Update Modular hosting link
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-05-23 08:48:29 +01:00
RiotRobot
b543a2e496 Reset matrix-js-sdk back to develop branch 2020-05-22 14:22:01 +01:00
RiotRobot
91b4987d52 Merge branch 'master' into develop 2020-05-22 14:21:28 +01:00
RiotRobot
73b9dcbb89 v1.6.2 2020-05-22 14:21:03 +01:00
RiotRobot
460148e66c Prepare changelog for v1.6.2 2020-05-22 14:21:03 +01:00
Travis Ralston
a568d766b0 Merge pull request #87 from vector-im/travis/room-list-2
Enable new room list labs flag
2020-05-21 13:30:45 -06:00
Travis Ralston
9635047c49 Merge branch 'develop' into travis/room-list-2 2020-05-21 13:28:35 -06:00
Michael Telatynski
1d339123e7 Merge pull request #59 from vector-im/t3chguy/script
Add asar-webapp script
2020-05-21 10:58:48 +01:00
J. Ryan Stinnett
0f6a42e250 Merge pull request #50 from vector-im/dependabot/npm_and_yarn/acorn-6.4.1
Bump acorn from 6.4.0 to 6.4.1
2020-05-21 10:55:51 +01:00
J. Ryan Stinnett
6e7919c6a0 Merge pull request #89 from vector-im/travis/scaling-labs
Enable font scaling flag for nightly
2020-05-21 10:52:54 +01:00
Travis Ralston
0269501d4f Enforce sandbox on all spawned BrowserWindow objects
The docs (https://www.atom.pe/docs/api/sandbox-option/) say we should be using the browser-native `window.open` implementation, but in practice that appears very much false. Electron, no matter our set of options, appears to always make a hit to the ipcRenderer with `window.open` calls, causing the calling code to explode due to the sandbox making that impossible.

By using `app.enableSandbox()`, it puts the sandbox in place over all BrowserWindow objects, including the temporary ones which empirically are being created for `window.open`. We do not need to specify `sandbox: true` to the BrowserWindow with this approach, though uncommenting and therefore reintroducing the flag causes our lovely ipcRenderer error again.

As far as I can tell, the sandbox does actually get applied to the window though the fact that `sandbox: true` still does things despite the docs saying otherwise leaves me a bit uncomfortable.

Fixes https://github.com/vector-im/riot-web/issues/13719
2020-05-20 16:16:57 -06:00
Travis Ralston
9b9b2ee847 Enable font scaling flag for nightly 2020-05-20 10:08:43 -06:00
Travis Ralston
f9c8aa1753 Merge pull request #88 from vector-im/travis/irc-labs
Enable IRC UI labs flag in nightly
2020-05-19 15:00:38 -06:00
Travis Ralston
96d272f76b Enable IRC UI labs flag in nightly
For https://github.com/vector-im/riot-web/pull/13350
2020-05-19 14:58:46 -06:00
RiotRobot
3e8feef642 Reset matrix-js-sdk back to develop branch 2020-05-19 11:16:19 +01:00
RiotRobot
48ab056785 Merge branch 'master' into develop 2020-05-19 11:15:22 +01:00
RiotRobot
defac64eff v1.6.1 2020-05-19 11:14:58 +01:00
RiotRobot
4069800a92 Prepare changelog for v1.6.1 2020-05-19 11:14:58 +01:00
RiotRobot
89318e403a Upgrade matrix-js-sdk to 6.1.0 2020-05-19 11:11:17 +01:00
Travis Ralston
c3fde65a1b Enable new room list labs flag
See https://github.com/vector-im/riot-web/pull/13675
2020-05-14 14:28:43 -06:00
Michael Telatynski
829451c4c4 Merge pull request #86 from vector-im/t3chguy/update_help
Update help message to fix broken url to electron docs
2020-05-14 19:28:57 +01:00
RiotRobot
d391ce6202 v1.6.1-rc.1 2020-05-14 16:22:36 +01:00
RiotRobot
d71423181e Prepare changelog for v1.6.1-rc.1 2020-05-14 16:22:36 +01:00
RiotRobot
3f3e0213a7 Upgrade matrix-js-sdk to 6.1.0-rc.1 2020-05-14 16:22:05 +01:00
Michael Telatynski
1cd23edb80 Update help message to fix broken url to electron docs
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-05-14 11:27:26 +01:00
J. Ryan Stinnett
662aa56b4b Merge pull request #85 from vector-im/jryans/linter
Add CI scripts to install and link JS SDK
2020-05-12 10:55:40 +01:00
J. Ryan Stinnett
18f42311f5 Merge pull request #84 from vector-im/jryans/docker-xenial
Use Xenial as the build image's base distribution
2020-05-11 14:20:12 +01:00
J. Ryan Stinnett
7f7357573c Add CI scripts to install and link JS SDK
This installs and links the JS SDK to access ESLint rules and their deps. These
scripts are copied from the React SDK.

Part of https://github.com/vector-im/riot-web/issues/13584
2020-05-11 10:33:31 +01:00
J. Ryan Stinnett
70c239f8d8 Merge Seshat deps into a single apt-get 2020-05-07 17:46:19 +01:00
J. Ryan Stinnett
94d8df6c57 Merge pull request #83 from vector-im/jryans/gpg-keys
Persist GPG keys for Linux builds via Docker
2020-05-07 17:41:39 +01:00
J. Ryan Stinnett
5bca8b4c83 Remove test.sh 2020-05-07 15:08:01 +01:00
J. Ryan Stinnett
c1be3a760d Attempt libcurl3 2020-05-07 15:05:31 +01:00
J. Ryan Stinnett
933c6ee3e3 Use Xenial as the build image's base distribution
Since Xenial has the oldest glibc (2.23) of all the active distributions, this
attempts to construct a build image based on that. The Dockerfile here was built
by recursively expanding the `FROM` lines until reaching
`buildpack-deps:bionic-curl` and then changing that to `xenial`. Everything else
is the same.

Part of https://github.com/vector-im/riot-web/issues/13553
2020-05-07 14:45:29 +01:00
J. Ryan Stinnett
c2896a9caf Persist GPG keys for Linux builds via Docker
Each build command via Docker for Linux builds creates a separate writable layer
from scratch, so anything shared between commands needs to persist on the host.

This adds the container's GPG keys, so that the riot-web GPG key can be
imported in one step and verified in the next.

Fixes https://github.com/vector-im/riot-web/issues/13545
2020-05-07 13:55:21 +01:00
Michael Telatynski
eac3b284b1 Merge pull request #81 from vector-im/t3chguy/electron_app
Update README to mention profile support
2020-05-07 13:49:04 +01:00
Michael Telatynski
4c623dc55a s/riot-web/riot-desktop/ 2020-05-07 13:25:52 +01:00
J. Ryan Stinnett
e8b4ae90c4 Merge pull request #82 from vector-im/jryans/debian-upgrade-path
Remove Conflicts from riot-desktop
2020-05-07 11:41:34 +01:00
J. Ryan Stinnett
a0c3295eed Remove Conflicts from riot-desktop
Some early testing suggests removing this will allow the install of the riot-web
transitional package to proceed.

Part of https://github.com/vector-im/riot-web/issues/13509
2020-05-07 11:29:38 +01:00
Michael Telatynski
69b8cfe353 Update README
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-05-06 11:19:08 +01:00
RiotRobot
f9e126cb16 Merge branch 'master' into develop 2020-05-05 11:09:22 +01:00
RiotRobot
8681dce16f Merge branch 'release-v1.6.0' 2020-05-05 11:08:43 +01:00
J. Ryan Stinnett
ee12d02d57 Merge pull request #79 from vector-im/jryans/add-default-distro
Add a default Linux distribution
2020-04-28 17:40:42 +01:00
J. Ryan Stinnett
d229c4a727 Add a default Linux distribution
This adds a default Linux distribution which we'll suggest everyone uses going
forward to simplify packaging since the bytes are all the same anyway.

Part of https://github.com/vector-im/riot-web/issues/13367
2020-04-28 11:49:29 +01:00
Travis Ralston
09608b8ee6 Merge pull request #77 from vector-im/travis/labs-remove-padlocks
Remove invite only padlocks feature flag config
2020-04-24 10:45:14 -06:00
Travis Ralston
ea9f097d1c Remove cross-signing feature flag because it's not a feature
It's a setting, but we don't want to disable it.
2020-04-24 10:19:33 -06:00
Travis Ralston
0fffeda85f Remove invite only padlocks feature flag config
See https://github.com/matrix-org/matrix-react-sdk/pull/4487
2020-04-24 10:04:05 -06:00
Damir Jelić
bd471d9ebe package.json: Unbump the seshat dep.
The bump was accidentally merged to master, this doesn't belong here
yet.
2020-04-24 12:01:32 +02:00
Damir Jelić
64f079581b package.json: Bump the Seshat dep. 2020-04-24 11:15:31 +02:00
J. Ryan Stinnett
bcb0611ee3 Merge pull request #74 from vector-im/travis/seshat-enable
Remove encrypted message search feature flag
2020-04-23 10:22:23 +01:00
Travis Ralston
7747cad84d Remove encrypted message search feature flag
See https://github.com/matrix-org/matrix-react-sdk/pull/4467
2020-04-22 11:03:59 -06:00
David Baker
d40a2752c0 Merge pull request #73 from vector-im/dbkr/its_the_real_thing_now
Update readme now it's the real source
2020-04-20 09:37:30 +01:00
David Baker
4e39acffdb Update readme now it's the real source 2020-04-17 18:06:06 +01:00
Michael Telatynski
55806e6777 Merge pull request #71 from steef435/master
Widen search paths to reduce disk usage and fix tray icon
2020-04-17 10:15:54 +01:00
Michael Telatynski
d73915e8f2 Add asar-webapp script
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-01 12:33:06 +01:00
dependabot[bot]
7ceaa4fd8e Bump acorn from 6.4.0 to 6.4.1
Bumps [acorn](https://github.com/acornjs/acorn) from 6.4.0 to 6.4.1.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/6.4.0...6.4.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-03-15 22:06:00 +00:00
14 changed files with 255 additions and 41 deletions

View File

@@ -1,12 +1,83 @@
Changes in [1.6.3](https://github.com/vector-im/riot-desktop/releases/tag/v1.6.3) (2020-06-04)
==============================================================================================
[Full Changelog](https://github.com/vector-im/riot-desktop/compare/v1.6.3-rc.1...v1.6.3)
Changes in [1.6.3-rc.1](https://github.com/vector-im/riot-desktop/releases/tag/v1.6.3-rc.1) (2020-06-02)
========================================================================================================
[Full Changelog](https://github.com/vector-im/riot-desktop/compare/v1.6.2...v1.6.3-rc.1)
* Fix electron context menu copy/save-as
[\#96](https://github.com/vector-im/riot-desktop/pull/96)
* Fixed error in README.md/User-specified config.json
[\#97](https://github.com/vector-im/riot-desktop/pull/97)
* Update Modular hosting link
[\#92](https://github.com/vector-im/riot-desktop/pull/92)
* Enforce sandbox on all spawned BrowserWindow objects
[\#91](https://github.com/vector-im/riot-desktop/pull/91)
* Run before-quit on updates too to flush rageshake
[\#93](https://github.com/vector-im/riot-desktop/pull/93)
* Enable new room list labs flag
[\#87](https://github.com/vector-im/riot-desktop/pull/87)
* Add asar-webapp script
[\#59](https://github.com/vector-im/riot-desktop/pull/59)
* Bump acorn from 6.4.0 to 6.4.1
[\#50](https://github.com/vector-im/riot-desktop/pull/50)
* Enable font scaling flag for nightly
[\#89](https://github.com/vector-im/riot-desktop/pull/89)
* Enable IRC UI labs flag in nightly
[\#88](https://github.com/vector-im/riot-desktop/pull/88)
* Update help message to fix broken url to electron docs
[\#86](https://github.com/vector-im/riot-desktop/pull/86)
Changes in [1.6.2](https://github.com/vector-im/riot-desktop/releases/tag/v1.6.2) (2020-05-22)
==============================================================================================
[Full Changelog](https://github.com/vector-im/riot-desktop/compare/v1.6.1...v1.6.2)
* No changes since 1.6.2
Changes in [1.6.1](https://github.com/vector-im/riot-desktop/releases/tag/v1.6.1) (2020-05-19)
==============================================================================================
[Full Changelog](https://github.com/vector-im/riot-desktop/compare/v1.6.1-rc.1...v1.6.1)
* No changes since rc.1
Changes in [1.6.1-rc.1](https://github.com/vector-im/riot-desktop/releases/tag/v1.6.1-rc.1) (2020-05-14)
========================================================================================================
[Full Changelog](https://github.com/vector-im/riot-desktop/compare/v1.6.0...v1.6.1-rc.1)
* Add CI scripts to install and link JS SDK
[\#85](https://github.com/vector-im/riot-desktop/pull/85)
* Use Xenial as the build image's base distribution
[\#84](https://github.com/vector-im/riot-desktop/pull/84)
* Persist GPG keys for Linux builds via Docker
[\#83](https://github.com/vector-im/riot-desktop/pull/83)
* Update README to mention profile support
[\#81](https://github.com/vector-im/riot-desktop/pull/81)
* Remove Conflicts from riot-desktop
[\#82](https://github.com/vector-im/riot-desktop/pull/82)
* Add a default Linux distribution
[\#79](https://github.com/vector-im/riot-desktop/pull/79)
* Remove invite only padlocks feature flag config
[\#77](https://github.com/vector-im/riot-desktop/pull/77)
* package.json: Bump the Seshat dep.
[\#75](https://github.com/vector-im/riot-desktop/pull/75)
* Remove encrypted message search feature flag
[\#74](https://github.com/vector-im/riot-desktop/pull/74)
* Update readme now it's the real source
[\#73](https://github.com/vector-im/riot-desktop/pull/73)
Changes in [1.6.0](https://github.com/vector-im/riot-desktop/releases/tag/v1.6.0) (2020-05-05)
==============================================================================================
[Full Changelog](https://github.com/vector-im/riot-desktop/compare/v1.6.0-rc.6...v1.6.0)
* No changes since rc.6
Changes in [1.6.0-rc.6](https://github.com/vector-im/riot-desktop/releases/tag/v1.6.0-rc.6) (2020-05-01)
========================================================================================================
[Full Changelog](https://github.com/vector-im/riot-desktop/compare/v1.6.0-rc.5...v1.6.0-rc.6)
* No changes since rc.5
Changes in [1.6.0-rc.5](https://github.com/vector-im/riot-desktop/releases/tag/v1.6.0-rc.5) (2020-04-30)
========================================================================================================
@@ -21,6 +92,7 @@ Changes in [1.6.0-rc.4](https://github.com/vector-im/riot-desktop/releases/tag/v
========================================================================================================
[Full Changelog](https://github.com/vector-im/riot-desktop/compare/v1.6.0-rc.3...v1.6.0-rc.4)
* No changes since rc.3
Changes in [1.6.0-rc.3](https://github.com/vector-im/riot-desktop/releases/tag/v1.6.0-rc.3) (2020-04-17)
========================================================================================================
@@ -33,6 +105,7 @@ Changes in [1.6.0-rc.2](https://github.com/vector-im/riot-desktop/releases/tag/v
========================================================================================================
[Full Changelog](https://github.com/vector-im/riot-desktop/compare/v1.6.0-rc.1...v1.6.0-rc.2)
* No changes since rc.1
Changes in [1.6.0-rc.1](https://github.com/vector-im/riot-desktop/releases/tag/v1.6.0-rc.1) (2020-04-15)
========================================================================================================

View File

@@ -1,10 +1,7 @@
Riot Desktop
============
This is *not* where the source for Riot desktop lives... yet. As of now,
it still lives in the main riot-web repo: https://github.com/vector-im/riot-web
This is an experimental split-out of the Riot desktop code from the main repo.
This is Riot desktop app as of release 1.6.
Fetching Riot
=============
@@ -115,3 +112,24 @@ yarn run fetch --cfgdir myconfig
```
The config dir for the official Riot.im app is in `riot.im`. If you use this,
your app will auto-update itself using builds from Riot.im.
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 `riot-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 `Riot`, unless you use `--profile
$PROFILE` in which case it becomes `Riot-$PROFILE`.

View File

@@ -1,10 +1,45 @@
FROM electronuserland/builder:12
FROM buildpack-deps:xenial-curl
ENV DEBIAN_FRONTEND noninteractive
RUN curl -L https://yarnpkg.com/latest.tar.gz | tar xvz && mv yarn-* /yarn && ln -s /yarn/bin/yarn /usr/bin/yarn
RUN apt-get -qq update && apt-get -qq dist-upgrade && \
# add repo for git-lfs
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \
# git ssh for using as docker image on CircleCI
# python for node-gyp
# rpm is required for FPM to build rpm package
# libsecret-1-dev and libgnome-keyring-dev are required even for prebuild keytar
apt-get -qq install --no-install-recommends qtbase5-dev bsdtar build-essential autoconf libssl-dev gcc-multilib g++-multilib lzip rpm python libcurl3 git git-lfs ssh unzip \
libsecret-1-dev libgnome-keyring-dev \
libopenjp2-tools \
# Used by Seshat
libsqlcipher-dev && \
# git-lfs
git lfs install && \
apt-get purge -y --auto-remove && rm -rf /var/lib/apt/lists/*
WORKDIR /project
# fix error /usr/local/bundle/gems/fpm-1.5.0/lib/fpm/package/freebsd.rb:72:in `encode': "\xE2" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
# http://jaredmarkell.com/docker-and-locales/
# http://askubuntu.com/a/601498
ENV LANG C.UTF-8
ENV LANGUAGE C.UTF-8
ENV LC_ALL C.UTF-8
ENV DEBUG_COLORS true
ENV FORCE_COLOR true
ENV NODE_VERSION 12.16.1
# this package is used for snapcraft and we should not clear apt list - to avoid apt-get update during snap build
RUN curl -L https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz | tar xz -C /usr/local --strip-components=1 && \
unlink /usr/local/CHANGELOG.md && unlink /usr/local/LICENSE && unlink /usr/local/README.md && \
# https://github.com/npm/npm/issues/4531
npm config set unsafe-perm true
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH
RUN apt-get update && \
apt-get install -y libsqlcipher-dev && \
rm -rf /var/lib/apt/lists/* && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --profile minimal
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --profile minimal

View File

@@ -2,7 +2,7 @@
"name": "riot-desktop",
"productName": "Riot",
"main": "src/electron-main.js",
"version": "1.6.0",
"version": "1.6.3",
"description": "A feature-rich client for Matrix.org",
"author": "New Vector Ltd.",
"repository": {
@@ -14,6 +14,7 @@
"scripts": {
"mkdirs": "mkdirp packages deploys",
"fetch": "yarn run mkdirs && node scripts/fetch-package.js",
"asar-webapp": "asar p webapp webapp.asar",
"start": "electron .",
"lint": "eslint src/ scripts/ hak/",
"build:native": "yarn run hak",
@@ -47,7 +48,7 @@
"find-npm-prefix": "^1.0.2",
"fs-extra": "^8.1.0",
"glob": "^7.1.6",
"matrix-js-sdk": "6.0.0",
"matrix-js-sdk": "6.2.0",
"mkdirp": "^1.0.3",
"needle": "^2.3.2",
"node-pre-gyp": "^0.14.0",

View File

@@ -11,7 +11,7 @@
"https://scalar-staging.vector.im/api",
"https://scalar-staging.riot.im/scalar/api"
],
"hosting_signup_link": "https://modular.im/?utm_source=riot-web&utm_medium=web",
"hosting_signup_link": "https://modular.im/services/matrix-hosting-riot?utm_source=riot-web&utm_medium=web",
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
"features": {
"feature_pinning": "labs",
@@ -23,7 +23,10 @@
"feature_dm_verification": "labs",
"feature_bridge_state": "labs",
"feature_presence_in_room_list": "labs",
"feature_custom_themes": "labs"
"feature_custom_themes": "labs",
"feature_new_room_list": "labs",
"feature_irc_ui": "labs",
"feature_font_scaling": "labs"
},
"piwik": {
"url": "https://piwik.riot.im/",

View File

@@ -1,3 +1,10 @@
Origin: riot.im
Codename: default
Architectures: amd64 i386 source
Components: main
SignWith: D7B0B66941D01538
Tracking: minimal
Origin: riot.im
Suite: oldoldstable
Codename: jessie

View File

@@ -11,7 +11,7 @@
"https://scalar-staging.vector.im/api",
"https://scalar-staging.riot.im/scalar/api"
],
"hosting_signup_link": "https://modular.im/?utm_source=riot-web&utm_medium=web",
"hosting_signup_link": "https://modular.im/services/matrix-hosting-riot?utm_source=riot-web&utm_medium=web",
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
"roomDirectory": {
"servers": [

View File

@@ -5,7 +5,6 @@ Architecture: amd64
Maintainer: support@riot.im
Depends: libgtk-3-0, libnotify4, libnss3, libxss1, libxtst6, xdg-utils, libatspi2.0-0, libuuid1, libappindicator3-1, libsecret-1-0, libsqlcipher0
Provides: riot-web
Conflicts: riot-web
Replaces: riot-web
Section: net
Priority: extra

13
scripts/ci/install-deps.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
set -ex
scripts/fetchdep.sh matrix-org matrix-js-sdk
pushd matrix-js-sdk
yarn link
yarn install $@
popd
yarn link matrix-js-sdk
yarn install $@

40
scripts/fetchdep.sh Executable file
View File

@@ -0,0 +1,40 @@
#!/bin/bash
set -x
deforg="$1"
defrepo="$2"
defbranch="$3"
[ -z "$defbranch" ] && defbranch="develop"
rm -r "$defrepo" || true
clone() {
org=$1
repo=$2
branch=$3
if [ -n "$branch" ]
then
echo "Trying to use $org/$repo#$branch"
git clone git://github.com/$org/$repo.git $repo --branch "$branch" --depth 1 && exit 0
fi
}
# Try the PR author's branch in case it exists on the deps as well.
# If BUILDKITE_BRANCH is set, it will contain either:
# * "branch" when the author's branch and target branch are in the same repo
# * "author:branch" when the author's branch is in their fork
# We can split on `:` into an array to check.
BUILDKITE_BRANCH_ARRAY=(${BUILDKITE_BRANCH//:/ })
if [[ "${#BUILDKITE_BRANCH_ARRAY[@]}" == "1" ]]; then
clone $deforg $defrepo $BUILDKITE_BRANCH
elif [[ "${#BUILDKITE_BRANCH_ARRAY[@]}" == "2" ]]; then
clone ${BUILDKITE_BRANCH_ARRAY[0]} $defrepo ${BUILDKITE_BRANCH_ARRAY[1]}
fi
# Try the target branch of the push or PR.
clone $deforg $defrepo $BUILDKITE_PULL_REQUEST_BASE_BRANCH
# Try the current branch from Jenkins.
clone $deforg $defrepo `"echo $GIT_BRANCH" | sed -e 's/^origin\///'`
# Use the default branch as the last resort.
clone $deforg $defrepo $defbranch

View File

@@ -14,6 +14,7 @@ docker run --rm -ti \
-v ${PWD}:/project \
-v ${PWD}/docker/node_modules:/project/node_modules \
-v ${PWD}/docker/.hak:/project/.hak \
-v ${PWD}/docker/.gnupg:/root/.gnupg \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
riot-desktop-dockerbuild "$@"

View File

@@ -82,7 +82,7 @@ if (argv["help"]) {
console.log(" --hidden: Start the application hidden in the system tray.");
console.log(" --help: Displays this help message.");
console.log("And more such as --proxy, see:" +
"https://electronjs.org/docs/api/chrome-command-line-switches#supported-chrome-command-line-switches");
"https://electronjs.org/docs/api/command-line-switches");
app.exit();
}
@@ -615,6 +615,17 @@ protocol.registerSchemesAsPrivileged([{
},
}]);
// Turn the sandbox on for *all* windows we might generate. Doing this means we don't
// have to specify a `sandbox: true` to each BrowserWindow.
//
// This also fixes an issue with window.open where if we only specified the sandbox
// on the main window we'd run into cryptic "ipc_renderer be broke" errors. Turns out
// it's trying to jump the sandbox and make some calls into electron, which it can't
// do when half of it is sandboxed. By turning on the sandbox for everything, the new
// window (no matter how temporary it may be) is also sandboxed, allowing for a clean
// transition into the user's browser.
app.enableSandbox();
app.on('ready', async () => {
try {
await setupGlobals();
@@ -725,7 +736,7 @@ app.on('ready', async () => {
webPreferences: {
preload: preloadScript,
nodeIntegration: false,
sandbox: true,
//sandbox: true, // We enable sandboxing from app.enableSandbox() above
enableRemoteModule: false,
// We don't use this: it's useful for the preload script to
// share a context with the main page so we can give select
@@ -790,12 +801,15 @@ app.on('activate', () => {
mainWindow.show();
});
app.on('before-quit', () => {
function beforeQuit() {
global.appQuitting = true;
if (mainWindow) {
mainWindow.webContents.send('before-quit');
}
});
}
app.on('before-quit', beforeQuit);
app.on('before-quit-for-update', beforeQuit);
app.on('second-instance', (ev, commandLine, workingDirectory) => {
// If other instance launched with --hidden then skip showing window

View File

@@ -35,10 +35,27 @@ function onWindowOrNavigate(ev, target) {
safeOpenURL(target);
}
function writeNativeImage(filePath, img) {
switch (filePath.split('.').pop().toLowerCase()) {
case "jpg":
case "jpeg":
return fs.promises.writeFile(filePath, img.toJPEG(100));
case "bmp":
return fs.promises.writeFile(filePath, img.toBitmap());
case "png":
default:
return fs.promises.writeFile(filePath, img.toPNG());
}
}
function onLinkContextMenu(ev, params) {
let url = params.linkURL || params.srcURL;
if (url.startsWith('vector://vector/webapp')) {
// Avoid showing a context menu for app icons
if (params.hasImageContents) return;
// Rewrite URL so that it can be used outside of the app
url = "https://riot.im/app/" + url.substring(23);
}
@@ -53,22 +70,13 @@ function onLinkContextMenu(ev, params) {
}));
}
let addSaveAs = false;
if (params.mediaType && params.mediaType === 'image' && !url.startsWith('file://')) {
if (params.hasImageContents) {
popupMenu.append(new MenuItem({
label: '&Copy image',
click() {
if (url.startsWith('data:')) {
clipboard.writeImage(nativeImage.createFromDataURL(url));
} else {
ev.sender.copyImageAt(params.x, params.y);
}
ev.sender.copyImageAt(params.x, params.y);
},
}));
// We want the link to be ordered below the copy stuff, but don't want to duplicate
// the `if` statement, so use a flag.
addSaveAs = true;
}
// No point offering to copy a blob: URL either
@@ -91,12 +99,14 @@ function onLinkContextMenu(ev, params) {
}
}
if (addSaveAs) {
// XXX: We cannot easily save a blob from the main process as
// only the renderer can resolve them so don't give the user an option to.
if (params.hasImageContents && !url.startsWith('blob:')) {
popupMenu.append(new MenuItem({
label: 'Sa&ve image as...',
click() {
async click() {
const targetFileName = params.titleText || "image.png";
const filePath = dialog.showSaveDialog({
const {filePath} = await dialog.showSaveDialog({
defaultPath: targetFileName,
});
@@ -104,7 +114,7 @@ function onLinkContextMenu(ev, params) {
try {
if (url.startsWith("data:")) {
fs.writeFileSync(filePath, nativeImage.createFromDataURL(url));
await writeNativeImage(filePath, nativeImage.createFromDataURL(url));
} else {
request.get(url).pipe(fs.createWriteStream(filePath));
}

View File

@@ -115,9 +115,9 @@ acorn-jsx@^5.0.0:
integrity sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==
acorn@^6.0.7:
version "6.4.0"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.0.tgz#b659d2ffbafa24baf5db1cdbb2c94a983ecd2784"
integrity sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw==
version "6.4.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474"
integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==
agent-base@4, agent-base@^4.3.0:
version "4.3.0"
@@ -2862,10 +2862,10 @@ map-age-cleaner@^0.1.1:
dependencies:
p-defer "^1.0.0"
matrix-js-sdk@6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-6.0.0.tgz#2374a583878073871a0202dc237691ef15540575"
integrity sha512-NBHb5JIKetCVhOdfETyhUL9lYs2M+v8W/uczTzW6IX9XFOtNaha8X82waXlRt6RJpZRm5aJveODkybvo9VOLtg==
matrix-js-sdk@6.2.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-6.2.0.tgz#b1aa6f23858ab3ee4b66be25d3e854f6e287d36b"
integrity sha512-dpx1EuJ98HtqE2YUeliTe9xjMOJlicJGRXa06Gr8RAL6WJM7buPgodOk0tRs461LzeilxmymqcGaB4og6o9RxA==
dependencies:
"@babel/runtime" "^7.8.3"
another-json "^0.2.0"