Compare commits

..

653 Commits

Author SHA1 Message Date
ElementRobot
a9003d1abd v1.11.47 2023-10-24 15:49:01 +01:00
ElementRobot
8c4b9e9f41 Prepare changelog for v1.11.47 2023-10-24 15:49:00 +01:00
ElementRobot
6198190095 v1.11.47-rc.1 2023-10-17 15:47:14 +01:00
ElementRobot
02080bbe2e Prepare changelog for v1.11.47-rc.1 2023-10-17 15:47:13 +01:00
ElementRobot
71738c3dfc [create-pull-request] automated change (#1281)
Co-authored-by: t3chguy <t3chguy@users.noreply.github.com>
2023-10-17 15:05:22 +01:00
Michael Telatynski
9890109ebf Update localazy_upload.yaml 2023-10-17 10:48:32 +01:00
Michael Telatynski
da9d9e1730 Allow overwriting app.element.io when popping out widgets (#1277) 2023-10-16 14:20:58 +01:00
Michael Telatynski
2738dca96f Write mdbook summary (#1273) 2023-10-16 08:40:15 +01:00
Robin
485fee3a77 Merge pull request #1274 from robintown/element-call-url
Update the Element Call unstable URL
2023-10-13 12:53:36 -04:00
Robin
9d63ba5d41 Update the Element Call unstable URL
We've switched from Netlify to an in-house Kubernetes deployment with a new URL.
2023-10-13 12:21:49 -04:00
Germain
507fd77b21 Implement macos title bar negative space (#1272) 2023-10-12 15:14:21 +01:00
RiotRobot
ecf8a2814b v1.11.46 2023-10-10 09:41:17 +01:00
RiotRobot
3758623283 Prepare changelog for v1.11.46 2023-10-10 09:41:16 +01:00
RiotRobot
1bfaa948a0 v1.11.46-rc.2 2023-10-03 15:06:17 +01:00
RiotRobot
2e6a85a239 Prepare changelog for v1.11.46-rc.2 2023-10-03 15:06:17 +01:00
Andy Balaam
f563d8c4cd Bump matrix-web-i18n to 3.1.3 for KEY_SEPARATOR (#1259) 2023-10-03 15:03:02 +01:00
RiotRobot
a2e800e301 v1.11.46-rc.1 2023-10-03 12:17:51 +01:00
RiotRobot
49b87dfb53 Prepare changelog for v1.11.46-rc.1 2023-10-03 12:17:50 +01:00
RiotRobot
00c27c4475 Merge branch 'master' into develop 2023-09-29 11:45:30 +01:00
RiotRobot
0f268891cd v1.11.45 2023-09-29 11:45:16 +01:00
RiotRobot
7377787b2f Prepare changelog for v1.11.45 2023-09-29 11:45:15 +01:00
ElementRobot
696e7d2652 Bump electron to 26.2.4 (#1254) (#1255)
(cherry picked from commit 3eb32d9ff3)

Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
2023-09-29 11:06:58 +01:00
Andy Balaam
3eb32d9ff3 Bump electron to 26.2.4 (#1254) 2023-09-29 09:15:27 +00:00
RiotRobot
14b264e353 Merge branch 'master' into develop 2023-09-26 14:17:21 +01:00
RiotRobot
089810ec60 v1.11.44 2023-09-26 14:17:07 +01:00
RiotRobot
9afcaf54fc Prepare changelog for v1.11.44 2023-09-26 14:17:06 +01:00
renovate[bot]
fdc230ff17 Update jest to v29.5.5 (#1240)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-22 01:28:21 +00:00
renovate[bot]
0af8b8e420 Update definitelyTyped (#1237)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-22 01:06:16 +00:00
renovate[bot]
565c662b25 Update babel monorepo to v7.22.20 (#1238)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-22 01:00:45 +00:00
renovate[bot]
173e658b3c Update docker (#1235)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-22 01:23:17 +01:00
renovate[bot]
2f901cab6a Update tj-actions/changed-files digest to 4196030 (#1236)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-22 01:22:53 +01:00
renovate[bot]
59069c316f Update dependency app-builder-lib to v24.6.5 (#1239)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-22 01:21:42 +01:00
renovate[bot]
d73e3b0f0c Update all non-major dependencies (#1241)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-22 01:20:45 +01:00
RiotRobot
422bb150c9 v1.11.44-rc.1 2023-09-19 12:58:45 +01:00
RiotRobot
b6daedae89 Prepare changelog for v1.11.44-rc.1 2023-09-19 12:58:44 +01:00
Johannes Marbach
bcfc057879 Merge pull request #1231 from vector-im/johannes/undefault-new-room-header 2023-09-18 16:09:44 +02:00
Johannes Marbach
d3b84266a4 Turn off new room header by default 2023-09-18 09:52:39 +02:00
Johannes Marbach
94a0347946 Merge pull request #1194 from vector-im/germain-gg/room-ui-develop 2023-09-15 15:43:51 +02:00
RiotRobot
c87e72c4a1 Merge branch 'master' into develop 2023-09-15 12:25:42 +01:00
RiotRobot
ac1acc1591 v1.11.43 2023-09-15 12:24:35 +01:00
RiotRobot
0bd8a1720e Prepare changelog for v1.11.43 2023-09-15 12:24:34 +01:00
RiotRobot
58f2f99ca4 Update yarn.lock for changed dependencies 2023-09-15 12:22:14 +01:00
Andy Balaam
5e56cd59ef upgrade electron to 26.2.1 to fix CVE-2023-4863 (#1226) (#1228)
Signed-off-by: lauren n. liberda <lauren@selfisekai.rocks>
(cherry picked from commit ca43ab8a6f)

Co-authored-by: lauren n. liberda <msgh@selfisekai.rocks>
2023-09-15 12:01:56 +01:00
lauren n. liberda
ca43ab8a6f upgrade electron to 26.2.1 to fix CVE-2023-4863 (#1226)
Signed-off-by: lauren n. liberda <lauren@selfisekai.rocks>
2023-09-15 10:01:48 +01:00
Johannes Marbach
ece7240345 Merge branch 'develop' into germain-gg/room-ui-develop 2023-09-15 09:10:50 +02:00
Michael Telatynski
f45f83f0f5 Improve edge cases around macOS drag handles (#1219)
* Allow dragging macOS window by area around mx_UserMenu

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix context menus overlapping drag regions being unclickable

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix captcha overlapping drag region being unclickable

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Expand drag handle on top left user menu surround

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2023-09-14 08:55:11 +01:00
RiotRobot
1905e4759b Merge branch 'master' into develop 2023-09-13 13:05:23 +01:00
RiotRobot
4278447157 v1.11.42 2023-09-13 13:05:09 +01:00
RiotRobot
e840ba55c1 Prepare changelog for v1.11.42 2023-09-13 13:05:08 +01:00
ElementRobot
4ec7d29488 Merge branch 'master' into develop 2023-09-12 17:23:47 +01:00
ElementRobot
e2ef97cc15 v1.11.41 2023-09-12 17:23:39 +01:00
ElementRobot
8602435994 Prepare changelog for v1.11.41 2023-09-12 17:23:39 +01:00
renovate[bot]
624d941950 Update tj-actions/changed-files digest to 6ee9cdc (#1204)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-12 03:17:38 +00:00
ElementRobot
bdca72cc19 v1.11.41-rc.2 2023-09-08 12:12:06 +01:00
ElementRobot
eabd0af515 Prepare changelog for v1.11.41-rc.2 2023-09-08 12:12:06 +01:00
Michael Telatynski
e5e0a4cdbb Update localazy.json 2023-09-08 10:45:20 +01:00
ElementRobot
9d15a270e2 Merge pull request #1214 from vector-im/actions/localazy-download
Localazy Download
2023-09-08 11:36:09 +02:00
t3chguy
889e7cfa0c [create-pull-request] automated change 2023-09-08 09:08:41 +00:00
Michael Telatynski
b67270d324 Update package.json 2023-09-08 09:54:25 +01:00
Michael Telatynski
a99b30f839 Consolidate de.json into de_DE.json
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2023-09-08 09:40:47 +01:00
renovate[bot]
a094a06465 Update dependency electron to v26.2.0 (#1212)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-07 08:14:41 +00:00
renovate[bot]
1f43456984 Update dependency electron-builder-squirrel-windows to v24.6.4 (#1181)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-06 20:39:19 +01:00
Michael Telatynski
8edaf46557 Update backport.yml 2023-09-06 18:13:03 +01:00
renovate[bot]
3549d38cfd Lock file maintenance (#1210)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-09-06 18:10:31 +01:00
Michael Telatynski
383377493c Localazy Download 2023-09-06 18:08:25 +01:00
renovate[bot]
37bf22b92c Update peter-evans/repository-dispatch digest to bf47d10 (#1203)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-09-06 13:41:51 +01:00
renovate[bot]
ac40e365e5 Update definitelyTyped (#1206)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-06 09:47:24 +00:00
renovate[bot]
42c45a51ca Update tj-actions/changed-files action to v39 (#1209)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-06 09:47:19 +00:00
renovate[bot]
dc780491c8 Update babel monorepo (#1205)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-06 10:45:07 +01:00
renovate[bot]
2d102bdc19 Update docker (#1202)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-06 10:43:22 +01:00
renovate[bot]
2b1e88f16e Update electron-builder to v24.6.4 (#1207)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-05 20:24:52 +00:00
renovate[bot]
9b83e2d515 Update dependency pacote to v17 (#1184)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-09-05 21:23:00 +01:00
renovate[bot]
7c13a58b51 Update jest to v29.6.4 (#1180)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-05 17:01:44 +00:00
ElementRobot
a974b5bab5 v1.11.41-rc.1 2023-09-05 17:10:41 +01:00
ElementRobot
0db7363a58 Prepare changelog for v1.11.41-rc.1 2023-09-05 17:10:41 +01:00
Michael Telatynski
86832a1793 Migrate translations to keys and switch to Localazy (#1198) 2023-09-05 17:09:47 +01:00
Johannes Marbach
2c62efa6e8 Merge pull request #1193 from vector-im/germain-gg/room-header-no-drag-zone 2023-09-05 12:40:24 +02:00
Johannes Marbach
bae8b58c17 Merge branch 'develop' into germain-gg/room-header-no-drag-zone 2023-09-05 11:36:39 +02:00
renovate[bot]
724c545b0c Update tj-actions/changed-files digest to 2f7246c (#1156)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-02 01:18:28 +00:00
Element Translate Bot
2deacf6d41 Translations update from Weblate (#1196)
Co-authored-by: phardyle <bradney_ccea@aleeas.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Glandos <bugs-github@antipoul.fr>
2023-09-01 12:26:37 +01:00
Germain
d7c4e9b74a Enable new room UI by default on nightly 2023-08-31 22:32:12 +01:00
Germain
d929da6869 Updated no drag zones 2023-08-31 21:14:38 +01:00
RiotRobot
d830d0ef10 Merge branch 'master' into develop 2023-08-29 11:29:42 +01:00
RiotRobot
6a72f53d0b v1.11.40 2023-08-29 11:29:26 +01:00
RiotRobot
0f82a070dc Prepare changelog for v1.11.40 2023-08-29 11:29:26 +01:00
renovate[bot]
85901ef2a9 Update docker (#1178)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-28 09:04:59 +00:00
renovate[bot]
426ad15f8c Update electron-builder to v24.6.3 (#1158)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-24 14:21:53 +00:00
renovate[bot]
33787efd1c Update dependency @types/node to v16.18.41 (#1179)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-24 14:12:04 +00:00
renovate[bot]
d4de1a362f Update dependency electron to v26 (#1183)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-24 13:26:26 +00:00
renovate[bot]
90492d61e6 Update tj-actions/changed-files action to v38 (#1185)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-24 14:17:47 +01:00
renovate[bot]
1bbced71b8 Lock file maintenance (#1116)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-23 12:59:55 +00:00
renovate[bot]
a1f86e83dc Update tibdex/backport digest to 7005ef8 (#1155)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-23 12:36:00 +00:00
RiotRobot
95c0fab46a v1.11.40-rc.1 2023-08-23 12:08:56 +01:00
RiotRobot
ce10394e58 Prepare changelog for v1.11.40-rc.1 2023-08-23 12:08:55 +01:00
Zhaofeng Li
e51e248052 Don't intercept Ctrl + Cmd + Q on macOS (#1174) 2023-08-18 11:25:11 +01:00
Michael Telatynski
d718f008e7 Switch to nested object pluralisation format for i18n files (#1172) 2023-08-17 09:37:56 +01:00
Michael Telatynski
0da5ec88d6 Improve selectors for macos app draggable regions (#1170)
Disable background drag handles when modals are open as they interfere through the modal body
2023-08-17 05:20:58 +01:00
ElementRobot
47e98c55b2 Merge branch 'master' into develop 2023-08-15 13:40:23 +01:00
ElementRobot
060ac5b650 v1.11.39 2023-08-15 13:40:15 +01:00
ElementRobot
d06bf5b062 Prepare changelog for v1.11.39 2023-08-15 13:40:15 +01:00
Li-Wen Hsu
a0f92941fc Add FreeBSD support (#1163)
Co-authored-by: Hiroki Tagato <tagattie@gmail.com>
2023-08-09 10:11:27 +01:00
Michael Telatynski
2b61ea82ec Update build_and_deploy.yaml 2023-08-08 21:59:58 +01:00
renovate[bot]
d9c5c4be07 Update jest to v29.6.2 (#1159)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-08 16:27:26 +00:00
renovate[bot]
d15bedda5a Update dependency eslint-config-prettier to v9 (#1160)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-08 16:13:56 +00:00
renovate[bot]
04d91ef5b8 Update babel monorepo to v7.22.10 (#1157)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-08 16:07:34 +00:00
renovate[bot]
7d1dd90b2a Update all non-major dependencies (#1117)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-08-08 14:56:25 +00:00
ElementRobot
dd6ba612d0 v1.11.39-rc.1 2023-08-08 15:30:20 +01:00
ElementRobot
45c6a2b9f3 Prepare changelog for v1.11.39-rc.1 2023-08-08 15:30:20 +01:00
Element Translate Bot
cdd16c9cbd Translations update from Weblate (#1151)
Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
2023-08-08 14:47:55 +01:00
RiotRobot
6319ba04d3 Merge branch 'master' into develop 2023-08-04 09:48:26 +01:00
RiotRobot
ae7fe02018 v1.11.38 2023-08-04 09:48:13 +01:00
RiotRobot
6adc753b30 Prepare changelog for v1.11.38 2023-08-04 09:48:12 +01:00
Michael Telatynski
1929351e91 Automatically trigger desktop packages on releases (#630) 2023-08-04 09:12:53 +01:00
renovate[bot]
0208c4d087 Update tj-actions/changed-files digest to 920e7b9 (#1110)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-03 22:08:51 +00:00
Michael Telatynski
d67822dae3 Simplify desktop packaging (#896) 2023-08-03 16:32:53 +01:00
Michael Telatynski
e2f7393ad5 Prevent the media lightbox sender info clipping with traffic light on macos (#1141) 2023-08-03 14:38:00 +01:00
Michael Telatynski
bc97be9ab7 Stop using abandoned actions-rs/toolchain action (#1132) 2023-08-02 14:34:38 +01:00
Michael Telatynski
ae1d8a896d Update build_and_deploy.yaml fix typo 2023-08-02 13:06:52 +01:00
Michael Telatynski
fd66c14544 Fix deploy not working if you skip any OSes
https://github.com/actions/runner/issues/491 for context
2023-08-02 13:05:22 +01:00
Germain
07523ecfdd Restore macOs room header dragability (#1136) 2023-08-02 07:05:13 +00:00
ElementRobot
6aac68ca9a Merge branch 'master' into develop 2023-08-01 12:54:56 +01:00
ElementRobot
ef457ca9d7 v1.11.37 2023-08-01 12:54:49 +01:00
ElementRobot
2dc0eb58dd Prepare changelog for v1.11.37 2023-08-01 12:54:49 +01:00
Michael Telatynski
1debdbeb47 Fix ability to interact with room topic in header (#1126) 2023-07-31 10:33:38 +02:00
Michael Telatynski
ef170eb94e Fix macos titlebar dragging not blocking the right panel (#1120) 2023-07-29 06:47:10 +01:00
Michael Telatynski
1234db90aa Switch to hidden titleBar on macOS to integrate the app better (#1101) 2023-07-28 12:51:33 +01:00
renovate[bot]
58bf462c47 Update all non-major dependencies (#1113)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-27 12:21:24 +01:00
renovate[bot]
5ceed282a0 Update dependency playwright to v1.36.1 (#1112)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-27 12:09:00 +01:00
renovate[bot]
6b2314e54e Update electron-builder to v24.6.2 (#1114)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-27 11:32:38 +01:00
renovate[bot]
95c56b9168 Update dependency @types/node to v16.18.39 (#1111)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-27 11:32:04 +01:00
renovate[bot]
11664eb97b Update dependency eslint-plugin-unicorn to v48 (#1115)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-27 11:31:50 +01:00
ElementRobot
436214df2e v1.11.37-rc.1 2023-07-27 09:56:29 +01:00
ElementRobot
6bfd6fe310 Prepare changelog for v1.11.37-rc.1 2023-07-27 09:56:29 +01:00
Element Translate Bot
4517225540 Translations update from Weblate (#1109)
Co-authored-by: James Choi <tienipia@gmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Srebrni <kiborg@novko.si>
Co-authored-by: iaiz <git@iapellaniz.com>
Co-authored-by: Edgars Andersons <Edgars+Element-translations@gaitenis.id.lv>
2023-07-27 08:53:27 +01:00
Michael Telatynski
0b31c6d510 Avoid using deprecated config.json key casing (#1099) 2023-07-24 08:36:57 +01:00
RiotRobot
62e29796de Merge branch 'master' into develop 2023-07-18 15:25:38 +01:00
RiotRobot
a61197518e v1.11.36 2023-07-18 15:25:18 +01:00
RiotRobot
c3f00bfbcc Prepare changelog for v1.11.36 2023-07-18 15:25:17 +01:00
renovate[bot]
29a16451cb Update docker/metadata-action digest to 35e9aff (#1064)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-17 18:51:16 +00:00
Šimon Brandner
fedaba9583 Merge pull request #1081 from vector-im/SimonBrandner/feat/better-desk-ss
Switch to the new `session` API for screen-sharing
2023-07-14 22:05:26 +02:00
RiotRobot
a922eb000c v1.11.36-rc.2 2023-07-14 16:43:57 +01:00
RiotRobot
9e87edfcf4 Prepare changelog for v1.11.36-rc.2 2023-07-14 16:43:57 +01:00
Šimon Brandner
a21e5afb84 Switch to the new session API for screen-sharing
See https://github.com/electron/electron/pull/30702 - this has the benefit of the js-sdk and LiveKit not having to add custom logic for Electron

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2023-07-14 12:09:12 +02:00
renovate[bot]
6c7d36dce6 Update tj-actions/changed-files digest to 1f20fb8 (#1065)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-13 22:31:48 +00:00
renovate[bot]
10f4cc6293 Update all non-major dependencies (#1069)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-13 15:04:56 +00:00
renovate[bot]
4e69dda7d2 Lock file maintenance (#1018)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-13 11:27:24 +00:00
renovate[bot]
ae26804bac Update jest to v29.6.1 (#1070)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-13 10:55:00 +00:00
renovate[bot]
6e086dc505 Update dependency app-builder-lib to v24.5.2 (#1068)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-13 10:30:30 +00:00
renovate[bot]
9c885cd8b8 Update babel monorepo to v7.22.8 (#1066)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-13 10:29:27 +00:00
renovate[bot]
edad10fdad Update dependency @types/node to v16.18.38 (#1067)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-13 10:26:03 +00:00
renovate[bot]
3c4be89c0b Update typescript-eslint monorepo to v5.61.0 (#1071)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-13 10:28:09 +01:00
renovate[bot]
f85f98d34d Update docker/login-action digest to a979406 (#1063)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-13 10:21:26 +01:00
renovate[bot]
a76c5b224c Update docker/build-push-action digest to 4fad532 (#1062)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-13 10:21:03 +01:00
Michael Telatynski
9ddd26b2a3 Fix Tray icon in Windows forgetting your settings (#1059) 2023-07-11 17:00:24 +01:00
RiotRobot
3ac0158b9c v1.11.36-rc.1 2023-07-11 16:10:25 +01:00
RiotRobot
067ce4763d Prepare changelog for v1.11.36-rc.1 2023-07-11 16:10:25 +01:00
Element Translate Bot
eb5251057c Translations update from Weblate (#1060)
* Translated using Weblate (Vietnamese)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/vi/

* Translated using Weblate (Swedish)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/sv/

* Translated using Weblate (Russian)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/ru/

* Translated using Weblate (Russian)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/ru/

* Translated using Weblate (Greek)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/el/

* Translated using Weblate (Russian)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/ru/

---------

Co-authored-by: Someone <hahahahacker2009@gmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: LinAGKar <linus.kardell@gmail.com>
Co-authored-by: Руся <qqrustzz@gmail.com>
Co-authored-by: P <paulpub@ya.ru>
Co-authored-by: Dimitris Vagiakakos <dimitrislinuxos@gmail.com>
Co-authored-by: Nui Harime <harime.nui@yandex.ru>
2023-07-11 11:53:39 +01:00
Michael Telatynski
6c7771f170 Add fallback default_server_config to element.io configs (#1056) 2023-07-10 16:01:35 +01:00
ElementRobot
229d0a9f78 Merge branch 'master' into develop 2023-07-04 15:29:07 +01:00
ElementRobot
81459e89ef v1.11.35 2023-07-04 15:28:58 +01:00
ElementRobot
822b7390fa Prepare changelog for v1.11.35 2023-07-04 15:28:57 +01:00
renovate[bot]
758c38983c Update tj-actions/changed-files action to v37 (#1036)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-28 15:21:33 +01:00
renovate[bot]
196243854b Update all non-major dependencies (#1016)
* Update all non-major dependencies

* Remove wrap-ansi-cjs

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-06-27 17:17:37 +00:00
renovate[bot]
e254b82ba9 Update dependency app-builder-lib to v24.5.0 (#1034)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-06-27 14:29:37 +01:00
renovate[bot]
d6cbe706f7 Update dependency @electron/notarize to v2 (#1035)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-27 13:03:45 +00:00
renovate[bot]
4697612103 Update dependency @types/node to v16.18.37 (#1033)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-27 13:00:38 +00:00
renovate[bot]
3fdfc84c81 Update typescript-eslint monorepo to v5.60.0 (#1015)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-06-27 12:58:25 +00:00
renovate[bot]
e9edaddda2 Update tj-actions/changed-files digest to 54479c3 (#1012)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-27 11:35:59 +00:00
renovate[bot]
8a0a102edd Update docker/metadata-action digest to ef25336 (#1011)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-27 12:27:24 +01:00
renovate[bot]
ae2076d2f7 Update docker/build-push-action digest to 2eb1c19 (#1009)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-27 12:27:16 +01:00
renovate[bot]
0fc4fb470c Update babel monorepo to v7.22.5 (#1013)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-27 12:22:07 +01:00
ElementRobot
207408704a v1.11.35-rc.1 2023-06-27 12:16:41 +01:00
ElementRobot
4212f7f28a Prepare changelog for v1.11.35-rc.1 2023-06-27 12:16:41 +01:00
Element Translate Bot
75f4829505 Translations update from Weblate (#1031)
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Vri <element@vrifox.cc>
Co-authored-by: Jozef Gaal <preklady@mayday.sk>
Co-authored-by: waclaw66 <waclaw66@seznam.cz>
Co-authored-by: Priit Jõerüüt <riot@joeruut.com>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
Co-authored-by: random <dictionary@tutamail.com>
Co-authored-by: Linerly <linerly@protonmail.com>
Co-authored-by: Makkkkus <nygardboi@protonmail.com>
Co-authored-by: raspin0 <marcinekk13@interia.pl>
2023-06-27 10:43:32 +01:00
renovate[bot]
e5da625947 Update dependency @types/node to v16.18.36 (#1014)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-26 15:34:59 +01:00
renovate[bot]
6ec0c27764 Update dependency playwright to v1.35.1 (#1017)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-26 15:34:30 +01:00
Robin
35f52a5ab0 Merge pull request #1028 from robintown/element-call-livekit
Point Nightly to our Element Call + LiveKit experiment
2023-06-23 16:17:27 -04:00
Robin
d4432946bc Merge branch 'develop' into element-call-livekit 2023-06-23 15:49:12 -04:00
renovate[bot]
5169c5a339 Update docker/login-action digest to 465a078 (#1010)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-22 13:43:45 +00:00
Robin Townsend
598326afba Point Nightly to our Element Call + LiveKit experiment
This is an experimental version of Element Call using a LiveKit SFU that we'd like to start dogfooding and gaining confidence on internally, so the current plan is to trial it on develop.element.io and Nightly for a while.
2023-06-20 11:53:20 -04:00
RiotRobot
e171a6acbe Merge branch 'master' into develop 2023-06-20 10:34:50 +01:00
RiotRobot
faa5479b5d v1.11.34 2023-06-20 10:34:37 +01:00
RiotRobot
08c50b8e4e Prepare changelog for v1.11.34 2023-06-20 10:34:36 +01:00
Michael Telatynski
a6e175268e Use brand and help url from config (#1008) 2023-06-14 07:58:37 +00:00
RiotRobot
afdad2d31c v1.11.34-rc1 2023-06-13 13:10:40 +01:00
RiotRobot
dad964aca0 Prepare changelog for v1.11.34-rc1 2023-06-13 13:10:39 +01:00
renovate[bot]
3d2006ca50 Update dependency electron to v25 (#997)
* Update dependency electron to v25

* Update dependency electron to v25

* Fix types

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-06-09 11:11:00 +00:00
RiotRobot
4d05739ca0 Merge branch 'master' into develop 2023-06-09 10:36:25 +01:00
RiotRobot
077ed14743 v1.11.33 2023-06-09 10:36:12 +01:00
RiotRobot
184873843a Prepare changelog for v1.11.33 2023-06-09 10:36:11 +01:00
RiotRobot
ddc374b6ee Merge branch 'master' into develop 2023-06-06 14:50:18 +01:00
RiotRobot
bbd8c8c959 v1.11.32 2023-06-06 14:50:04 +01:00
RiotRobot
18235b1dcd Prepare changelog for v1.11.32 2023-06-06 14:50:03 +01:00
renovate[bot]
8f2390dc2a Lock file maintenance (#999)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-02 14:21:23 +01:00
renovate[bot]
241c7d23f1 Update all non-major dependencies (#991)
* Update all non-major dependencies

* Strip name wrap-ansi-cjs

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-06-02 08:52:48 +00:00
renovate[bot]
e4fa2f76a5 Update babel monorepo to v7.22.1 (#995)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-01 18:06:32 +00:00
renovate[bot]
aafa9b1a31 Update dependency playwright to v1.34.3 (#996)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-01 18:06:07 +00:00
renovate[bot]
1f258cf4f1 Update tj-actions/changed-files action to v36 (#998)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-01 18:05:18 +00:00
renovate[bot]
e649cd6631 Update typescript-eslint monorepo to v5.59.7 (#994)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-01 18:04:30 +00:00
renovate[bot]
9f5bb05bab Update dependency @types/node to v16.18.34 (#993)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-01 18:02:50 +00:00
renovate[bot]
5551539a68 Update dependency @types/jest to v29.5.2 (#992)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-01 18:01:47 +00:00
renovate[bot]
1bbdd31eac Update docker/build-push-action digest to f9efed5 (#990)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-01 17:45:21 +00:00
ElementRobot
c87e8977c7 v1.11.32-rc.3 2023-06-01 17:13:25 +01:00
ElementRobot
005640787a Prepare changelog for v1.11.32-rc.3 2023-06-01 17:13:25 +01:00
ElementRobot
16b4beb50b Merge branch 'develop' into staging 2023-06-01 16:45:48 +01:00
ElementRobot
0aa079974f v1.11.32-rc.2 2023-05-19 17:16:49 +01:00
ElementRobot
4439ac3519 Prepare changelog for v1.11.32-rc.2 2023-05-19 17:16:48 +01:00
Michael Telatynski
dde3bb3caf Include web bundle hash in nightly summary (#953) 2023-05-19 13:16:27 +01:00
Michael Telatynski
e834f4a108 Fix accidental change of nightly deb name (#977)
* Fix accidental change of nightly deb name

* Remove stale deb-custom-control arg
2023-05-18 19:49:45 +01:00
renovate[bot]
4fa44d6942 Update all non-major dependencies (#970)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-17 21:02:35 +00:00
renovate[bot]
c0b0000ad1 Lock file maintenance (#973)
* Lock file maintenance

* Hold back from minipass 6

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-05-17 08:19:01 +00:00
renovate[bot]
3f1f5ef892 Update dependency eslint-plugin-unicorn to v47 (#972)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-05-16 16:58:59 +00:00
renovate[bot]
ec8f31a5fa Update typescript-eslint monorepo to v5.59.6 (#971)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-16 16:40:22 +00:00
renovate[bot]
10369e7028 Update actions-rs/toolchain digest to 88dc235 (#965)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-16 16:32:45 +00:00
renovate[bot]
24459ca2c2 Update docker/build-push-action digest to 91df6b8 (#966)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-16 16:31:13 +00:00
Michael Telatynski
bc41108e2a Revert "Update tibdex/backport digest to b1bb2aa" (#974) 2023-05-16 17:27:47 +01:00
renovate[bot]
97ed939574 Update dependency @types/node to v16.18.30 (#969)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-16 17:26:53 +01:00
renovate[bot]
3daab12f4c Update tibdex/backport digest to b1bb2aa (#968)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-16 15:44:42 +00:00
ElementRobot
f2d0676ed1 v1.11.32-rc.1 2023-05-16 15:25:35 +01:00
ElementRobot
5be0bbc819 Prepare changelog for v1.11.32-rc.1 2023-05-16 15:25:34 +01:00
Michael Telatynski
6a93e685d9 Update to seshat 3.0.1 (#960) 2023-05-16 11:23:42 +00:00
Element Translate Bot
4df47fc772 Translations update from Weblate (#963)
Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: someone1611 <hahahahacker2009@outlook.com>
Co-authored-by: raspin0 <marcinekk13@interia.pl>
2023-05-16 12:10:33 +01:00
Michael Telatynski
c7c063f129 Simplify element builder workflow (#898) 2023-05-15 09:40:39 +01:00
renovate[bot]
cb29a10c5e Lock file maintenance (#646)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-12 12:59:40 +00:00
Michael Telatynski
1e64ebb61a Update electron-builder (#952) 2023-05-12 09:52:48 +01:00
Andy Balaam
f6fc792f61 Merge pull request #941 from vector-im/andybalaam/increase-timeouts-in-tests
Increase timeouts in tests to try and reduce flakiness
2023-05-11 09:23:31 +01:00
RiotRobot
02f353223a Merge branch 'master' into develop 2023-05-10 14:21:50 +01:00
RiotRobot
b7668aec15 v1.11.31 2023-05-10 14:21:36 +01:00
RiotRobot
f930dbcd3e Prepare changelog for v1.11.31 2023-05-10 14:21:35 +01:00
ElementRobot
8a424b9d87 [Backport staging] Fix wrong version being passed to prepare job (#951)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-05-10 11:22:33 +01:00
Michael Telatynski
f178fc129c Update build_and_deploy.yaml 2023-05-10 08:53:14 +01:00
Michael Telatynski
19f15c5baf Fix wrong version being passed to prepare job (#950) 2023-05-09 22:23:38 +01:00
renovate[bot]
af9ae38efd Update babel monorepo (#935)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-09 17:13:58 +00:00
renovate[bot]
31a61ebfea Update all non-major dependencies (#938)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-09 11:07:23 +00:00
Michael Telatynski
d8f5cdb40d Specify hashes for github actions (#634) 2023-05-09 12:01:35 +01:00
Michael Telatynski
3ed6a1591d Fix nightly summary 2023-05-09 10:35:54 +01:00
Michael Telatynski
19a4778da7 Update build_prepare.yaml 2023-05-09 10:26:24 +01:00
Michael Telatynski
f928d59208 Null guard global mainWindow better (#948) 2023-05-09 09:23:01 +01:00
Michael Telatynski
0b01b94316 Print a summary on nightly builds to make versions easier to trace (#947) 2023-05-09 09:22:35 +01:00
renovate[bot]
6f6e1b4ac2 Update docker/metadata-action digest to c4ee3ad (#638)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-09 17:53:36 +12:00
renovate[bot]
56d6cd9aa4 Update tj-actions/changed-files digest to b2d17f5 (#934)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-08 15:02:32 +02:00
RiotRobot
14f08c95b5 v1.11.31-rc.2 2023-05-05 15:33:45 +01:00
RiotRobot
d8efa5188f Prepare changelog for v1.11.31-rc.2 2023-05-05 15:33:44 +01:00
ElementRobot
068fc63a53 [Backport staging] Fix macos update check exploding (#945)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-05-05 14:28:25 +01:00
Michael Telatynski
d8bd12a302 Fix macos update check exploding (#944) 2023-05-05 12:37:09 +00:00
renovate[bot]
d3f687d040 Update dependency @types/jest to v29.5.1 (#936)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-05 13:24:46 +12:00
renovate[bot]
b5f1c3089d Update dependency playwright to v1.33.0 (#939)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-04 16:07:27 +01:00
Andy Balaam
e98c50a669 Increase timeouts in tests to try and reduce flakiness 2023-05-04 09:42:12 +01:00
renovate[bot]
b9a86feaa9 Update dependency @types/node to v16.18.25 (#937)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-04 09:35:46 +12:00
renovate[bot]
9398ae1bbd Update typescript-eslint monorepo to v5.59.1 (#642)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kerry <kerrya@element.io>
2023-05-03 21:35:33 +00:00
renovate[bot]
ad3c1dbc20 Update docker/login-action digest to 40891eb (#637)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-04 09:16:30 +12:00
RiotRobot
da9ab70b39 v1.11.31-rc.1 2023-05-02 11:56:17 +01:00
RiotRobot
6fb152d4ca Prepare changelog for v1.11.31-rc.1 2023-05-02 11:56:16 +01:00
Element Translate Bot
f45714e88f Translations update from Weblate (#933)
* Translated using Weblate (Greek)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/el/

* Translated using Weblate (Polish)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/pl/

---------

Co-authored-by: Theo <tbousiou@gmail.com>
Co-authored-by: raspin0 <marcinekk13@interia.pl>
2023-05-02 10:23:12 +00:00
Michael Telatynski
8aee984b04 Enable ES2020 to match matrix-react-sdk (#931) 2023-04-27 19:10:51 +01:00
renovate[bot]
02bd6e7690 Update docker/build-push-action digest to eafaea8 (#636)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-27 09:38:24 +01:00
Michael Telatynski
9f611a94e1 Start packaging for Debian & Ubuntu aarch64 (#895) 2023-04-26 16:07:20 +01:00
Michael Telatynski
cd227a456a Make SonarCloud happier about our code quality (#632) 2023-04-26 15:05:58 +01:00
Michael Telatynski
7b0040063b Improve cache busting to consider the build scripts themselves (#633) 2023-04-26 15:04:17 +01:00
RiotRobot
5f5d8f08d0 Merge branch 'master' into develop 2023-04-25 11:16:14 +01:00
RiotRobot
bf5193e185 v1.11.30 2023-04-25 11:16:00 +01:00
RiotRobot
598da1a454 Prepare changelog for v1.11.30 2023-04-25 11:16:00 +01:00
Mathieu Velten
cf94a1e49a Use a fully static seshat build (#631)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-04-24 12:19:10 +00:00
Michael Telatynski
b6815b2731 Exclude some artifacts from PR builds (#891) 2023-04-24 12:24:36 +01:00
renovate[bot]
ed8870dc9f Update dependency rimraf to v5 (#645)
* Update dependency rimraf to v5

* Update dependency rimraf to v5

* Update import

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-04-18 18:59:12 +01:00
renovate[bot]
94971502bb Update all non-major dependencies (#640)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-18 17:34:20 +00:00
renovate[bot]
617b21a4fd Update dependency glob to v10 (#643)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-18 17:25:33 +01:00
renovate[bot]
645a79f956 Update dependency mkdirp to v3 (#644)
* Update dependency mkdirp to v3

* Iterate

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-04-18 15:08:33 +00:00
renovate[bot]
a490427da8 Update tj-actions/changed-files digest to 7ecfc67 (#639)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-18 14:17:36 +00:00
Andy Balaam
f9c22e9ce5 Disable blank issues in this repo - they should logged in the element-web repo (#635) 2023-04-18 14:45:42 +01:00
Michael Telatynski
41b69ce6d7 Delete please-don-t-file-issues-here---use-the-element-web-project.md 2023-04-18 14:44:48 +01:00
Michael Telatynski
5761d04856 Create enhancement.yml 2023-04-18 14:44:40 +01:00
Michael Telatynski
edb4c3f605 Create bug-desktop.yml 2023-04-18 14:44:22 +01:00
RiotRobot
7b5bcf74a9 v1.11.30-rc.1 2023-04-18 12:11:41 +01:00
RiotRobot
37dcd717f4 Prepare changelog for v1.11.30-rc.1 2023-04-18 12:11:40 +01:00
Michael Telatynski
0d0b333f40 Add support for Linux arm64 (#446) 2023-04-18 11:38:26 +01:00
Michael Telatynski
392545a57f Workaround Squirrel.Mac wedging app restart after failed update check (#629) 2023-04-18 11:37:36 +01:00
Michael Telatynski
63622a66e7 Drop rebrand_stub (#626) 2023-04-18 09:14:23 +01:00
Andy Balaam
0cb2064d64 Add template pointing to the element-web project 2023-04-17 11:57:57 +01:00
Michael Telatynski
728d82f296 Allow testing dockerbuild changes in pull requests (#625) 2023-04-14 14:00:19 +02:00
Michael Telatynski
fac4605e9b Fix reprepro path 2023-04-14 12:21:19 +01:00
Michael Telatynski
1e5932cea2 Delegate packages.element.io to its own repo (#604
* Move element-io-archive-keyring

* Move debian conf

* Move packages.element.io

* Delegate reprepro to packages.element.io

* Iterate

* Stash

* Iterate

* Iterate

* Iterate
2023-04-14 11:30:14 +01:00
Michael Telatynski
005ab48f18 Fix error about webContents on log out (#627) 2023-04-14 09:07:16 +01:00
RiotRobot
3d215dc777 Merge branch 'master' into develop 2023-04-11 14:35:13 +01:00
RiotRobot
bbaca4413e v1.11.29 2023-04-11 14:34:54 +01:00
RiotRobot
54d1c138c7 Prepare changelog for v1.11.29 2023-04-11 14:34:54 +01:00
renovate[bot]
5e9301bdf1 Lock file maintenance (#623)
* Lock file maintenance

* Lock file maintenance

* Claw back minipass from 4.2.7 which is broken

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-04-11 11:19:12 +00:00
renovate[bot]
1a99740bc8 Update dependency glob to v9 (#575)
* Update dependency glob to v9

* Adjust copy.ts to promisifed glob

* Switch asar -> @electron/asar

* Update rimraf for glob v9 compatibility

* Iterate

* Iterate

* Patch @electron/asar

* Fix another way

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Janne Mareike Koschinski <jannemk@element.io>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-04-06 12:41:38 +00:00
renovate[bot]
cf24a95d31 Update dependency electron to v24 (#611)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-06 13:31:04 +01:00
renovate[bot]
07341a0498 Update jest monorepo to v29.5.0 (#571)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-06 11:50:50 +01:00
Michael Telatynski
f6acfb8778 Update pull_request.yaml 2023-04-06 10:41:49 +01:00
renovate[bot]
417e41668c Update dependency playwright to v1.32.1 (#621)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-06 09:12:28 +00:00
renovate[bot]
e014ccc653 Update babel monorepo to v7.21.4 (#616)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-06 08:47:49 +00:00
renovate[bot]
34d1c6fc24 Update dependency @types/node to v16.18.23 (#617)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-06 08:06:04 +00:00
renovate[bot]
fdfeb0454f Update dependency typescript to v5 (#612)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-05 20:07:37 +00:00
renovate[bot]
1ec6c6e5db Update typescript-eslint monorepo to v5.57.1 (#618)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-05 19:08:25 +00:00
renovate[bot]
8be59eba56 Update all non-major dependencies (#619)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-05 17:31:39 +00:00
Michael Telatynski
8b16f2d0d9 Fix error when breadcrumb image fails to load (#609) 2023-04-05 10:56:12 +00:00
RiotRobot
ce2ce8bea1 v1.11.29-rc.1 2023-04-04 12:18:48 +01:00
RiotRobot
7c3e0f4d99 Prepare changelog for v1.11.29-rc.1 2023-04-04 12:18:48 +01:00
Andy Balaam
224bccaf95 Merge pull request #608 from RiotTranslateBot/weblate-element-desktop-element-desktop
Translations update from Weblate
2023-04-04 11:41:37 +01:00
Weblate
e7e8c8e81a Merge branch 'origin/develop' into Weblate. 2023-04-04 08:09:29 +00:00
Michael Telatynski
f24e90b927 Update windows-requirements.md 2023-04-04 09:09:25 +01:00
Weblate
39b2ca0bc1 Merge branch 'origin/develop' into Weblate. 2023-04-03 15:31:20 +00:00
Michael Telatynski
077a58a2e8 Fix wrong sqlcipher build being used due to cache conflict (#606) 2023-04-03 15:31:14 +00:00
Weblate
03161c7433 Merge branch 'origin/develop' into Weblate. 2023-04-03 14:21:11 +00:00
Michael Telatynski
7c0f11914b Add grep to dockerbuild image (#607) 2023-04-03 14:21:04 +00:00
Weblate
119fdc2db3 Merge branch 'origin/develop' into Weblate. 2023-04-03 08:50:25 +00:00
Michael Telatynski
06d6f11670 Prefer env for passing github context vars (#590) 2023-04-03 08:50:20 +00:00
Weblate
9334d87ad8 Merge branch 'origin/develop' into Weblate. 2023-04-03 08:32:41 +00:00
Michael Telatynski
50d38e2abd Use branch specific linux dockerbuild tags (#601) 2023-04-03 09:32:37 +01:00
sefidel
3846f45529 Translated using Weblate (Korean)
Currently translated at 22.2% (10 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/ko/
2023-04-03 02:33:48 +00:00
sefidel
df66db90f5 Added translation using Weblate (Korean) 2023-04-02 02:24:55 +00:00
Weblate
b22d6640c2 Merge branch 'origin/develop' into Weblate. 2023-03-31 18:13:59 +00:00
Michael Telatynski
0663de091f Enable CodeQL (#603) 2023-03-31 19:13:55 +01:00
Weblate
9cb3e2b551 Merge branch 'origin/develop' into Weblate. 2023-03-31 15:17:48 +00:00
Michael Telatynski
5bd1c663e2 Use frozen lockfile instead of pure lockfile on yarn install (#605) 2023-03-31 15:17:43 +00:00
Weblate
20f9a8daf8 Merge branch 'origin/develop' into Weblate. 2023-03-31 14:42:47 +00:00
RiotRobot
19fd0b99f5 Merge branch 'master' into develop 2023-03-31 15:41:56 +01:00
RiotRobot
60171c780c v1.11.28 2023-03-31 15:39:31 +01:00
RiotRobot
75276cff7b Prepare changelog for v1.11.28 2023-03-31 15:39:31 +01:00
RiotRobot
266fc707b0 Fix broken lockfile element-web/issues/25008 2023-03-31 15:23:40 +01:00
Weblate
81a5ba677a Merge branch 'origin/develop' into Weblate. 2023-03-31 12:12:10 +00:00
RiotRobot
2ca8b7be61 Merge branch 'master' into develop 2023-03-31 12:44:40 +01:00
RiotRobot
349b5e0081 v1.11.27 2023-03-31 11:24:13 +01:00
RiotRobot
09923b3fe4 Prepare changelog for v1.11.27 2023-03-31 11:24:12 +01:00
Weblate
034bbcfa46 Merge branch 'origin/develop' into Weblate. 2023-03-31 10:00:36 +00:00
Michael Telatynski
c10e666dad Ship linux tarball with static sqlcipher (#597) 2023-03-31 11:00:30 +01:00
RiotRobot
a479c8607b Merge branch 'master' into staging 2023-03-31 10:56:21 +01:00
Andy Balaam
ae1998a024 Merge pull request #602 from vector-im/backport-599-to-staging
Run build_linux in docker using an older glibc (#599)
2023-03-31 09:55:01 +01:00
Weblate
f0c7f615ee Merge branch 'origin/develop' into Weblate. 2023-03-31 08:45:38 +00:00
renovate[bot]
743f5dc5de Update typescript-eslint monorepo to v5.57.0 (#538)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-31 09:45:33 +01:00
Michael Telatynski
ba45d84771 Run build_linux in docker using an older glibc (#599)
(cherry picked from commit 718d5a8037)
2023-03-31 09:24:02 +01:00
Weblate
675798b4c9 Merge branch 'origin/develop' into Weblate. 2023-03-31 08:18:18 +00:00
Michael Telatynski
f8aba49155 Enable gatekeeperAssess (#600) 2023-03-31 09:18:13 +01:00
Weblate
389e744cf1 Merge branch 'origin/develop' into Weblate. 2023-03-31 07:50:18 +00:00
renovate[bot]
439760f8ee Update dependency @types/node to v16.18.21 (#569)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-31 08:50:13 +01:00
Weblate
9048af7003 Merge branch 'origin/develop' into Weblate. 2023-03-30 13:23:04 +00:00
Michael Telatynski
718d5a8037 Run build_linux in docker using an older glibc (#599) 2023-03-30 14:22:58 +01:00
Weblate
dd66fb8010 Merge branch 'origin/develop' into Weblate. 2023-03-30 12:54:50 +00:00
Michael Telatynski
a9cffb8ce5 Automate pushing dockerbuild image to ghcr.io (#598) 2023-03-30 13:54:45 +01:00
Weblate
f703771a00 Merge branch 'origin/develop' into Weblate. 2023-03-29 13:23:40 +00:00
Michael Telatynski
40058d36c4 Remove element-builder specific scripts (#586) 2023-03-29 14:23:34 +01:00
Weblate
e00144015f Merge branch 'origin/develop' into Weblate. 2023-03-29 13:07:42 +00:00
Andy Balaam
762881bd8a Merge pull request #595 from vector-im/andybalaam/changelog-for-1-11-26
Update changelog for v1.11.26 now the security issue is public
2023-03-29 14:07:35 +01:00
Andy Balaam
2787266d48 Update changelog for v1.11.26 now the security issue is public 2023-03-28 21:01:53 +01:00
Andy Balaam
62e6851250 Backport package.json changes from develop 2023-03-28 17:32:29 +01:00
Michael Telatynski
201000da39 Backport more build config to master 2023-03-28 16:38:57 +01:00
Michael Telatynski
38ccd77b81 Backport packaging scripts to master 2023-03-28 16:16:24 +01:00
Weblate
61dd2e3ce4 Merge branch 'origin/develop' into Weblate. 2023-03-28 13:50:47 +00:00
waclaw66
55841e4d4d Translated using Weblate (Czech)
Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/cs/
2023-03-28 13:50:47 +00:00
RiotRobot
694015f7db Merge branch 'master' into develop 2023-03-28 14:50:40 +01:00
RiotRobot
722e5ff0ac v1.11.26 2023-03-28 14:50:26 +01:00
RiotRobot
425f3186b8 Prepare changelog for v1.11.26 2023-03-28 14:50:25 +01:00
waclaw66
dd26855c15 Added translation using Weblate (Czech) 2023-03-28 08:20:06 +00:00
Claudio Satriano
b7b3708b0b Translated using Weblate (Italian)
Currently translated at 95.5% (43 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/it/
2023-03-24 15:15:44 +00:00
Weblate
4384e9b506 Merge branch 'origin/develop' into Weblate. 2023-03-23 17:03:44 +00:00
Michael Telatynski
f23892f54d Fix typo in github actions workflow (#589) 2023-03-23 17:03:39 +00:00
Weblate
7fb557cf3d Merge branch 'origin/develop' into Weblate. 2023-03-23 16:49:06 +00:00
Michael Telatynski
540bd91966 Update updates.md 2023-03-23 16:49:01 +00:00
Weblate
56cab854fc Merge branch 'origin/develop' into Weblate. 2023-03-23 15:17:13 +00:00
Michael Telatynski
f8d331c656 Switch to live R2 bucket for github actions packaging (#588) 2023-03-23 15:17:07 +00:00
Weblate
6e254a761b Merge branch 'origin/develop' into Weblate. 2023-03-23 13:22:35 +00:00
Michael Telatynski
1654030c5f Iterate ARM support in CI (#587) 2023-03-23 13:22:29 +00:00
Weblate
f34bcca76d Merge branch 'origin/develop' into Weblate. 2023-03-22 09:41:56 +00:00
Michael Telatynski
7a1a0fabdb Add support for Windows arm64 (#423) 2023-03-22 09:41:51 +00:00
Weblate
440c9862f1 Merge branch 'origin/develop' into Weblate. 2023-03-22 09:40:43 +00:00
Michael Telatynski
204945299e Use notarize support built into electron-builder (#558) 2023-03-22 09:40:39 +00:00
Weblate
2e0c0becd5 Merge branch 'origin/develop' into Weblate. 2023-03-22 09:31:48 +00:00
Michael Telatynski
3b08d4fa43 Show recent room breadcrumbs on touchbar (#183) 2023-03-22 09:31:42 +00:00
Weblate
75aa07a128 Merge branch 'origin/develop' into Weblate. 2023-03-20 08:22:05 +00:00
Michael Telatynski
775b03572c Correctly specify minimum Node version (#582) 2023-03-20 09:22:00 +01:00
Weblate
41c0be9761 Merge branch 'origin/develop' into Weblate. 2023-03-20 08:17:39 +00:00
Michael Telatynski
74579317db Switch to production ssl.com cert (#585) 2023-03-20 08:17:34 +00:00
Weblate
9ed1018f1b Merge branch 'origin/develop' into Weblate. 2023-03-17 15:33:24 +00:00
Michael Telatynski
18d80e4e9c Clear electron data when logging out (#578) 2023-03-17 15:33:19 +00:00
Weblate
d9eeeabbb4 Merge branch 'origin/develop' into Weblate. 2023-03-17 15:17:33 +00:00
Michael Telatynski
c560bb2de7 Update GPG keyring with extended validity period (#584) 2023-03-17 15:17:29 +00:00
Weblate
a276cf26c7 Merge branch 'origin/develop' into Weblate. 2023-03-16 10:31:11 +00:00
Michael Telatynski
8235275d2c Send Electron crashpad reports to Sentry from Nightly (#579)
* Send Electron crashpad reports to Sentry from Nightly

* Update electron-main.ts

* Increase timeout

* Fix preload injection breaking things

* Iterate

* Iterate

* Iterate

* iterate
2023-03-16 10:31:06 +00:00
Weblate
0d7547a417 Merge branch 'origin/develop' into Weblate. 2023-03-16 10:14:00 +00:00
Michael Telatynski
3d578e815a Fix reprepro test ipv4 vs ipv6 (#581) 2023-03-16 10:13:55 +00:00
Weblate
e302bb7fc3 Merge branch 'origin/develop' into Weblate. 2023-03-15 13:57:40 +00:00
RiotRobot
6cfbd2e932 Merge branch 'master' into develop 2023-03-15 13:57:34 +00:00
Andy Balaam
34ccea0378 Fix changelog for 1.11.25
Auto-generated changelog was accidentally committed. Replacing with the
correct one.
2023-03-15 13:50:04 +00:00
Weblate
4c1373dcb0 Merge branch 'origin/develop' into Weblate. 2023-03-15 13:46:54 +00:00
Andy Balaam
c80763c7b7 Merge pull request #580 from vector-im/andybalaam/update-changelog-1.11.25
Fix changelog for 1.11.25
2023-03-15 13:46:48 +00:00
Andy Balaam
a440bc89ec Fix changelog for 1.11.25
Auto-generated changelog was accidentally committed. Replacing with the
correct one.
2023-03-15 13:20:25 +00:00
Weblate
790afe42cb Merge branch 'origin/develop' into Weblate. 2023-03-15 13:14:48 +00:00
RiotRobot
ef91afa057 Merge branch 'master' into develop 2023-03-15 13:14:42 +00:00
RiotRobot
bb0ccfdbab v1.11.25 2023-03-15 13:14:27 +00:00
RiotRobot
5aec4945f9 Prepare changelog for v1.11.25 2023-03-15 13:14:26 +00:00
RiotRobot
51941ed766 v1.11.25-rc.3 2023-03-14 11:50:28 +00:00
RiotRobot
b503dcd9ef Prepare changelog for v1.11.25-rc.3 2023-03-14 11:50:27 +00:00
Weblate
a591b980f8 Merge branch 'origin/develop' into Weblate. 2023-03-14 11:16:50 +00:00
renovate[bot]
c9110bc3e4 Update all non-major dependencies (#568)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-14 11:16:45 +00:00
Open Culture Foundation
391e10abab Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/zh_Hant/
2023-03-14 00:33:44 +00:00
Weblate
6d12148db2 Merge branch 'origin/develop' into Weblate. 2023-03-13 08:24:05 +00:00
renovate[bot]
33429a4b1b Update dependency @aws-sdk/client-s3 to v3.288.0 (#577)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-13 08:24:00 +00:00
Weblate
67dd6b90b6 Merge branch 'origin/develop' into Weblate. 2023-03-12 20:28:20 +00:00
renovate[bot]
e1190a2210 Update dependency playwright to v1.31.2 (#570)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-12 20:28:16 +00:00
Weblate
03864ebc4f Merge branch 'origin/develop' into Weblate. 2023-03-12 19:43:10 +00:00
renovate[bot]
1b6c9092f5 Update dependency eslint-plugin-unicorn to v46 (#574)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-13 08:43:06 +13:00
Open Culture Foundation
b8606103be Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/zh_Hant/
2023-03-12 16:33:42 +00:00
Peter Chen
fc2add64cb Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/zh_Hant/
2023-03-10 17:33:41 +00:00
RiotRobot
9926ebe89e v1.11.25-rc.2 2023-03-10 15:20:00 +00:00
RiotRobot
ad08b96905 Prepare changelog for v1.11.25-rc.2 2023-03-10 15:20:00 +00:00
ElementRobot
b558bec1b5 [Backport staging] Recommend element-io-archive-keyring from our Debian package (#567)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-03-10 09:52:05 +00:00
Michael Telatynski
8b110b621f Recommend element-io-archive-keyring from our Debian package (#566) 2023-03-10 09:21:02 +00:00
Michael Telatynski
14fb3f5ce4 Rename control to control 2023-03-09 10:28:53 +00:00
Michael Telatynski
2bb999ebb6 Build element-io-archive-keyring package (#565) 2023-03-09 10:26:37 +00:00
renovate[bot]
104d985c24 Update babel monorepo to v7.21.0 (#554)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-08 08:17:47 +00:00
Michael Telatynski
22fe702b83 Include changelogs in deb package (#563)
* Initial attempt at custom Debian changelogs

* Iterate

* Quotes...

* Iterate

* facepalm

* Iterate

* Remove reundant line

* Ifs

* Test

* Iterate

* Iterate

* Brackets

* inconsistent?

* Update build_and_test.yaml

* Update build_and_test.yaml
2023-03-07 15:53:53 +00:00
RiotRobot
fa6e7ce0a5 v1.11.25-rc.1 2023-03-07 12:09:39 +00:00
RiotRobot
32c5ab7df3 Prepare changelog for v1.11.25-rc.1 2023-03-07 12:09:38 +00:00
Andy Balaam
25af58e86f Merge pull request #564 from RiotTranslateBot/weblate-element-desktop-element-desktop
Translations update from Weblate
2023-03-07 10:47:15 +00:00
Weblate
9fb00348c4 Merge branch 'origin/develop' into Weblate. 2023-03-06 08:57:02 +00:00
Michael Telatynski
126d2c336b Assert release & nightly builds are signed, notarised & accessible before deployment (#559) 2023-03-06 08:56:49 +00:00
Weblate
91576f3939 Merge branch 'origin/develop' into Weblate. 2023-03-05 23:05:12 +00:00
renovate[bot]
383793640d Update dependency @aws-sdk/client-s3 to v3.281.0 (#550)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-06 12:05:08 +13:00
Open Culture Foundation
fe74834456 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/zh_Hant/
2023-03-05 12:33:40 +00:00
Artem Polivanchuk
9570864dd3 Added translation using Weblate (Ukrainian) 2023-03-04 14:09:44 +00:00
Andy Balaam
633805dcc2 Merge pull request #560 from vector-im/andybalaam/fix-release-notes-1.11.24
Remove items incorrectly included in changelog for 1.11.24
2023-03-03 14:28:35 +00:00
Andy Balaam
e04e500fd5 Remove items incorrectly included in changlog for 1.11.24 2023-03-03 12:52:04 +00:00
Michael Telatynski
68d2e34841 Guard reprepro db via concurrency limits (#555) 2023-03-02 16:54:57 +00:00
Michael Telatynski
88ef8deb78 Fix macOS notarisation using keychain credentials (#557) 2023-03-01 10:49:41 +00:00
RiotRobot
144d04a5ae Merge branch 'master' into develop 2023-02-28 11:24:52 +00:00
RiotRobot
75e3ea6818 v1.11.24 2023-02-28 11:24:38 +00:00
RiotRobot
248ec9cedd Prepare changelog for v1.11.24 2023-02-28 11:24:37 +00:00
Michael Telatyński
65a7871d45 Let electron-builder correctly set StartupWMClass (#526) 2023-02-27 18:04:55 +00:00
Michael Telatynski
b858e45eee Fix invalid JSON 2023-02-27 10:52:25 +00:00
Michael Telatynski
3656125552 Fix Windows deploy path 2023-02-27 10:47:40 +00:00
Michael Telatynski
20f8099253 Update base-url for macos staging builds 2023-02-27 10:17:14 +00:00
Michael Telatyński
fc961737f4 Fix build_and_deploy workflow (#553) 2023-02-27 09:52:47 +00:00
Michael Telatyński
f79713980a Update build_macos.yaml 2023-02-27 09:45:54 +00:00
renovate[bot]
8497d743cd Update dependency playwright to v1.31.1 (#536)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-24 23:47:08 +00:00
renovate[bot]
58f7c2534c Update dependency eslint-plugin-matrix-org to v1 (#551)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-24 14:27:25 +01:00
renovate[bot]
ed60ea1977 Update dependency @types/tar to v6.1.4 (#549)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-24 12:44:18 +00:00
renovate[bot]
12c6f2c268 Update all non-major dependencies (#529)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-24 11:11:19 +00:00
Andy Balaam
a528d8c7c5 Merge pull request #546 from vector-im/andybalaam/harmonise-eslintrc-tsconfig
Separate linting and compiling src+test, scripts and hak
2023-02-24 10:31:38 +00:00
Andy Balaam
3eeb8c14a9 Lint the test directory 2023-02-24 09:39:14 +00:00
Andy Balaam
51a8667b89 Share what we can with extends in eslintrc 2023-02-23 17:33:06 +00:00
Andy Balaam
f960700a2a Exclude test from eslint checking since it always was excluded, and I can't get it to check 2023-02-23 17:10:06 +00:00
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
RiotRobot
c4b753c680 v1.11.24-rc.2 2023-02-22 11:48:00 +00:00
RiotRobot
3f999e2cd7 Prepare changelog for v1.11.24-rc.2 2023-02-22 11:48:00 +00:00
RiotRobot
c883e023eb Merge branch 'develop' into staging 2023-02-22 10:59:21 +00:00
RiotRobot
710f86abcd v1.11.24-rc.1 2023-02-21 13:23:56 +00:00
RiotRobot
90f5748ba7 Prepare changelog for v1.11.24-rc.1 2023-02-21 13:23:56 +00:00
Michael Telatynski
c9d7e37e09 Update pull_request.yaml 2023-02-21 12:24:58 +00:00
Andy Balaam
f53cb68cf8 Merge pull request #548 from RiotTranslateBot/weblate-element-desktop-element-desktop
Translations update from Weblate
2023-02-21 10:40:36 +00:00
Andy Balaam
26a308d8c6 Add typeRoots to try and appease CI 2023-02-20 16:25:17 +00:00
Andy Balaam
a0034c1ade Add a rootDir to try and appease the CI 2023-02-20 16:08:11 +00:00
Weblate
00b40a3e73 Merge branch 'origin/develop' into Weblate. 2023-02-20 12:09:50 +00:00
Michael Telatynski
cdbb7763bf Build & Package signed Linux builds (#527) 2023-02-20 12:09:45 +00:00
Andy Balaam
1271c22aee Separate linting and compiling src+test, scripts and hak
Inspired by the failure of https://github.com/vector-im/element-desktop/pull/529
to lint our code with the @typescript-eslint/no-base-to-string rule
turned on, I found we needed to add a parserOptions.project to our
.eslintrc.js, pointing to the tsconfig.json.

This led to more fixes, because we have 3 tsconfig.json files for
src+test, scripts and hak and the single eslintrc was complaining that
it could see more files than the tsconfig file knew about.

So, I think the right split is to have one eslintrc file and one
tsconfig for each of the three projects.
2023-02-17 12:17:42 +00:00
Andy Balaam
bd8c69ec74 Include the test directory in tsconfig. 2023-02-17 12:14:53 +00:00
Weblate
b4f418e2ac Merge branch 'origin/develop' into Weblate. 2023-02-17 10:44:55 +00:00
renovate[bot]
acaf040bfa Update jest monorepo to v29.4.3 (#537)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-17 10:44:50 +00:00
Weblate
2240302340 Merge branch 'origin/develop' into Weblate. 2023-02-16 19:43:34 +00:00
renovate[bot]
1462e87945 Update dependency electron to v23 (#541)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-16 19:43:29 +00:00
Weblate
42a50600c1 Merge branch 'origin/develop' into Weblate. 2023-02-16 16:38:31 +00:00
Will Hunt
03ebb5c51a No more ehome config (#545)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-02-16 16:38:25 +00:00
Weblate
ab511d6fcc Merge branch 'origin/develop' into Weblate. 2023-02-16 14:17:00 +00:00
renovate[bot]
ea688abe3b Update dependency mkdirp to v2 (#539)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-16 15:16:56 +01:00
Weblate
e81dd4cc72 Merge branch 'origin/develop' into Weblate. 2023-02-16 14:16:25 +00:00
renovate[bot]
003d8e086e Lock file maintenance (#523)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-16 14:16:20 +00:00
Weblate
d515ff52b6 Merge branch 'origin/develop' into Weblate. 2023-02-16 14:14:47 +00:00
renovate[bot]
d6350a56dc Update dependency @types/node to v16.18.12 (#534)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-16 15:14:42 +01:00
Suguru Hirahara
8b54188e46 Translated using Weblate (Japanese)
Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/ja/
2023-02-16 10:33:34 +00:00
Weblate
c3630756d7 Merge branch 'origin/develop' into Weblate. 2023-02-14 10:52:50 +00:00
RiotRobot
69392fd8da Merge branch 'master' into develop 2023-02-14 10:52:44 +00:00
RiotRobot
913a40bacd v1.11.23 2023-02-14 10:52:29 +00:00
RiotRobot
83ab73202e Prepare changelog for v1.11.23 2023-02-14 10:52:28 +00:00
Weblate
1bfb53424a Merge branch 'origin/develop' into Weblate. 2023-02-13 10:01:17 +00:00
Michael Telatynski
c1dd1dc73c Fix macos release symlinking (#543) 2023-02-13 10:01:11 +00:00
Kaede
25e857e644 Translated using Weblate (Japanese)
Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/ja/
2023-02-12 15:33:33 +00:00
Kaede
119926984b Added translation using Weblate (Japanese) 2023-02-11 14:31:38 +00:00
Weblate
a60a748fd4 Merge branch 'origin/develop' into Weblate. 2023-02-07 22:58:49 +00:00
renovate[bot]
888c619d62 Update dependency @aws-sdk/client-s3 to v3.264.0 (#535)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-07 22:58:44 +00:00
RiotRobot
7e87dd6996 v1.11.23-rc.1 2023-02-07 12:29:16 +00:00
RiotRobot
a205d3a696 Prepare changelog for v1.11.23-rc.1 2023-02-07 12:29:16 +00:00
Weblate
1f637a82d3 Merge branch 'origin/develop' into Weblate. 2023-02-03 10:12:02 +00:00
Michael Telatynski
2ad46704af Update to Electron 22.2.0 - fix tray icons in Linux (#530) 2023-02-03 10:11:57 +00:00
bluelullaby6
bcfa82335e Translated using Weblate (French)
Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/fr/
2023-02-02 23:33:30 +00:00
Weblate
2da8c2012f Merge branch 'origin/develop' into Weblate. 2023-01-31 16:10:54 +00:00
Michael Telatynski
47165ca73d Update build_macos.yaml 2023-01-31 16:10:51 +00:00
Weblate
65089492f8 Merge branch 'origin/develop' into Weblate. 2023-01-31 15:49:45 +00:00
Michael Telatynski
66d96fea2c Update build_macos.yaml 2023-01-31 15:49:41 +00:00
Weblate
e34ec05f8c Merge branch 'origin/develop' into Weblate. 2023-01-31 15:06:46 +00:00
RiotRobot
f6efaf069a Merge branch 'master' into develop 2023-01-31 15:06:41 +00:00
RiotRobot
72dfdda0e5 v1.11.22 2023-01-31 15:06:24 +00:00
RiotRobot
679cf24a85 Prepare changelog for v1.11.22 2023-01-31 15:06:23 +00:00
Weblate
ca20f91bf3 Merge branch 'origin/develop' into Weblate. 2023-01-31 13:55:12 +00:00
Michael Telatynski
3330b8485c Update build_macos.yaml 2023-01-31 13:55:09 +00:00
Weblate
08f558d345 Merge branch 'origin/develop' into Weblate. 2023-01-31 13:22:35 +00:00
Ion Nistor
20f9bb198b Translated using Weblate (Romanian)
Currently translated at 88.8% (40 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/ro/
2023-01-31 13:22:34 +00:00
Michael Telatynski
e5117f9736 Build, Sign & Notarise macOS builds (#486) 2023-01-31 13:22:30 +00:00
Weblate
51fe8ee024 Merge branch 'origin/develop' into Weblate. 2023-01-31 11:22:34 +00:00
RiotRobot
7f3bbc2156 v1.11.21 2023-01-31 11:22:12 +00:00
RiotRobot
5c650d6ee3 Prepare changelog for v1.11.21 2023-01-31 11:22:11 +00:00
RiotRobot
fb7a43569c v1.11.21-rc.1 2023-01-24 11:49:51 +00:00
RiotRobot
7620af7f70 Prepare changelog for v1.11.21-rc.1 2023-01-24 11:49:51 +00:00
RiotRobot
fe30072067 Merge branch 'master' into develop 2023-01-20 13:04:49 +00:00
RiotRobot
93331da979 v1.11.20 2023-01-20 13:04:34 +00:00
RiotRobot
af13eb8929 Prepare changelog for v1.11.20 2023-01-20 13:04:33 +00:00
Weblate
41fe92478c Merge branch 'origin/develop' into Weblate. 2023-01-20 13:01:05 +00:00
RiotRobot
b346984ab7 Merge branch 'master' into develop 2023-01-20 10:14:25 +00:00
RiotRobot
a23c6162f3 v1.11.19 2023-01-20 10:14:08 +00:00
RiotRobot
82d459a95d Prepare changelog for v1.11.19 2023-01-20 10:14:08 +00:00
Weblate
6a9f2050eb Merge branch 'origin/develop' into Weblate. 2023-01-20 10:10:42 +00:00
xrh0905
33740a99cd Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/zh_Hans/
2023-01-20 10:10:42 +00:00
Sveinn í Felli
8377e7d585 Translated using Weblate (Icelandic)
Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/is/
2023-01-18 17:33:25 +00:00
Demo337
68c4f38b71 Translated using Weblate (Arabic)
Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/ar/
2023-01-18 17:33:25 +00:00
RiotRobot
5395fee162 Merge branch 'master' into develop 2023-01-18 14:06:24 +00:00
RiotRobot
c3781b9ee4 v1.11.18 2023-01-18 14:06:08 +00:00
RiotRobot
b2d77edff2 Prepare changelog for v1.11.18 2023-01-18 14:06:07 +00:00
RiotRobot
f4be3bcda2 v1.11.18-rc.4 2023-01-17 09:50:57 +00:00
RiotRobot
5585292143 Prepare changelog for v1.11.18-rc.4 2023-01-17 09:50:56 +00:00
renovate[bot]
5a2b390f0f Update all non-major dependencies (#515)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-16 15:26:59 +00:00
RiotRobot
92e61681a9 v1.11.18-rc.3 2023-01-13 11:00:44 +00:00
RiotRobot
1a25dbfd44 Prepare changelog for v1.11.18-rc.3 2023-01-13 11:00:44 +00:00
renovate[bot]
9beaecc350 Update dependency @aws-sdk/client-s3 to v3.245.0 (#513)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-12 14:37:31 +00:00
renovate[bot]
9d74a215b7 Update dependency playwright to v1.29.2 (#511)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-12 14:37:17 +00:00
renovate[bot]
b9ac577d98 Update dependency @types/jest to v29.2.5 (#510)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-12 14:37:06 +00:00
RiotRobot
956ae15983 v1.11.18-rc.2 2023-01-12 14:26:34 +00:00
RiotRobot
e10c4a10e0 Prepare changelog for v1.11.18-rc.2 2023-01-12 14:26:34 +00:00
renovate[bot]
6032815f75 Update dependency @babel/core to v7.20.12 (#509)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-12 09:39:01 +00:00
renovate[bot]
597524a0fb Update typescript-eslint monorepo to v5.48.0 (#514)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-12 09:14:08 +00:00
renovate[bot]
a74d22a84b Update all non-major dependencies (#512)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-12 09:13:35 +00:00
RiotRobot
c33211cf7e v1.11.18-rc.1 2023-01-11 15:29:48 +00:00
RiotRobot
6eb79076c6 Prepare changelog for v1.11.18-rc.1 2023-01-11 15:29:47 +00:00
Element Translate Bot
c000c0ce52 Translations update from Weblate (#508)
* Added translation using Weblate (Tagalog)

* Translated using Weblate (Tagalog)

Currently translated at 31.1% (14 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/tl/

* Translated using Weblate (Esperanto)

Currently translated at 71.1% (32 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/eo/

Co-authored-by: Nate Gardner <natejgardner@gmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Christian Paul <info@jaller.de>
2023-01-11 13:19:49 +00:00
Andy Balaam
73fc7e957f Merge pull request #506 from vector-im/dependabot/npm_and_yarn/json5-1.0.2
Bump json5 from 1.0.1 to 1.0.2
2023-01-06 11:31:56 +00:00
dependabot[bot]
961cfc7746 Bump json5 from 1.0.1 to 1.0.2
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-04 20:44:25 +00:00
renovate[bot]
0ac568c137 Lock file maintenance (#505)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-04 13:43:51 -07:00
Michael Telatynski
629eb3958a Update environment name (#490) 2022-12-23 14:28:23 +00:00
RiotRobot
68797d393e Merge branch 'master' into develop 2022-12-21 17:31:28 +00:00
RiotRobot
723ea9d5ff v1.11.17 2022-12-21 17:31:13 +00:00
RiotRobot
b1b15e1e7b Prepare changelog for v1.11.17 2022-12-21 17:31:12 +00:00
renovate[bot]
c164f3cbe9 Update dependency @types/node to v16.18.8 (#489)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-15 22:06:26 -07:00
renovate[bot]
aa4c25016d Update typescript-eslint monorepo to v5.46.1 (#493)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-15 22:06:00 -07:00
renovate[bot]
16f253690a Update all non-major dependencies (#491)
* Update all non-major dependencies

* Add prettier

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
2022-12-15 18:14:43 +00:00
Andy Balaam
f542491467 Merge pull request #496 from vector-im/andybalaam/format-prettier
Format all files with prettier
2022-12-15 17:24:49 +00:00
Andy Balaam
c6d44418b5 Format build.yaml 2022-12-15 16:20:32 +00:00
Andy Balaam
a99f9a6aee wip 2022-12-15 16:03:02 +00:00
Michael Telatynski
86149805b9 Fix macOS tests (#495) 2022-12-15 15:21:04 +00:00
Andy Balaam
0faac52dae Format all files with prettier 2022-12-15 11:52:12 +00:00
renovate[bot]
040344eeab Update dependency @aws-sdk/client-s3 to v3.226.0 (#492)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-14 12:53:40 +00:00
renovate[bot]
799b23e2a9 Update dependency @types/jest to v29.2.4 (#488)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-14 11:13:15 +00:00
Michael Telatynski
d766aef435 Enable strict mode on hak tsconfig (#483) 2022-12-14 10:47:35 +00:00
RiotRobot
1142160222 v1.11.17-rc.1 2022-12-14 09:52:34 +00:00
RiotRobot
c280560c2c Prepare changelog for v1.11.17-rc.1 2022-12-14 09:52:33 +00:00
Element Translate Bot
19f04d4362 Translations update from Weblate (#487)
* Translated using Weblate (Norwegian Bokmål)

Currently translated at 80.0% (36 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/nb_NO/

* Translated using Weblate (Norwegian Bokmål)

Currently translated at 80.0% (36 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/nb_NO/

Co-authored-by: San Jacobs <sanjacobs@protonmail.com>
Co-authored-by: Martin Berg Alstad <martin.alstad@pm.me>
Co-authored-by: Weblate <noreply@weblate.org>
2022-12-13 14:42:41 +00:00
Michael Telatynski
2f48519dce Improve build time in CI through caching native modules (#482)
* Improve caching of hak native modules

* Avoid double-hashing

* Skip native installs where cache is hit

* Include Electron version in the hash, it affects the ABI

* Add missing step IDs

* Add comments
2022-12-13 14:12:40 +00:00
renovate[bot]
6508e171db Update dependency electron to v22 (#480)
* Update dependency electron to v22

* Switch from new-window event to setWindowOpenHandler

* Stop recommending libappindicator3-1, Electron 22 stops using it

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-12-07 00:04:53 +00:00
RiotRobot
333361fc02 Merge branch 'master' into develop 2022-12-06 13:15:16 +00:00
RiotRobot
9d08c84331 v1.11.16 2022-12-06 13:15:02 +00:00
RiotRobot
0b67e84574 Prepare changelog for v1.11.16 2022-12-06 13:15:02 +00:00
Michael Telatynski
23fac479fe Switch macOS update mechanism to static JSON mode (#461) 2022-12-05 12:41:13 +00:00
Michael Telatynski
56370de568 Improve use of Typescript (#474)
* Switch out needle with node-fetch

* Iterate

* Update asar package and switch to canonical name

* Use ts-node for scripts

* Iterate

* Update yarn.lock

* Use node:stream.promises

* Remove logfile

* Fix types

* Fix types
2022-12-05 11:50:49 +00:00
RiotRobot
9bdb1fadd4 v1.11.16-rc.2 2022-12-02 17:08:05 +00:00
RiotRobot
86a386449f Prepare changelog for v1.11.16-rc.2 2022-12-02 17:08:04 +00:00
renovate[bot]
b52787a49e Update dependency fs-extra to v11 (#481)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-02 10:57:37 +00:00
renovate[bot]
8c91ead163 Update dependency pacote to v15 (#479)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-01 11:38:43 +00:00
renovate[bot]
9d6008519e Update dependency glob to v8 (#478)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-01 08:23:42 +00:00
renovate[bot]
d3fbf1366b Update dependency asar to v3 (#476)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-01 07:50:17 +00:00
renovate[bot]
f4bf425148 Update all non-major dependencies (#468)
* Update all non-major dependencies

* Iterate PR

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-12-01 07:20:55 +00:00
renovate[bot]
19351d766d Update actions/checkout action to v3 (#472)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-01 06:55:00 +00:00
renovate[bot]
017721ecca Update dependency fs-extra to v10 (#473)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-01 04:46:39 +00:00
renovate[bot]
5d0f3921b4 Update dependency eslint-plugin-unicorn to v45 (#470)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-01 04:01:46 +00:00
renovate[bot]
ee28079c2b Update jest monorepo to v29 (#466)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-30 16:49:11 +00:00
Michael Telatynski
031ee44571 Enable noImplicitAny and kill off request (#457)
* Enable noImplicitAny

* Switch from request to node-fetch

* Fix node-fetch via patch-package

* Add edge to handler

* Pin node-fetch to v2
2022-11-30 13:51:54 +00:00
Michael Telatynski
c74fdb632b Update generate-packages-index.ts 2022-11-30 11:26:57 +00:00
Michael Telatynski
d72bf8b414 Update generate-packages-index.ts 2022-11-30 11:23:21 +00:00
Michael Telatynski
34e96ea25e Update CODEOWNERS (#464) 2022-11-29 23:27:48 +00:00
ElementRobot
18f61ab734 Merge pull request #463 from vector-im/actions/upgrade-deps
Upgrade dependencies
2022-11-29 20:56:03 +00:00
t3chguy
705972d87b [create-pull-request] automated change 2022-11-29 16:20:02 +00:00
RiotRobot
7c87fff295 v1.11.16-rc.1 2022-11-29 15:54:35 +00:00
RiotRobot
f5fa0ae7be Prepare changelog for v1.11.16-rc.1 2022-11-29 15:54:34 +00:00
RiotRobot
c01a4f683e Merge remote-tracking branch 'origin/develop' into develop 2022-11-29 15:28:21 +00:00
RiotRobot
9f218f30d8 Merge branch 'master' into develop
# Conflicts:
#	package.json
#	yarn.lock
2022-11-29 15:28:13 +00:00
Michael Telatynski
e270bb7071 Update generate-packages-index.ts 2022-11-29 15:01:16 +00:00
Michael Telatynski
3bf4e37b22 Update generate-packages-index.ts 2022-11-29 10:36:01 +00:00
Michael Telatynski
eb2ec70ad9 Update generate-packages-index.ts 2022-11-29 10:25:31 +00:00
Michael Telatynski
184fe3104a Update generate-packages-index.ts 2022-11-29 10:20:37 +00:00
Michael Telatynski
9c5f703eaf Update packages_index.yaml 2022-11-29 10:08:17 +00:00
Michael Telatynski
5770549819 Update packages_index.yaml 2022-11-29 10:06:58 +00:00
Michael Telatynski
7f7069b326 Update packages_index.yaml 2022-11-29 10:04:33 +00:00
Michael Telatynski
4e0d1b1497 Create packages.element.io directory index scripts (#456) 2022-11-29 09:59:02 +00:00
RiotRobot
1bd42c7bbf v1.11.15 2022-11-22 12:20:51 +00:00
RiotRobot
101ecea3ee Prepare changelog for v1.11.15 2022-11-22 12:20:50 +00:00
Michael Telatynski
247eca7b24 Update to Electron 21 (#458) 2022-11-22 10:17:42 +00:00
David Baker
b35dbfec1b Downgrade to electron 20.3.4 to fix crash on call hangup (#459)
Co-authored-by: t3chguy <t3chguy@users.noreply.github.com>
Co-authored-by: ElementRobot <releases@riot.im>
Fixes https://github.com/vector-im/element-web/issues/23783
Fixes undefined
2022-11-22 10:17:02 +00:00
RiotRobot
8359f36dd1 v1.11.15-rc.1 2022-11-15 18:53:19 +00:00
RiotRobot
7235851f88 Prepare changelog for v1.11.15-rc.1 2022-11-15 18:53:18 +00:00
RiotRobot
6af176f263 Prepare changelog for v1.11.15-rc.1 2022-11-15 18:33:06 +00:00
ElementRobot
53ab0e2843 Merge pull request #455 from vector-im/actions/upgrade-deps
Upgrade dependencies
2022-11-15 18:32:11 +00:00
t3chguy
d95838cb9a [create-pull-request] automated change 2022-11-15 17:58:37 +00:00
Element Translate Bot
12bc319033 Translations update from Weblate (#454)
* Added translation using Weblate (Urdu)

* Translated using Weblate (Urdu)

Currently translated at 31.1% (14 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/ur/

* Translated using Weblate (Urdu)

Currently translated at 37.7% (17 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/ur/

* Translated using Weblate (Tamil)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/ta/

* Translated using Weblate (Lithuanian)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/lt/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/

Co-authored-by: proudmuslim-dev <ayaan7689@protonmail.com>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Stnby <stnby@tuta.io>
2022-11-15 17:45:26 +00:00
Michael Telatynski
791a7e71fd Build Linux to tar.gz (#453) 2022-11-14 18:02:34 +00:00
Michael Telatynski
d45b3aac65 Improve workflow reuse (#452) 2022-11-14 11:09:07 +00:00
Michael Telatynski
1e6a3ceebd Improve CI stability and tidy it up (#451) 2022-11-11 15:15:21 +00:00
Michael Telatynski
79b0b3077a Update fetch-package.js to use new GHA deployment for develop (#450) 2022-11-11 14:23:42 +00:00
Michael Telatynski
474dcb6825 Add missing Deb dependencies libasound2 & libgbm1 (#449) 2022-11-10 16:10:03 +00:00
RiotRobot
6ba168f8cf Merge branch 'master' into develop 2022-11-08 17:35:43 +00:00
RiotRobot
727ede4436 Merge branch 'staging' 2022-11-08 17:35:39 +00:00
RiotRobot
6859c86773 v1.11.14 2022-11-08 17:34:39 +00:00
RiotRobot
79ec793099 Prepare changelog for v1.11.14 2022-11-08 17:34:39 +00:00
Michael Telatynski
ea23302079 Disable MSI as they are failing with Error 217 (#447) 2022-11-08 17:31:02 +00:00
RiotRobot
23b83bac26 Merge branch 'master' into develop
# Conflicts:
#	package.json
#	yarn.lock
2022-11-08 16:23:45 +00:00
RiotRobot
70814b7f96 v1.11.14 2022-11-08 16:22:22 +00:00
RiotRobot
db4e3d2fec Prepare changelog for v1.11.14 2022-11-08 16:22:21 +00:00
Michael Telatynski
5380c533cf Disable MSI as they are failing with Error 217 (#447) 2022-11-08 15:09:41 +00:00
RiotRobot
0c93040b41 v1.11.14-rc.2 2022-11-08 13:47:28 +00:00
RiotRobot
4bb9bc8441 CHANGELOG.md 2022-11-08 13:47:21 +00:00
ElementRobot
8473f3eec8 [Backport staging] Switch to notarytool (#443)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-11-08 10:00:01 +00:00
Michael Telatynski
a104be4fa1 Update to @electron/notarize 2022-11-08 09:59:42 +00:00
ElementRobot
c06349d814 [Backport staging] Update to Node 16 (#442)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-11-08 09:53:31 +00:00
ElementRobot
25d3ca5a4a [Backport staging] Fix macOS builds in GHA (#445)
(cherry picked from commit b4ea922b4b)

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-11-08 09:16:03 +00:00
Michael Telatynski
6f263e1db6 Update to @electron/notarize (#444)
* Update to @electron/notarize

* Fix lockfile
2022-11-08 09:12:58 +00:00
Michael Telatynski
1a5176bc73 Update to Node 16 (#441) 2022-11-07 18:49:46 +00:00
Michael Telatynski
7a8e5b6f00 Switch to notarytool (#440) 2022-11-07 18:26:40 +00:00
Michael Telatynski
c9b0a0866b Update to @electron/notarize (#439) 2022-11-07 17:56:47 +00:00
Michael Telatynski
537904f51b Add eslint rule unicorn/no-instanceof-array (#434)
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2022-11-04 15:58:19 +00:00
Michael Telatynski
2032f64766 Ensure EventStore is created in the appropriate userData directory (#433) 2022-11-04 14:58:23 +00:00
ElementRobot
43484b21f4 Merge pull request #436 from vector-im/actions/upgrade-deps
Upgrade dependencies
2022-11-04 12:52:34 +00:00
Michael Telatynski
184bfb8f1a Merge branch 'develop' into actions/upgrade-deps 2022-11-04 12:22:28 +00:00
Michael Telatynski
b4ea922b4b Fix macOS builds in GHA (#438) 2022-11-04 12:20:16 +00:00
RiotRobot
b6659ad8e8 v1.11.14-rc.1 2022-11-01 15:18:11 +00:00
RiotRobot
843056f53d Prepare changelog for v1.11.14-rc.1 2022-11-01 15:18:11 +00:00
t3chguy
a7c3aea8fd [create-pull-request] automated change 2022-11-01 15:03:34 +00:00
Element Translate Bot
31c7b7c927 Translations update from Weblate (#435)
* Translated using Weblate (Hungarian)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/hu/

* Translated using Weblate (Italian)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/it/

* Translated using Weblate (German)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/de/

* Translated using Weblate (Estonian)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/et/

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/pt_BR/

* Translated using Weblate (Indonesian)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/id/

* Translated using Weblate (Chinese (Traditional))

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/zh_Hant/

* Translated using Weblate (Slovak)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/sk/

* Translated using Weblate (Russian)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/ru/

* Translated using Weblate (Persian)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/fa/

* Translated using Weblate (Swedish)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/sv/

* Translated using Weblate (Finnish)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/fi/

* Translated using Weblate (Latvian)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/lv/

* Translated using Weblate (Spanish)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/es/

* Translated using Weblate (Dutch)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/nl/

Co-authored-by: Szimszon <github@oregpreshaz.eu>
Co-authored-by: random <dictionary@tutamail.com>
Co-authored-by: Vri <element@vrifox.cc>
Co-authored-by: Priit Jõerüüt <riot@joeruut.com>
Co-authored-by: lvre <7uu3qrbvm@relay.firefox.com>
Co-authored-by: Linerly <linerly@protonmail.com>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
Co-authored-by: Jozef Gaal <preklady@mayday.sk>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Nui Harime <harime.nui@yandex.ru>
Co-authored-by: mmehdishafiee <mmhdishafiee@gmail.com>
Co-authored-by: LinAGKar <linus.kardell@gmail.com>
Co-authored-by: Jiri Grönroos <jiri.gronroos@iki.fi>
Co-authored-by: Coool (github.com/Coool) <coool@mail.lv>
Co-authored-by: Avery <aveeryy@protonmail.com>
Co-authored-by: Johan Smits <johan@smitsmail.net>
2022-11-01 14:30:07 +00:00
RiotRobot
8e6bf8335c Merge branch 'master' into develop 2022-11-01 10:10:52 +00:00
RiotRobot
57cfcd98c5 v1.11.13 2022-11-01 10:10:39 +00:00
RiotRobot
dc68d31f82 Prepare changelog for v1.11.13 2022-11-01 10:10:38 +00:00
RiotRobot
d6c73c42a6 Merge branch 'master' into develop 2022-10-26 16:54:28 +01:00
RiotRobot
b0a05c8e66 v1.11.12 2022-10-26 16:54:15 +01:00
RiotRobot
4a8d4ce97a Prepare changelog for v1.11.12 2022-10-26 16:54:15 +01:00
RiotRobot
8f06c3c32f Merge branch 'master' into develop 2022-10-25 18:10:25 +01:00
RiotRobot
9eae33bf93 v1.11.11 2022-10-25 18:10:10 +01:00
RiotRobot
e35a15f348 Prepare changelog for v1.11.11 2022-10-25 18:10:10 +01:00
RiotRobot
cfbe7f0c66 v1.11.11-rc.2 2022-10-24 17:25:35 +01:00
RiotRobot
c7cdf19645 Prepare changelog for v1.11.11-rc.2 2022-10-24 17:25:35 +01:00
Michael Telatynski
d31622d98c Fix i18n interpolation (#432) 2022-10-21 16:45:34 +01:00
Element Translate Bot
0f52d2057e Translations update from Weblate (#431)
* Translated using Weblate (Hungarian)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/hu/

* Translated using Weblate (Italian)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/it/

* Translated using Weblate (German)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/de/

* Translated using Weblate (Estonian)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/et/

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/pt_BR/

* Translated using Weblate (Indonesian)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/id/

* Translated using Weblate (Chinese (Traditional))

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/zh_Hant/

* Translated using Weblate (Slovak)

Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/sk/

Co-authored-by: Szimszon <github@oregpreshaz.eu>
Co-authored-by: random <dictionary@tutamail.com>
Co-authored-by: Vri <element@vrifox.cc>
Co-authored-by: Priit Jõerüüt <riot@joeruut.com>
Co-authored-by: lvre <7uu3qrbvm@relay.firefox.com>
Co-authored-by: Linerly <linerly@protonmail.com>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
Co-authored-by: Jozef Gaal <preklady@mayday.sk>
2022-10-19 13:34:16 -06:00
ElementRobot
74f0e49073 Merge pull request #430 from vector-im/actions/upgrade-deps
Upgrade dependencies
2022-10-18 15:22:08 +01:00
t3chguy
8a1f461dc0 [create-pull-request] automated change 2022-10-18 13:38:27 +00:00
RiotRobot
a29c20ee1c v1.11.11-rc.1 2022-10-18 14:32:53 +01:00
RiotRobot
3862d29e39 Prepare changelog for v1.11.11-rc.1 2022-10-18 14:32:53 +01:00
Michael Telatynski
ac088dd394 Use brand variable in close confirmation message box (#429) 2022-10-18 12:43:30 +00:00
Element Translate Bot
dc5fc7a2c1 Translations update from Weblate (#428)
Currently translated at 84.4% (38 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/ro/

Co-authored-by: Julian Dumitrascu <get.julian@gmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
2022-10-18 12:33:30 +01:00
Michael Telatynski
d0e1596bf2 Enable Typescript strict mode (#426) 2022-10-13 12:42:33 +01:00
156 changed files with 10008 additions and 7521 deletions

22
.eslintrc-hak.js Normal file
View File

@@ -0,0 +1,22 @@
module.exports = {
plugins: ["matrix-org"],
extends: [".eslintrc.js"],
parserOptions: {
project: ["hak/tsconfig.json"],
},
overrides: [
{
files: ["hak/**/*.ts"],
extends: ["plugin:matrix-org/typescript"],
rules: {
// Things we do that break the ideal style
"prefer-promise-reject-errors": "off",
"quotes": "off",
"@typescript-eslint/no-explicit-any": "off",
// We're okay with assertion errors when we ask for them
"@typescript-eslint/no-non-null-assertion": "off",
},
},
],
};

22
.eslintrc-scripts.js Normal file
View File

@@ -0,0 +1,22 @@
module.exports = {
plugins: ["matrix-org"],
extends: [".eslintrc.js"],
parserOptions: {
project: ["scripts/tsconfig.json"],
},
overrides: [
{
files: ["scripts/**/*.ts"],
extends: ["plugin:matrix-org/typescript"],
rules: {
// Things we do that break the ideal style
"prefer-promise-reject-errors": "off",
"quotes": "off",
"@typescript-eslint/no-explicit-any": "off",
// We're okay with assertion errors when we ask for them
"@typescript-eslint/no-non-null-assertion": "off",
},
},
],
};

22
.eslintrc-test.js Normal file
View File

@@ -0,0 +1,22 @@
module.exports = {
plugins: ["matrix-org"],
extends: [".eslintrc.js"],
parserOptions: {
project: ["test/tsconfig.json"],
},
overrides: [
{
files: ["test/**/*.ts"],
extends: ["plugin:matrix-org/typescript"],
rules: {
// Things we do that break the ideal style
"prefer-promise-reject-errors": "off",
"quotes": "off",
"@typescript-eslint/no-explicit-any": "off",
// We're okay with assertion errors when we ask for them
"@typescript-eslint/no-non-null-assertion": "off",
},
},
],
};

View File

@@ -1,10 +1,9 @@
module.exports = {
plugins: ["matrix-org"],
extends: [
"plugin:matrix-org/javascript",
],
extends: ["plugin:matrix-org/javascript"],
parserOptions: {
ecmaVersion: 2021,
project: ["tsconfig.json"],
},
env: {
es6: true,
@@ -20,18 +19,19 @@ module.exports = {
"prefer-promise-reject-errors": "off",
"no-async-promise-executor": "off",
},
overrides: [{
files: ["{src,scripts,hak}/**/*.{ts,tsx}"],
extends: [
"plugin:matrix-org/typescript",
],
rules: {
// Things we do that break the ideal style
"prefer-promise-reject-errors": "off",
"quotes": "off",
overrides: [
{
files: ["src/**/*.ts"],
extends: ["plugin:matrix-org/typescript"],
rules: {
// Things we do that break the ideal style
"prefer-promise-reject-errors": "off",
"quotes": "off",
// We disable this while we're transitioning
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-explicit-any": "off",
// We're okay with assertion errors when we ask for them
"@typescript-eslint/no-non-null-assertion": "off",
},
},
}],
],
};

5
.github/CODEOWNERS vendored
View File

@@ -1 +1,4 @@
* @vector-im/element-web
* @vector-im/element-web
/.github/workflows/** @vector-im/element-web-app-team
/package.json @vector-im/element-web-app-team
/yarn.lock @vector-im/element-web-app-team

76
.github/ISSUE_TEMPLATE/bug-desktop.yml vendored Normal file
View File

@@ -0,0 +1,76 @@
name: Bug report for the Element desktop app (not in a browser)
description: File a bug report if you are using the desktop Element application.
labels: [T-Defect]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
Please report security issues by email to security@matrix.org
- type: textarea
id: reproduction-steps
attributes:
label: Steps to reproduce
description: Please attach screenshots, videos or logs if you can.
placeholder: Tell us what you see!
value: |
1. Where are you starting? What can you see?
2. What do you click?
3. More steps…
validations:
required: true
- type: textarea
id: result
attributes:
label: Outcome
placeholder: Tell us what went wrong
value: |
#### What did you expect?
#### What happened instead?
validations:
required: true
- type: input
id: os
attributes:
label: Operating system
placeholder: Windows, macOS, Ubuntu, Arch Linux…
validations:
required: false
- type: input
id: version
attributes:
label: Application version
description: You can find the version information in Settings -> Help & About.
placeholder: e.g. Element version 1.7.34, olm version 3.2.3
validations:
required: false
- type: input
id: source
attributes:
label: How did you install the app?
description: Where did you install the app from? Please give a link or a description.
placeholder: e.g. From https://element.io/get-started
validations:
required: false
- type: input
id: homeserver
attributes:
label: Homeserver
description: |
Which server is your account registered on? If it is a local or non-public homeserver, please tell us what is the homeserver implementation (ex: Synapse/Dendrite/etc.) and the version.
placeholder: e.g. matrix.org or Synapse 1.50.0rc1
validations:
required: false
- type: dropdown
id: rageshake
attributes:
label: Will you send logs?
description: |
Did you know that you can send a /rageshake command from your application to submit logs for this issue? Trigger the defect, then type `/rageshake` into the message input area followed by a description of the problem and send the command. You will be able to add a link to this defect report and submit anonymous logs to the developers.
options:
- "Yes"
- "No"
validations:
required: true

1
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1 @@
blank_issues_enabled: false

36
.github/ISSUE_TEMPLATE/enhancement.yml vendored Normal file
View File

@@ -0,0 +1,36 @@
name: Enhancement request
description: Do you have a suggestion or feature request?
labels: [T-Enhancement]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to propose an enhancement to an existing feature. If you would like to propose a new feature or a major cross-platform change, please [start a discussion here](https://github.com/vector-im/element-meta/discussions/new?category=ideas).
- type: textarea
id: usecase
attributes:
label: Your use case
description: What would you like to be able to do? Please feel welcome to include screenshots or mock ups.
placeholder: Tell us what you would like to do!
value: |
#### What would you like to do?
#### Why would you like to do it?
#### How would you like to achieve it?
validations:
required: true
- type: textarea
id: alternative
attributes:
label: Have you considered any alternatives?
placeholder: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: Additional context
placeholder: Is there anything else you'd like to add?
validations:
required: false

View File

@@ -2,9 +2,9 @@
## Checklist
* [ ] Ensure your code works with manual testing
* [ ] Linter and other CI checks pass
* [ ] Sign-off given on the changes (see [CONTRIBUTING.md](https://github.com/vector-im/element-desktop/blob/develop/CONTRIBUTING.md))
- [ ] Ensure your code works with manual testing
- [ ] Linter and other CI checks pass
- [ ] Sign-off given on the changes (see [CONTRIBUTING.md](https://github.com/vector-im/element-desktop/blob/develop/CONTRIBUTING.md))
<!--
If you would like to specify text for the changelog entry other than your PR title, add the following:

View File

@@ -1,6 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>matrix-org/renovate-config-element-web"
]
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>matrix-org/renovate-config-element-web"]
}

View File

@@ -1,30 +1,30 @@
name: Backport
on:
pull_request_target:
types:
- closed
- labeled
branches:
- develop
pull_request_target:
types:
- closed
- labeled
branches:
- develop
jobs:
backport:
name: Backport
runs-on: ubuntu-latest
# Only react to merged PRs for security reasons.
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
if: >
github.event.pull_request.merged
&& (
github.event.action == 'closed'
|| (
github.event.action == 'labeled'
&& contains(github.event.label.name, 'backport')
)
)
steps:
- uses: tibdex/backport@v2
with:
labels_template: "<%= JSON.stringify([...labels, 'X-Release-Blocker']) %>"
# We can't use GITHUB_TOKEN here or CI won't run on the new PR
github_token: ${{ secrets.ELEMENT_BOT_TOKEN }}
backport:
name: Backport
runs-on: ubuntu-latest
# Only react to merged PRs for security reasons.
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
if: >
github.event.pull_request.merged
&& (
github.event.action == 'closed'
|| (
github.event.action == 'labeled'
&& contains(github.event.label.name, 'backport')
)
)
steps:
- uses: tibdex/backport@9565281eda0731b1d20c4025c43339fb0a23812e # v2
with:
labels_template: "<%= JSON.stringify([...labels, 'X-Release-Blocker']) %>"
# We can't use GITHUB_TOKEN here or CI won't run on the new PR
github_token: ${{ secrets.ELEMENT_BOT_TOKEN }}

View File

@@ -1,288 +0,0 @@
name: Build and Test
on:
pull_request: { }
push:
branches: [ develop, master ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
fetch:
name: Prepare
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: "yarn"
node-version: 16
- name: Install Deps
run: "yarn install --pure-lockfile"
- name: Fetch Element Web (develop)
if: github.event.pull_request.base.ref == 'develop'
run: yarn run fetch --noverify develop -d element.io/nightly
- name: Fetch Element Web
if: github.event.pull_request.base.ref != 'develop'
run: yarn run fetch --noverify --cfgdir element.io/release
- uses: actions/upload-artifact@v3
with:
name: webapp
retention-days: 1
path: |
webapp.asar
package.json
windows:
needs: fetch
strategy:
matrix:
include:
- target: x86_64-pc-windows-msvc
arch: x64
- target: i686-pc-windows-msvc
arch: x86
build-args: --ia32
name: Windows (${{ matrix.arch }})
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: webapp
- name: Cache .hak
uses: actions/cache@v3
with:
key: ${{ runner.os }}-${{ hashFiles('./yarn.lock') }}
path: |
./.hak
- name: Set up build tools
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
# ActiveTCL package on choco is from 2015,
# this one is newer but includes more than we need
- name: Choco install tclsh
shell: pwsh
run: |
choco install -y magicsplat-tcl-tk --no-progress
echo "${HOME}/AppData/Local/Apps/Tcl86/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Choco install NetWide Assembler
shell: pwsh
run: |
choco install -y nasm --no-progress
echo "C:/Program Files/NASM" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
- uses: actions/setup-node@v3
with:
cache: "yarn"
node-version: 16
# Does not need branch matching as only analyses this layer
- name: Install Deps
run: "yarn install --pure-lockfile"
- name: Build Natives
run: |
refreshenv
yarn build:native --target ${{ matrix.target }}
- name: Build App
run: "yarn build --publish never -w ${{ matrix.build-args }}"
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: win-${{ matrix.arch }}
path: dist
retention-days: 1
linux:
needs: fetch
strategy:
matrix:
include:
- sqlcipher: system
- sqlcipher: static
static: 1
name: 'Linux (sqlcipher: ${{ matrix.sqlcipher }})'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: webapp
- name: Cache .hak
uses: actions/cache@v3
with:
key: ${{ hashFiles('./yarn.lock') }}
path: |
./.hak
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install libsqlcipher-dev
if: matrix.sqlcipher == 'system'
run: sudo apt-get install -y libsqlcipher-dev
- uses: actions/setup-node@v3
with:
cache: "yarn"
node-version: 16
# Does not need branch matching as only analyses this layer
- name: Install Deps
run: "yarn install --pure-lockfile"
- name: Build Natives
run: "yarn build:native"
env:
SQLCIPHER_STATIC: ${{ matrix.static }}
- name: Build App
run: "yarn build --publish never"
- name: Install .deb
run: "sudo apt install ./dist/*.deb"
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: linux-sqlcipher-${{ matrix.sqlcipher }}
path: dist
retention-days: 1
macos:
needs: fetch
name: macOS (universal)
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: webapp
- name: Cache .hak
uses: actions/cache@v3
with:
key: ${{ hashFiles('./yarn.lock') }}
path: |
./.hak
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: aarch64-apple-darwin
- uses: actions/setup-node@v3
with:
cache: "yarn"
node-version: 16
# Does not need branch matching as only analyses this layer
- name: Install Deps
run: "yarn install --pure-lockfile"
- name: Build Natives
run: "yarn build:native:universal"
- name: Build App
run: "yarn build:universal --publish never"
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: macos
path: dist
retention-days: 1
test:
needs:
- macos
- linux
- windows
strategy:
matrix:
include:
# Disable macOS tests for now, they fail to run in CI, needs investigation.
# - name: macOS Universal
# os: macos
# artifact: macos
# executable: "./dist/mac-universal/Element.app/Contents/MacOS/Element"
# prepare_cmd: "chmod +x ./dist/mac-universal/Element.app/Contents/MacOS/Element"
- name: 'Linux (sqlcipher: system)'
os: ubuntu
artifact: linux-sqlcipher-system
executable: "element-desktop"
prepare_cmd: "sudo apt install ./dist/*.deb"
- name: 'Linux (sqlcipher: static)'
os: ubuntu
artifact: linux-sqlcipher-static
executable: "element-desktop"
prepare_cmd: "sudo apt install ./dist/*.deb"
- name: Windows (x86)
os: windows
artifact: win-x86
executable: "./dist/win-ia32-unpacked/Element.exe"
- name: Windows (x64)
os: windows
artifact: win-x64
executable: "./dist/win-unpacked/Element.exe"
name: Test ${{ matrix.name }}
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: "yarn"
node-version: 16
- name: Install Deps
run: "yarn install --pure-lockfile"
- uses: actions/download-artifact@v3
with:
name: ${{ matrix.artifact }}
path: dist
- name: Prepare for tests
run: ${{ matrix.prepare_cmd }}
if: matrix.prepare_cmd
- name: Run tests
uses: GabrielBB/xvfb-action@v1
timeout-minutes: 5
with:
run: "yarn test"
env:
ELEMENT_DESKTOP_EXECUTABLE: ${{ matrix.executable }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.artifact }}
path: test_artifacts
retention-days: 1

173
.github/workflows/build_and_deploy.yaml vendored Normal file
View File

@@ -0,0 +1,173 @@
name: Build and Deploy
on:
# Nightly build
schedule:
- cron: "0 9 * * *"
# Release build
release:
types: [published]
# Manual nightly & release
workflow_dispatch:
inputs:
mode:
description: What type of build to trigger. Release builds MUST be ran from the `master` branch.
required: true
default: nightly
type: choice
options:
- nightly
- release
macos:
description: Build macOS
required: true
type: boolean
default: true
windows:
description: Build Windows
required: true
type: boolean
default: true
linux:
description: Build Linux
required: true
type: boolean
default: true
deploy:
description: Deploy artifacts
required: true
type: boolean
default: true
run-name: Element ${{ inputs.mode != 'release' && github.event_name != 'release' && 'Nightly' || 'Desktop' }}
concurrency: ${{ github.workflow }}
env:
R2_BUCKET: ${{ vars.R2_BUCKET }}
jobs:
prepare:
uses: ./.github/workflows/build_prepare.yaml
with:
config: element.io/${{ inputs.mode || (github.event_name == 'release' && 'release') || 'nightly' }}
version: ${{ (inputs.mode != 'release' && github.event_name != 'release') && 'develop' || '' }}
nightly: ${{ inputs.mode != 'release' && github.event_name != 'release' }}
secrets:
CF_R2_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
CF_R2_TOKEN: ${{ secrets.CF_R2_TOKEN }}
windows:
if: github.event_name != 'workflow_dispatch' || inputs.windows
needs: prepare
name: Windows ${{ matrix.arch }}
strategy:
matrix:
arch: [x86, x64]
uses: ./.github/workflows/build_windows.yaml
secrets: inherit
with:
sign: true
deploy-mode: true
arch: ${{ matrix.arch }}
version: ${{ needs.prepare.outputs.nightly-version }}
macos:
if: github.event_name != 'workflow_dispatch' || inputs.macos
needs: prepare
name: macOS
uses: ./.github/workflows/build_macos.yaml
secrets: inherit
with:
sign: true
deploy-mode: true
base-url: https://packages.element.io/${{ needs.prepare.outputs.packages-dir }}
version: ${{ needs.prepare.outputs.nightly-version }}
# We do not put these calls into deploy-mode as we do not want it to add to the packages.element.io artifact
# We ship this build via reprepro only
linux:
if: github.event_name != 'workflow_dispatch' || inputs.linux
needs: prepare
name: Linux ${{ matrix.arch }} (sqlcipher system)
strategy:
matrix:
arch: [amd64, arm64]
uses: ./.github/workflows/build_linux.yaml
with:
arch: ${{ matrix.arch }}
config: ${{ needs.prepare.outputs.config }}
sqlcipher: system
version: ${{ needs.prepare.outputs.nightly-version }}
# We ship the static build via static tarball only
linux_static:
if: github.event_name != 'workflow_dispatch' || inputs.linux
needs: prepare
name: Linux (sqlcipher static)
uses: ./.github/workflows/build_linux.yaml
with:
arch: amd64
deploy-mode: true
config: ${{ needs.prepare.outputs.config }}
sqlcipher: static
version: ${{ needs.prepare.outputs.nightly-version }}
# This deploy job only handles Windows, macOS & linux_static as those are stateless and static.
# Linux will be deployed via reprepro after it, but we list it as a dependency to abort if it fails.
deploy:
needs:
- prepare
- macos
- linux
- linux_static
- windows
runs-on: ubuntu-latest
name: Deploy
if: |
(
github.event_name != 'workflow_dispatch' &&
github.event.release.prerelease != true
) || (
always() && !failure() && !cancelled() && inputs.deploy &&
(inputs.macos || inputs.windows || inputs.linux)
)
environment: packages.element.io
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: packages.element.io
path: packages.element.io
- name: Deploy artifacts
run: |
aws s3 cp --recursive packages.element.io/ s3://$R2_BUCKET/$DEPLOYMENT_DIR --endpoint-url $R2_URL --region auto
env:
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }}
R2_URL: ${{ vars.CF_R2_S3_API }}
DEPLOYMENT_DIR: ${{ needs.prepare.outputs.packages-dir }}
- name: Notify packages.element.io of new files
uses: peter-evans/repository-dispatch@bf47d102fdb849e755b0b0023ea3e81a44b6f570 # v2
with:
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
repository: vector-im/packages.element.io
event-type: packages-index
reprepro:
needs:
- linux
# We queue this after the other deploy stage as we want to abort if that fails
- deploy
name: Run reprepro ${{ matrix.arch }}
strategy:
matrix:
arch: [amd64, arm64]
if: |
(
github.event_name != 'workflow_dispatch' &&
github.event.release.prerelease != true
) || (
always() && !failure() && !cancelled() && inputs.deploy && inputs.linux
)
uses: ./.github/workflows/reprepro.yaml
secrets: inherit
with:
artifact-name: linux-${{ matrix.arch }}-sqlcipher-system

164
.github/workflows/build_and_test.yaml vendored Normal file
View File

@@ -0,0 +1,164 @@
name: Build and Test
on:
pull_request: {}
push:
branches: [develop, staging, master]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
fetch:
uses: ./.github/workflows/build_prepare.yaml
with:
config: ${{ github.event.pull_request.base.ref == 'develop' && 'element.io/nightly' || 'element.io/release' }}
version: ${{ github.event.pull_request.base.ref == 'develop' && 'develop' || '' }}
windows:
needs: fetch
name: Windows
uses: ./.github/workflows/build_windows.yaml
strategy:
matrix:
arch: [x64, x86]
with:
arch: ${{ matrix.arch }}
# This allows core contributors to test changes to the dockerbuild image within a pull request
linux_docker:
name: Linux docker
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
outputs:
docker-image: ${{ steps.docker.outputs.image }}
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-dockerbuild-pr
steps:
- uses: actions/checkout@v3
- name: "Get modified files"
id: changed_files
uses: tj-actions/changed-files@41960309398d165631f08c5df47a11147e14712b # v39
with:
files: |
dockerbuild/*
- name: Log in to the Container registry
if: steps.changed_files.outputs.any_modified == 'true'
uses: docker/login-action@b4bedf8053341df3b5a9f9e0f2cf4e79e27360c6
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: docker
if: steps.changed_files.outputs.any_modified == 'true'
run: |
echo "image=$IMAGE:$PR" >> $GITHUB_OUTPUT
env:
IMAGE: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
PR: ${{ github.event.pull_request.number }}
- name: Build and push Docker image
if: steps.changed_files.outputs.any_modified == 'true'
uses: docker/build-push-action@4c1b68d83ad20cc1a09620ca477d5bbbb5fa14d0
with:
context: dockerbuild
push: true
tags: ${{ steps.docker.outputs.image }}
linux:
needs:
- fetch
- linux_docker
name: "Linux (${{ matrix.arch }}) (sqlcipher: ${{ matrix.sqlcipher }})"
uses: ./.github/workflows/build_linux.yaml
strategy:
matrix:
sqlcipher: [system, static]
arch: [amd64, arm64]
exclude:
# FIXME: This combination yields a broken Seshat at this time
# Errors at launch with `undefined symbol: PKCS5_PBKDF2_HMAC
- arch: arm64
sqlcipher: static
with:
config: ${{ github.event.pull_request.base.ref == 'develop' && 'element.io/nightly' || 'element.io/release' }}
sqlcipher: ${{ matrix.sqlcipher }}
docker-image: ${{ needs.linux_docker.outputs.docker-image }}
arch: ${{ matrix.arch }}
macos:
needs: fetch
name: macOS
uses: ./.github/workflows/build_macos.yaml
test:
needs:
- macos
- linux
- windows
strategy:
matrix:
include:
- name: macOS Universal
os: macos
artifact: macos
executable: "/Volumes/Element/Element.app/Contents/MacOS/Element"
prepare_cmd: "hdiutil attach ./dist/*.dmg -mountpoint /Volumes/Element"
- name: "Linux (amd64) (sqlcipher: system)"
os: ubuntu
artifact: linux-amd64-sqlcipher-system
executable: "element-desktop"
prepare_cmd: "sudo apt install ./dist/*.deb"
- name: "Linux (amd64) (sqlcipher: static)"
os: ubuntu
artifact: linux-amd64-sqlcipher-static
executable: "element-desktop"
prepare_cmd: "sudo apt install ./dist/*.deb"
- name: Windows (x86)
os: windows
artifact: win-x86
executable: "./dist/win-ia32-unpacked/Element.exe"
- name: Windows (x64)
os: windows
artifact: win-x64
executable: "./dist/win-unpacked/Element.exe"
name: Test ${{ matrix.name }}
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: "yarn"
- name: Install Deps
run: "yarn install --frozen-lockfile"
- uses: actions/download-artifact@v3
with:
name: ${{ matrix.artifact }}
path: dist
- name: Prepare for tests
run: ${{ matrix.prepare_cmd }}
if: matrix.prepare_cmd
- name: Run tests
uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 # v1
timeout-minutes: 5
with:
run: "yarn test"
env:
ELEMENT_DESKTOP_EXECUTABLE: ${{ matrix.executable }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: ${{ matrix.artifact }}
path: test_artifacts
retention-days: 1

190
.github/workflows/build_linux.yaml vendored Normal file
View File

@@ -0,0 +1,190 @@
# This workflow relies on actions/cache to store the hak dependency artifacts as they take a long time to build
# Due to this extra care must be taken to only ever run all build_* scripts against the same branch to ensure
# the correct cache scoping, and additional care must be taken to not run untrusted actions on the develop branch.
on:
workflow_call:
inputs:
arch:
type: string
required: true
description: "The architecture to build for, one of 'amd64' | 'arm64'"
config:
type: string
required: true
description: "The config directory to use"
version:
type: string
required: false
description: "Version string to override the one in package.json, used for non-release builds"
sqlcipher:
type: string
required: true
description: "How to link sqlcipher, one of 'system' | 'static'"
deploy-mode:
type: boolean
required: false
description: "Whether to arrange artifacts in the arrangement needed for deployment, skipping unrelated ones"
docker-image:
type: string
required: false
description: "The docker image to use for the build, defaults to ghcr.io/vector-im/element-desktop-dockerbuild"
jobs:
build:
runs-on: ubuntu-latest
container:
image: ${{ inputs.docker-image || format('ghcr.io/vector-im/element-desktop-dockerbuild:{0}', github.ref_name == 'master' && 'master' || 'develop') }}
defaults:
run:
shell: bash
steps:
- uses: kanga333/variable-mapper@master
id: config
with:
key: "${{ inputs.arch }}"
export_to: output
map: |
{
"amd64": {
"target": "x86_64-unknown-linux-gnu",
"arch": "x86-64"
},
"arm64": {
"target": "aarch64-unknown-linux-gnu",
"arch": "aarch64",
"build-args": "--arm64"
}
}
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: webapp
- name: Cache .hak
id: cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-${{ inputs.docker-image || github.ref_name }}-${{ inputs.sqlcipher }}-${{ inputs.arch }}-${{ hashFiles('hakHash', 'electronVersion') }}
path: |
./.hak
- uses: actions/setup-node@v3
with:
cache: "yarn"
env:
# Workaround for https://github.com/actions/setup-node/issues/317
FORCE_COLOR: 0
# Does not need branch matching as only analyses this layer
- name: Install Deps
run: "yarn install --frozen-lockfile"
- name: Prepare for static sqlcipher build
if: inputs.sqlcipher == 'static'
run: |
echo "SQLCIPHER_BUNDLED=1" >> $GITHUB_ENV
# Ideally the docker image would be ready for cross-compilation but libsqlcipher-dev is not Multi-Arch compatible
# https://unix.stackexchange.com/a/349359
- name: Prepare for cross compilation
if: steps.cache.outputs.cache-hit != 'true' && inputs.arch == 'arm64'
run: |
set -x
sed -i 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ bionic main multiverse restricted universe" | tee -a /etc/apt/sources.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main multiverse restricted universe" | tee -a /etc/apt/sources.list
dpkg --add-architecture arm64
apt-get -qq update
apt-get -qq install --no-install-recommends crossbuild-essential-arm64 libsqlcipher-dev:arm64 libssl-dev:arm64 libsecret-1-dev:arm64 libgnome-keyring-dev:arm64
rustup target add aarch64-unknown-linux-gnu
mv dockerbuild/aarch64/.cargo .
cat dockerbuild/aarch64/.env >> $GITHUB_ENV
- name: Build Natives
if: steps.cache.outputs.cache-hit != 'true'
run: "yarn build:native --target ${{ steps.config.outputs.target }}"
- name: "[Nightly] Resolve version"
id: nightly
if: inputs.version != ''
run: |
echo "config-args=--nightly '${{ inputs.version }}'" >> $GITHUB_OUTPUT
- name: Generate debian files and arguments
id: debian
run: |
if [ -f changelog.Debian ]; then
echo "config-args=--deb-changelog changelog.Debian" >> $GITHUB_OUTPUT
fi
- name: Build App
run: |
npx ts-node scripts/generate-builder-config.ts \
${{ steps.nightly.outputs.config-args }} \
${{ steps.debian.outputs.config-args }}
yarn build --publish never -l --config electron-builder.json ${{ steps.config.outputs.build-args }}
- name: Check native libraries
run: |
set -x
shopt -s globstar
FILES=$(file dist/**/*.node)
echo "$FILES"
if [ grep -v "$ARCH" ]; then
exit 1
fi
LIBS=$(readelf -d dist/**/*.node | grep NEEDED)
echo "$LIBS"
set +x
assert_contains_string() { [[ "$1" == *"$2"* ]]; }
! assert_contains_string "$LIBS" "libcrypto.so.1.1"
if [ "$SQLCIPHER_BUNDLED" == "1" ]; then
! assert_contains_string "$LIBS" "libsqlcipher.so.0"
else
assert_contains_string "$LIBS" "libsqlcipher.so.0"
fi
env:
ARCH: ${{ steps.config.outputs.arch }}
- name: Stash deb package
if: inputs.deploy-mode
uses: actions/upload-artifact@v3
with:
name: linux-sqlcipher-${{ inputs.sqlcipher }}-deb
path: dist/*.deb
retention-days: 1
- name: Prepare artifacts for deployment
if: inputs.deploy-mode
run: |
mv dist _dist
mkdir -p "dist/install/linux/glibc-x86-64/"
mv _dist/*.tar.gz "dist/install/linux/glibc-x86-64"
# We don't wish to store the tarball for every nightly ever, so we only keep the latest
- name: "[Nightly] Strip version from tarball"
if: inputs.deploy-mode && inputs.version != ''
run: |
mv dist/install/linux/glibc-x86-64/*.tar.gz "dist/install/linux/glibc-x86-64/element-desktop-nightly.tar.gz"
- name: "[Release] Prepare release latest symlink"
if: inputs.deploy-mode && inputs.version == ''
shell: bash
run: |
ln -s "$(find . -type f -iname "*.tar.gz" | xargs -0 -n1 -- basename)" "element-desktop.tar.gz"
working-directory: "dist/install/linux/glibc-x86-64"
# We exclude *-unpacked as it loses permissions and the tarball contains it with correct permissions
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.deploy-mode && 'packages.element.io' || format('linux-{0}-sqlcipher-{1}', inputs.arch, inputs.sqlcipher) }}
path: |
dist
!dist/*-unpacked/**
retention-days: 1

157
.github/workflows/build_macos.yaml vendored Normal file
View File

@@ -0,0 +1,157 @@
# This workflow relies on actions/cache to store the hak dependency artifacts as they take a long time to build
# Due to this extra care must be taken to only ever run all build_* scripts against the same branch to ensure
# the correct cache scoping, and additional care must be taken to not run untrusted actions on the develop branch.
on:
workflow_call:
secrets:
APPLE_ID:
required: false
APPLE_ID_PASSWORD:
required: false
APPLE_TEAM_ID:
required: false
APPLE_CSC_KEY_PASSWORD:
required: false
APPLE_CSC_LINK:
required: false
inputs:
version:
type: string
required: false
description: "Version string to override the one in package.json, used for non-release builds"
sign:
type: string
required: false
description: "Whether to sign & notarise the build, requires 'packages.element.io' environment"
deploy-mode:
type: boolean
required: false
description: "Whether to arrange artifacts in the arrangement needed for deployment, skipping unrelated ones"
base-url:
type: string
required: false
description: "The URL to which the output will be deployed, required if deploy-mode is enabled."
jobs:
build:
runs-on: macos-latest
environment: ${{ inputs.sign && 'packages.element.io' || '' }}
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: webapp
- name: Cache .hak
id: cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-${{ hashFiles('hakHash', 'electronVersion') }}
path: |
./.hak
- name: Install Rust
if: steps.cache.outputs.cache-hit != 'true'
run: |
rustup toolchain install stable --profile minimal --no-self-update
rustup default stable
rustup target add aarch64-apple-darwin
- uses: actions/setup-node@v3
with:
cache: "yarn"
# Does not need branch matching as only analyses this layer
- name: Install Deps
run: "yarn install --frozen-lockfile"
- name: Build Natives
if: steps.cache.outputs.cache-hit != 'true'
run: "yarn build:native:universal"
- name: "[Nightly] Resolve version"
id: nightly
if: inputs.version != ''
run: |
echo "config-args=--nightly '${{ inputs.version }}'" >> $GITHUB_OUTPUT
# We split these because electron-builder gets upset if we set CSC_LINK even to an empty string
- name: "[Signed] Build App"
if: inputs.sign != ''
run: |
scripts/generate-builder-config.ts ${{ steps.nightly.outputs.config-args }} --notarytool-team-id='${{ secrets.APPLE_TEAM_ID }}'
yarn build:universal --publish never --config electron-builder.json
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
CSC_KEY_PASSWORD: ${{ secrets.APPLE_CSC_KEY_PASSWORD }}
CSC_LINK: ${{ secrets.APPLE_CSC_LINK }}
- name: Check app was signed & notarised successfully
if: inputs.sign != ''
run: |
hdiutil attach dist/*.dmg
codesign -dv --verbose=4 /Volumes/Element*/*.app
spctl -a -vvv -t install /Volumes/Element*/*.app
hdiutil detach /Volumes/Element*
- name: "[Unsigned] Build App"
if: inputs.sign == ''
run: |
scripts/generate-builder-config.ts ${{ steps.nightly.outputs.config-args }}
yarn build:universal --publish never --config electron-builder.json
env:
CSC_IDENTITY_AUTO_DISCOVERY: false
- name: Prepare artifacts for deployment
if: inputs.deploy-mode
run: |
mv dist _dist
mkdir -p dist/install/macos dist/update/macos
mv _dist/*-mac.zip dist/update/macos/
mv _dist/*.dmg dist/install/macos/
PKG_JSON_VERSION=$(cat package.json | jq -r .version)
LATEST=$(find dist -type f -iname "*-mac.zip" | xargs -0 -n1 -- basename)
# Encode spaces in the URL as Squirrel.Mac complains about bad JSON otherwise
URL="${{ inputs.base-url }}/update/macos/${LATEST// /%20}"
jq -n --arg version "${VERSION:-$PKG_JSON_VERSION}" --arg url "$URL" '
{
currentRelease: $version,
releases: [{
version: $version,
updateTo: {
version: $version,
url: $url,
},
}],
}
' > dist/update/macos/releases.json
jq -n --arg url "$URL" '
{ url: $url }
' > dist/update/macos/releases-legacy.json
env:
VERSION: ${{ inputs.version }}
# We don't wish to store the installer for every nightly ever, so we only keep the latest
- name: "[Nightly] Strip version from installer file"
if: inputs.deploy-mode && inputs.version != ''
run: |
mv dist/install/macos/*.dmg "dist/install/macos/Element Nightly.dmg"
- name: "[Release] Prepare release latest symlink"
if: inputs.deploy-mode && inputs.version == ''
run: |
ln -s "$(find . -type f -iname "*.dmg" | xargs -0 -n1 -- basename)" "Element.dmg"
working-directory: "dist/install/macos"
# We exclude mac-universal as the unpacked app takes forever to upload and zip and dmg already contain it
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.deploy-mode && 'packages.element.io' || 'macos' }}
path: |
dist
!dist/mac-universal/**
retention-days: 1

140
.github/workflows/build_prepare.yaml vendored Normal file
View File

@@ -0,0 +1,140 @@
# This action helps perform common actions before the build_* actions are started in parallel.
on:
workflow_call:
inputs:
config:
type: string
required: true
description: "The config directory to use"
version:
type: string
required: false
description: "The version tag to fetch, or 'develop', will pick automatically if not passed"
nightly:
type: boolean
required: false
default: false
description: "Whether the build is a Nightly and to calculate the version strings new builds should use"
secrets:
# Required if `nightly` is set
CF_R2_ACCESS_KEY_ID:
required: false
# Required if `nightly` is set
CF_R2_TOKEN:
required: false
outputs:
nightly-version:
description: "The version string the next Nightly should use, only output for nightly"
value: ${{ jobs.prepare.outputs.nightly-version }}
packages-dir:
description: "The directory non-deb packages for this run should live in within packages.element.io"
value: ${{ inputs.nightly && 'nightly' || 'desktop' }}
# This is just a simple pass-through of the input to simplify reuse of complex inline conditions
config:
description: "The relative path to the config file for this run"
value: ${{ inputs.config }}
jobs:
prepare:
name: Prepare
environment: ${{ inputs.nightly && 'packages.element.io' || '' }}
runs-on: ubuntu-latest
outputs:
nightly-version: ${{ steps.versions.outputs.nightly }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: "yarn"
- name: Install Deps
run: "yarn install --frozen-lockfile"
- name: Fetch Element Web
run: yarn run fetch --noverify -d ${{ inputs.config }} ${{ inputs.version }}
# We split this out to save the build_* scripts having to do it to make use of `hashFiles` in the cache action
- name: Generate cache hash files
run: |
yarn run --silent electron --version > electronVersion
cat package.json | jq -c .hakDependencies | sha1sum > hakHash
find hak -type f -print0 | xargs -0 sha1sum >> hakHash
find scripts/hak -type f -print0 | xargs -0 sha1sum >> hakHash
- name: "[Nightly] Calculate version"
id: versions
if: inputs.nightly
run: |
# Find all latest Nightly versions
aws s3 cp s3://$R2_BUCKET/nightly/update/macos/releases.json - --endpoint-url $R2_URL --region auto | jq -r .currentRelease >> VERSIONS
aws s3 cp s3://$R2_BUCKET/debian/dists/default/main/binary-amd64/Packages - --endpoint-url $R2_URL --region auto | grep "Package: element-nightly" -A 50 | grep Version -m1 | sed -n 's/Version: //p' >> VERSIONS
aws s3 cp s3://$R2_BUCKET/debian/dists/default/main/binary-arm64/Packages - --endpoint-url $R2_URL --region auto | grep "Package: element-nightly" -A 50 | grep Version -m1 | sed -n 's/Version: //p' >> VERSIONS
aws s3 cp s3://$R2_BUCKET/nightly/update/win32/x64/RELEASES - --endpoint-url $R2_URL --region auto | awk '{print $2}' | cut -d "-" -f 5 | cut -c 8- >> VERSIONS
aws s3 cp s3://$R2_BUCKET/nightly/update/win32/ia32/RELEASES - --endpoint-url $R2_URL --region auto | awk '{print $2}' | cut -d "-" -f 5 | cut -c 8- >> VERSIONS
# Pick the greatest one
VERSION=$(cat VERSIONS | sort -uf | tail -n1)
# Increment it
echo "nightly=$(scripts/generate-nightly-version.ts --latest $VERSION)" >> $GITHUB_OUTPUT
env:
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }}
R2_BUCKET: ${{ vars.R2_BUCKET }}
R2_URL: ${{ vars.CF_R2_S3_API }}
- name: Check version
id: package
run: |
echo "version=$(cat package.json | jq -r .version)" >> $GITHUB_OUTPUT
- name: "[Release] Fetch release"
id: release
if: ${{ !inputs.nightly && inputs.version != 'develop' }}
uses: cardinalby/git-get-release-action@cedef2faf69cb7c55b285bad07688d04430b7ada # v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag: v${{ steps.package.outputs.version }}
- name: "[Release] Write changelog"
if: ${{ !inputs.nightly && inputs.version != 'develop' }}
run: |
TIME=$(date -d "$PUBLISHED_AT" -R)
echo "element-desktop ($VERSION) default; urgency=medium" >> changelog.Debian
echo "$BODY" | sed 's/^##/\n */g;s/^\*/ */g' | perl -pe 's/\[.+?]\((.+?)\)/\1/g' >> changelog.Debian
echo "" >> changelog.Debian
echo " -- $ACTOR <support@element.io> $TIME" >> changelog.Debian
env:
ACTOR: ${{ github.actor }}
VERSION: v${{ steps.package.outputs.version }}
BODY: ${{ steps.release.outputs.body }}
PUBLISHED_AT: ${{ steps.release.outputs.published_at }}
- name: "[Nightly] Write summary"
if: inputs.nightly
run: |
BUNDLE_HASH=$(npx asar l webapp.asar | grep /bundles/ | head -n 1 | sed 's|.*/||')
WEBAPP_VERSION=$(./scripts/get-version.ts)
WEB_VERSION=${WEBAPP_VERSION:0:12}
REACT_VERSION=${WEBAPP_VERSION:19:12}
JS_VERSION=${WEBAPP_VERSION:35:12}
echo "### Nightly build ${{ steps.versions.outputs.nightly }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Component | Version |" >> $GITHUB_STEP_SUMMARY
echo "| ----------- | ------- |" >> $GITHUB_STEP_SUMMARY
echo "| Bundle Hash | $BUNDLE_HASH |" >> $GITHUB_STEP_SUMMARY
echo "| Element Web | [$WEB_VERSION](https://github.com/vector-im/element-web/commit/$WEB_VERSION) |" >> $GITHUB_STEP_SUMMARY
echo "| React SDK | [$REACT_VERSION](https://github.com/matrix-org/matrix-react-sdk/commit/$REACT_VERSION) |" >> $GITHUB_STEP_SUMMARY
echo "| JS SDK | [$JS_VERSION](https://github.com/matrix-org/matrix-js-sdk/commit/$JS_VERSION) |" >> $GITHUB_STEP_SUMMARY
- uses: actions/upload-artifact@v3
with:
name: webapp
retention-days: 1
path: |
webapp.asar
package.json
electronVersion
hakHash
changelog.Debian

204
.github/workflows/build_windows.yaml vendored Normal file
View File

@@ -0,0 +1,204 @@
# This workflow relies on actions/cache to store the hak dependency artifacts as they take a long time to build
# Due to this extra care must be taken to only ever run all build_* scripts against the same branch to ensure
# the correct cache scoping, and additional care must be taken to not run untrusted actions on the develop branch.
on:
workflow_call:
secrets:
ESIGNER_USER_NAME:
required: false
ESIGNER_USER_PASSWORD:
required: false
ESIGNER_USER_TOTP:
required: false
inputs:
arch:
type: string
required: true
description: "The architecture to build for, one of 'x64' | 'x86' | 'arm64'"
version:
type: string
required: false
description: "Version string to override the one in package.json, used for non-release builds"
sign:
type: string
required: false
description: "Whether to sign & notarise the build, requires 'packages.element.io' environment"
deploy-mode:
type: boolean
required: false
description: "Whether to arrange artifacts in the arrangement needed for deployment, skipping unrelated ones"
jobs:
build:
runs-on: windows-latest
environment: ${{ inputs.sign && 'packages.element.io' || '' }}
env:
SIGNTOOL_PATH: "C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x86/signtool.exe"
steps:
- uses: kanga333/variable-mapper@3681b75f5c6c00162721168fb91ab74925eaebcb
id: config
with:
key: "${{ inputs.arch }}"
export_to: output
map: |
{
"x64": {
"target": "x86_64-pc-windows-msvc",
"dir": "x64"
},
"arm64": {
"target": "aarch64-pc-windows-msvc",
"build-args": "--arm64",
"arch": "amd64_arm64",
"dir": "arm64"
},
"x86": {
"target": "i686-pc-windows-msvc",
"build-args": "--ia32",
"dir": "ia32"
}
}
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: webapp
- name: Cache .hak
id: cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-${{ inputs.arch }}-${{ hashFiles('hakHash', 'electronVersion') }}
path: |
./.hak
- name: Set up build tools
uses: ilammy/msvc-dev-cmd@cec98b9d092141f74527d0afa6feb2af698cfe89
with:
arch: ${{ steps.config.outputs.arch || inputs.arch }}
# ActiveTCL package on choco is from 2015,
# this one is newer but includes more than we need
- name: Choco install tclsh
if: steps.cache.outputs.cache-hit != 'true'
shell: pwsh
run: |
choco install -y magicsplat-tcl-tk --no-progress
echo "${HOME}/AppData/Local/Apps/Tcl86/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Choco install NetWide Assembler
if: steps.cache.outputs.cache-hit != 'true'
shell: pwsh
run: |
choco install -y nasm --no-progress
echo "C:/Program Files/NASM" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install Rust
if: steps.cache.outputs.cache-hit != 'true'
run: |
rustup toolchain install stable --profile minimal --no-self-update
rustup default stable
rustup target add ${{ steps.config.outputs.target }}
- uses: actions/setup-node@v3
with:
cache: "yarn"
# Does not need branch matching as only analyses this layer
- name: Install Deps
run: "yarn install --frozen-lockfile"
- name: Build Natives
if: steps.cache.outputs.cache-hit != 'true'
run: |
refreshenv
yarn build:native --target ${{ steps.config.outputs.target }}
- name: Install and configure eSigner CKA
id: esigner
if: inputs.sign
run: |
Set-StrictMode -Version 'Latest'
# Download
Invoke-WebRequest -OutFile eSigner_CKA.exe "https://packages.element.io/tools/SSL.COM%20eSigner%20CKA_1.0.4-build-20230221_signed.exe"
# Install
New-Item -ItemType Directory -Force -Path "$env:INSTALL_DIR"
./eSigner_CKA.exe /CURRENTUSER /VERYSILENT /SUPPRESSMSGBOXES /DIR="${{ env.INSTALL_DIR }}" | Out-Null
# Disable logger
$LogConfig = Get-Content -Path ${{ env.INSTALL_DIR }}/log4net.config
$LogConfig[0] = '<log4net threshold="OFF">'
$LogConfig | Set-Content -Path ${{ env.INSTALL_DIR }}/log4net.config
# Configure
${{ env.INSTALL_DIR }}/eSignerCKATool.exe config -mode product -user "${{ secrets.ESIGNER_USER_NAME }}" -pass "${{ secrets.ESIGNER_USER_PASSWORD }}" -totp "${{ secrets.ESIGNER_USER_TOTP }}" -key "${{ env.MASTER_KEY_FILE }}" -r
${{ env.INSTALL_DIR }}/eSignerCKATool.exe unload
${{ env.INSTALL_DIR }}/eSignerCKATool.exe load
# Find certificate
$CodeSigningCert = Get-ChildItem Cert:\CurrentUser\My -CodeSigningCert | Select-Object -First 1
echo Certificate: $CodeSigningCert
# Extract thumbprint and subject name
$Thumbprint = $CodeSigningCert.Thumbprint
$SubjectName = ($CodeSigningCert.Subject -replace ", ?", "`n" | ConvertFrom-StringData).CN
echo "config-args=--signtool-thumbprint '$Thumbprint' --signtool-subject-name '$SubjectName'" >> $env:GITHUB_OUTPUT
env:
INSTALL_DIR: C:\Users\runneradmin\eSignerCKA
MASTER_KEY_FILE: C:\Users\runneradmin\eSignerCKA\master.key
- name: "[Nightly] Resolve version"
id: nightly
if: inputs.version != ''
shell: bash
run: |
echo "config-args=--nightly '${{ inputs.version }}'" >> $GITHUB_OUTPUT
- name: Build App
run: |
yarn ts-node scripts/generate-builder-config.ts ${{ steps.nightly.outputs.config-args }} ${{ steps.esigner.outputs.config-args }}
yarn build --publish never -w --config electron-builder.json ${{ steps.config.outputs.build-args }}
- name: Check app was signed successfully
if: inputs.sign != ''
run: |
. "$env:SIGNTOOL_PATH" verify /pa (get-item ./dist/squirrel-windows*/*.exe)
- name: Prepare artifacts for deployment
if: inputs.deploy-mode
shell: bash
run: |
mv dist _dist
mkdir -p "dist/install/win32/$DIR/msi" "dist/update/win32/$DIR"
mv _dist/squirrel-windows*/*.exe "dist/install/win32/$DIR"
mv _dist/squirrel-windows*/*.nupkg "dist/update/win32/$DIR/"
mv _dist/squirrel-windows*/RELEASES "dist/update/win32/$DIR/"
# mv _dist/*.msi "dist/install/win32/$DIR/msi/"
env:
DIR: ${{ steps.config.outputs.dir }}
# We don't wish to store the installer for every nightly ever, so we only keep the latest
- name: "[Nightly] Strip version from installer file"
if: inputs.deploy-mode && inputs.version != ''
shell: bash
run: |
mv dist/install/win32/$DIR/*.exe "dist/install/win32/$DIR/Element Nightly Setup.exe"
# mv dist/install/win32/$DIR/msi/*.msi "dist/install/win32/$DIR/msi/Element Nightly Setup.msi"
env:
DIR: ${{ steps.config.outputs.dir }}
- name: "[Release] Prepare release latest symlink"
if: inputs.deploy-mode && inputs.version == ''
shell: bash
run: |
ln -s "$(find . -type f -iname "*.exe" | xargs -0 -n1 -- basename)" "Element Setup.exe"
working-directory: "dist/install/win32/${{ steps.config.outputs.dir }}"
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.deploy-mode && 'packages.element.io' || format('win-{0}', inputs.arch) }}
path: dist
retention-days: 1

43
.github/workflows/dockerbuild.yaml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: Dockerbuild
on:
workflow_dispatch: {}
push:
branches: [master, develop]
paths:
- "dockerbuild/**"
concurrency: ${{ github.workflow }}-${{ github.ref_name }}
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-dockerbuild
jobs:
build:
name: Docker Build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@b4bedf8053341df3b5a9f9e0f2cf4e79e27360c6
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@879dcbb708d40f8b8679d4f7941b938a086e23a7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
- name: Build and push Docker image
uses: docker/build-push-action@4c1b68d83ad20cc1a09620ca477d5bbbb5fa14d0
with:
context: dockerbuild
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@@ -0,0 +1,8 @@
name: Localazy Download
on:
workflow_dispatch: {}
jobs:
download:
uses: matrix-org/matrix-web-i18n/.github/workflows/localazy_download.yaml@main
secrets:
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}

11
.github/workflows/localazy_upload.yaml vendored Normal file
View File

@@ -0,0 +1,11 @@
name: Localazy Upload
on:
push:
branches: [develop]
paths:
- "src/i18n/strings/en_EN.json"
jobs:
upload:
uses: matrix-org/matrix-web-i18n/.github/workflows/localazy_upload.yaml@main
secrets:
LOCALAZY_WRITE_KEY: ${{ secrets.LOCALAZY_WRITE_KEY }}

View File

@@ -1,12 +1,9 @@
name: Pull Request
on:
pull_request_target:
types: [ opened, edited, labeled, unlabeled, synchronize ]
concurrency: ${{ github.workflow }}-${{ github.event.pull_request.head.ref }}
pull_request_target:
types: [opened, edited, labeled, unlabeled, synchronize]
jobs:
action:
uses: matrix-org/matrix-js-sdk/.github/workflows/pull_request.yaml@develop
with:
labels: "T-Defect,T-Enhancement,T-Task"
secrets:
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
action:
uses: matrix-org/matrix-js-sdk/.github/workflows/pull_request.yaml@develop
secrets:
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}

49
.github/workflows/reprepro.yaml vendored Normal file
View File

@@ -0,0 +1,49 @@
on:
workflow_call:
inputs:
artifact-name:
type: string
required: true
description: "The name of the artifact containing the deb to include"
secrets:
ELEMENT_BOT_TOKEN:
required: true
CF_R2_ACCESS_KEY_ID:
required: true
CF_R2_TOKEN:
required: true
# Protect reprepro database using concurrency
concurrency: reprepro
jobs:
reprepro:
name: Deploy debian package
environment: packages.element.io
runs-on: ubuntu-latest
env:
R2_INCOMING_BUCKET: ${{ vars.R2_INCOMING_BUCKET }}
R2_URL: ${{ vars.CF_R2_S3_API }}
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: ${{ inputs.artifact-name }}
path: dist
- name: Upload incoming deb
id: upload
run: |
deb="$(ls *.deb | tail -n1)"
echo "incoming=$deb" >> $GITHUB_OUTPUT
aws s3 cp "$deb" "s3://$R2_INCOMING_BUCKET" --endpoint-url "$R2_URL" --region auto
working-directory: dist
env:
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }}
- name: Notify packages.element.io of incoming deb
uses: peter-evans/repository-dispatch@bf47d102fdb849e755b0b0023ea3e81a44b6f570 # v2
with:
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
repository: vector-im/packages.element.io
event-type: reprepro-incoming
client-payload: '{"incoming": "${{ steps.upload.outputs.incoming }}"}'

View File

@@ -1,45 +1,43 @@
name: Static Analysis
on:
pull_request: { }
push:
branches: [ develop, master ]
pull_request: {}
push:
branches: [develop, master]
jobs:
ts_lint:
name: "Typescript Syntax Check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
ts_lint:
name: "Typescript Syntax Check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: 'yarn'
node-version: 16
- uses: actions/setup-node@v3
with:
cache: "yarn"
# Does not need branch matching as only analyses this layer
- name: Install Deps
run: "yarn install --pure-lockfile"
# Does not need branch matching as only analyses this layer
- name: Install Deps
run: "yarn install --frozen-lockfile"
- name: Typecheck
run: "yarn run lint:types"
- name: Typecheck
run: "yarn run lint:types"
i18n_lint:
name: "i18n Check"
uses: matrix-org/matrix-react-sdk/.github/workflows/i18n_check.yml@develop
i18n_lint:
name: "i18n Check"
uses: matrix-org/matrix-web-i18n/.github/workflows/i18n_check.yml@main
js_lint:
name: "ESLint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
js_lint:
name: "ESLint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: 'yarn'
node-version: 16
- uses: actions/setup-node@v3
with:
cache: "yarn"
# Does not need branch matching as only analyses this layer
- name: Install Deps
run: "yarn install --pure-lockfile"
# Does not need branch matching as only analyses this layer
- name: Install Deps
run: "yarn install --frozen-lockfile"
- name: Run Linter
run: "yarn run lint:js"
- name: Run Linter
run: "yarn run lint:js"

View File

@@ -1,8 +1,8 @@
name: Upgrade Dependencies
on:
workflow_dispatch: { }
workflow_dispatch: {}
jobs:
upgrade:
uses: matrix-org/matrix-js-sdk/.github/workflows/upgrade_dependencies.yml@develop
secrets:
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
upgrade:
uses: matrix-org/matrix-js-sdk/.github/workflows/upgrade_dependencies.yml@develop
secrets:
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}

6
.gitignore vendored
View File

@@ -4,8 +4,7 @@
/webapp.asar
/packages
/deploys
/node_modules
/docker_node_modules
node_modules/
/pkg/control
/.hak
/.yarnrc
@@ -15,3 +14,6 @@
.vscode/
/test_artifacts/
/coverage/
yarn-error.log
/hak/**/*.js
/scripts/hak/**/*.js

19
.prettierignore Normal file
View File

@@ -0,0 +1,19 @@
/build/
/dockerbuild/
/lib/
/node_modules/
/packages.elememt.io/
/webapp
/src/i18n/strings
/CHANGELOG.md
/package-lock.json
/yarn.lock
**/.idea
.vscode
.vscode/
.tmp
.env
/coverage
/.npmrc
/*.log

1
.prettierrc.js Normal file
View File

@@ -0,0 +1 @@
module.exports = require("eslint-plugin-matrix-org/.prettierrc.js");

View File

File diff suppressed because it is too large Load Diff

View File

@@ -1,25 +1,24 @@
![Build](https://github.com/vector-im/element-desktop/actions/workflows/build.yaml/badge.svg)
![Static Analysis](https://github.com/vector-im/element-desktop/actions/workflows/static_analysis.yaml/badge.svg)
[![Weblate](https://translate.element.io/widgets/element-desktop/-/element-desktop/svg-badge.svg)](https://translate.element.io/engage/element-desktop/)
[![Localazy](https://img.shields.io/endpoint?url=https%3A%2F%2Fconnect.localazy.com%2Fstatus%2Felement-web%2Fdata%3Fcontent%3Dall%26title%3Dlocalazy%26logo%3Dtrue)](https://localazy.com/p/element-web)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=element-desktop&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=element-desktop)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=element-desktop&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=element-desktop)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=element-desktop&metric=bugs)](https://sonarcloud.io/summary/new_code?id=element-desktop)
Element Desktop
===============
# Element Desktop
Element Desktop is a Matrix client for desktop platforms with Element Web at its core.
First Steps
===========
# First Steps
Before you do anything else, fetch the dependencies:
```
yarn install
```
Fetching Element
================
# 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:
@@ -31,6 +30,7 @@ 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
@@ -41,6 +41,7 @@ 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.
@@ -49,6 +50,7 @@ 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 ./
@@ -56,29 +58,32 @@ ln -s ../element-web/webapp ./
[TODO: add support for fetching develop builds, arbitrary URLs and arbitrary paths]
Building
========
# Building
## Native Build
TODO: List native pre-requisites
Optionally, [build the native modules](https://github.com/vector-im/element-desktop/blob/develop/docs/native-node-modules.md),
which include support for searching in encrypted rooms and secure storage. Skipping this step is fine, you just won't have those features.
Optionally, [build the native modules](https://github.com/vector-im/element-desktop/blob/develop/docs/native-node-modules.md),
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.
- 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
@@ -91,9 +96,10 @@ yarn run docker:build
After running, the packages should be in `dist/`.
Starting
========
# 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
@@ -101,21 +107,22 @@ yarn add electron
yarn start
```
Config
======
# 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
========
# 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
@@ -125,30 +132,25 @@ 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
==========================
# 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
- `%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
==========================
# Translations
To add a new translation, head to the [translating doc](https://github.com/vector-im/element-web/blob/develop/docs/translating.md).
For a developer guide, see the [translating dev doc](https://github.com/vector-im/element-web/blob/develop/docs/translating-dev.md).
[<img src="https://translate.element.io/widgets/element-desktop/-/multi-auto.svg" alt="translationsstatus" width="340">](https://translate.element.io/engage/element-desktop/?utm_source=widget)
Report bugs & give feedback
==========================
# 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](https://github.com/vector-im/element-web/issues?q=is%3Aopen+is%3Aissue+sort%3Areactions-%2B1-desc) first (and add a +1) or [create a new issue](https://github.com/vector-im/element-web/issues/new/choose) if you can't find it. Please note that this issue tracker is associated with the [element-web](https://github.com/vector-im/element-web) repo, but is also applied to the code in this repo as well.
To help avoid duplicate issues, please [view existing issues](https://github.com/vector-im/element-web/issues?q=is%3Aopen+is%3Aissue+sort%3Areactions-%2B1-desc) first (and add a +1) or [create a new issue](https://github.com/vector-im/element-web/issues/new/choose) if you can't find it. Please note that this issue tracker is associated with the [element-web](https://github.com/vector-im/element-web) repo, but is also applied to the code in this repo as well.

View File

@@ -1,6 +1,3 @@
module.exports = {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
'@babel/preset-typescript',
],
presets: [["@babel/preset-env", { targets: { node: "current" } }], "@babel/preset-typescript"],
};

View File

@@ -1,51 +0,0 @@
#include <windows.h>
#include <stdio.h>
#include <string.h>
#include <tchar.h>
/*
* This just runs 'Element.exe' with the same args as
* this process was invoked with. This gets around the fact that
* squirrel always tries to run an executable with the same name,
* so fails to restart if the app's name has changed.
*/
void _tmain( int argc, TCHAR *argv[] )
{
LPSTR myCmdLine = GetCommandLineA();
char cmdLine[32767];
LPSTR cmdLinePos = cmdLine;
LPSTR toRun = "\"Element.exe\" ";
strncpy(cmdLinePos, toRun, strlen(toRun));
cmdLinePos += strlen(toRun);
if (myCmdLine[0] == '"') ++myCmdLine;
myCmdLine += strlen(argv[0]);
if (myCmdLine[0] == '"') ++myCmdLine;
if (myCmdLine[0] == ' ') ++myCmdLine;
strncpy(cmdLinePos, myCmdLine, (cmdLine + 32767) - cmdLinePos);
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);
ZeroMemory(&pi, sizeof(pi));
if (!CreateProcess(NULL,
cmdLine, // Command line
NULL, // Process handle not inheritable
NULL, // Thread handle not inheritable
FALSE, // Set handle inheritance to FALSE
0, // No creation flags
NULL, // Use parent's environment block
NULL, // Use parent's starting directory
&si, // Pointer to STARTUPINFO structure
&pi ) // Pointer to PROCESS_INFORMATION structure
)
{
printf("CreateProcess failed (%d).\n", GetLastError());
return;
}
}

View File

Binary file not shown.

View File

@@ -1,8 +1,9 @@
# Docker image to facilitate building Element Desktop with native bits using a glibc version with broader compatibility
FROM buildpack-deps:bionic-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 curl --proto "=https" -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 && \
@@ -14,6 +15,8 @@ RUN apt-get -qq update && apt-get -qq dist-upgrade && \
apt-get -qq install --no-install-recommends qtbase5-dev bsdtar build-essential autoconf libssl-dev gcc-multilib g++-multilib lzip rpm python libcurl4 git git-lfs ssh unzip tcl \
libsecret-1-dev libgnome-keyring-dev \
libopenjp2-tools \
# Used by github actions \
jq grep file \
# Used by seshat (when not SQLCIPHER_STATIC) \
libsqlcipher-dev && \
# git-lfs
@@ -31,10 +34,10 @@ ENV LC_ALL C.UTF-8
ENV DEBUG_COLORS true
ENV FORCE_COLOR true
ENV NODE_VERSION 14.17.0
ENV NODE_VERSION 16.18.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 && \
RUN curl --proto "=https" -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

View File

@@ -0,0 +1,3 @@
[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
rustflags = ["-L/usr/lib/aarch64-linux-gnu"]

11
dockerbuild/aarch64/.env Normal file
View File

@@ -0,0 +1,11 @@
AS=/usr/bin/aarch64-linux-gnu-as
STRIP=/usr/bin/aarch64-linux-gnu-strip
AR=/usr/bin/aarch64-linux-gnu-ar
CC=/usr/bin/aarch64-linux-gnu-gcc
CPP=/usr/bin/aarch64-linux-gnu-cpp
CXX=/usr/bin/aarch64-linux-gnu-g++
LD=/usr/bin/aarch64-linux-gnu-ld
FC=/usr/bin/aarch64-linux-gnu-gfortran
PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig
CFLAGS=-L/usr/lib/aarch64-linux-gnu
RUSTFLAGS=-L/usr/lib/aarch64-linux-gnu

16
docs/SUMMARY.md Normal file
View File

@@ -0,0 +1,16 @@
# Summary
- [Introduction](../README.md)
# Build
- [Native Node modules](native-node-modules.md)
- [Windows requirements](windows-requirements.md)
# Distribution
- [Updates](updates.md)
# Setup
- [Config](config.md)

15
docs/config.md Normal file
View File

@@ -0,0 +1,15 @@
# Configuration
All Element Web options documented [here](https://github.com/vector-im/element-web/blob/develop/docs/config.md) can be used as well as the following:
---
The app contains a configuration file specified at build time using [these instructions](https://github.com/vector-im/element-desktop/#config).
This config can be overwritten by the end using by creating a `config.json` file at the paths described [here](https://github.com/vector-im/element-desktop/#user-specified-configjson).
After changing the config, the app will need to be exited fully (including via the task tray) and re-started.
---
1. `update_base_url`: Specifies the URL of the update server, see [document](https://github.com/vector-im/element-desktop/blob/develop/docs/updates.md).
2. `web_base_url`: Specifies the Element Web URL when performing actions such as popout widget. Defaults to `https://app.element.io/`.

View File

@@ -17,13 +17,14 @@ when releasing.
Install the pre-requisites for your system:
* [Windows pre-requisites](https://github.com/vector-im/element-desktop/blob/develop/docs/windows-requirements.md)
* Linux: TODO
* OS X: TODO
- [Windows pre-requisites](https://github.com/vector-im/element-desktop/blob/develop/docs/windows-requirements.md)
- Linux: TODO
- OS X: TODO
Then optionally, [add seshat and dependencies to support search in E2E rooms](#adding-seshat-for-search-in-e2e-encrypted-rooms).
Then, to build for an architecture selected automatically based on your system (recommended), run:
```
yarn run build:native
```
@@ -70,9 +71,9 @@ as usual using:
On Windows & macOS we always statically link libsqlcipher for it is not generally available.
On Linux by default we will use a system package, on debian & ubuntu this is `libsqlcipher0`,
but this is problematic for some other packages.
By including `SQLCIPHER_STATIC=1` in the build environment, the build scripts will statically link sqlcipher,
note that this will want a `libcrypto1.1` shared library available in the system.
but this is problematic for some other packages, and we found that it may crashes for unknown reasons.
By including `SQLCIPHER_BUNDLED=1` in the build environment, the build scripts will fully statically
link sqlcipher, including a static build of OpenSSL.
More info can be found at https://github.com/matrix-org/seshat/issues/102
and https://github.com/vector-im/element-web/issues/20926.
@@ -82,15 +83,19 @@ and https://github.com/vector-im/element-web/issues/20926.
### macOS
On macOS, you can build universal native modules too:
```
yarn run build:native:universal
```
...or you can build for a specific architecture:
```
yarn run build:native --target x86_64-apple-darwin
```
or
```
yarn run build:native --target aarch64-apple-darwin
```
@@ -105,10 +110,13 @@ yarn run build:universal
### Windows
If you're on Windows, you can choose to build specifically for 32 or 64 bit:
```
yarn run build:32
```
or
```
yarn run build:64
```
@@ -144,6 +152,6 @@ The current set of native modules are stored in `.hak/hakModules`,
so you can use this to check what architecture is currently in place, eg:
```
$ lipo -info .hak/hakModules/keytar/build/Release/keytar.node
Architectures in the fat file: .hak/hakModules/keytar/build/Release/keytar.node are: x86_64 arm64
$ lipo -info .hak/hakModules/keytar/build/Release/keytar.node
Architectures in the fat file: .hak/hakModules/keytar/build/Release/keytar.node are: x86_64 arm64
```

15
docs/updates.md Normal file
View File

@@ -0,0 +1,15 @@
The Desktop app is capable of self-updating on macOS and Windows.
The update server base url is configurable as `update_base_url` in config.json and can be served by a static file host,
CDN or object storage.
Currently all packaging & deployment is handled by [Github actions](https://github.com/vector-im/element-desktop/blob/develop/.github/workflows/build_and_deploy.yaml)
# Windows
On Windows the update mechanism used is [Squirrel.Windows](https://github.com/Squirrel/Squirrel.Windows)
and can be served by any compatible Squirrel server, such as https://github.com/Tiliq/squirrel-server
# macOS
On macOS the update mechanism used is [Squirrel.Mac](https://github.com/Squirrel/Squirrel.Mac)
using the newer JSON format as documented [here](https://github.com/Squirrel/Squirrel.Mac#update-file-json-format).

View File

@@ -1,26 +1,30 @@
# Windows
## Requirements to build native modules
We rely on Github Actions `windows-latest` plus a few extra utilities as per [the workflow](https://github.com/vector-im/element-desktop/blob/develop/.github/workflows/build_windows.yaml).
If you want to build native modules, make sure that the following tools are installed on your system.
- [Git for Windows](https://git-scm.com/download/win)
- [Node 14](https://nodejs.org)
- [Python 3](https://www.python.org/downloads/) (if you type 'python' into command prompt it will offer to install it from the windows store)
- [Strawberry Perl](https://strawberryperl.com/)
- [Rustup](https://rustup.rs/)
- [NASM](https://www.nasm.us/)
- [Build Tools for Visual Studio 2019](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019) with the following configuration:
- On the Workloads tab:
- Desktop & Mobile -> C++ build tools
- On the Individual components tab:
- MSVC VS 2019 C++ build tools
- Windows 10 SDK (latest version available)
- C++ CMake tools for Windows
- [Git for Windows](https://git-scm.com/download/win)
- [Node 16](https://nodejs.org)
- [Python 3](https://www.python.org/downloads/) (if you type 'python' into command prompt it will offer to install it from the windows store)
- [Strawberry Perl](https://strawberryperl.com/)
- [Rustup](https://rustup.rs/)
- [NASM](https://www.nasm.us/)
- [Build Tools for Visual Studio 2019](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019) with the following configuration:
- On the Workloads tab:
- Desktop & Mobile -> C++ build tools
- On the Individual components tab:
- MSVC VS 2019 C++ build tools
- Windows 10 SDK (latest version available)
- C++ CMake tools for Windows
Once installed make sure all those utilities are accessible in your `PATH`.
If you want to be able to build x86 targets from an x64 host install the right toolchain:
```cmd
rustup toolchain install stable-i686-pc-windows-msvc
rustup target add i686-pc-windows-msvc

View File

@@ -1,6 +1,14 @@
{
"update_base_url": "https://packages.element.io/nightly/update/",
"default_server_name": "matrix.org",
"default_server_config": {
"m.homeserver": {
"base_url": "https://matrix-client.matrix.org"
},
"m.identity_server": {
"base_url": "https://vector.im"
}
},
"brand": "Element Nightly",
"integrations_ui_url": "https://scalar.vector.im/",
"integrations_rest_url": "https://scalar.vector.im/api",
@@ -11,16 +19,11 @@
"https://scalar-staging.vector.im/api",
"https://scalar-staging.riot.im/scalar/api"
],
"hosting_signup_link": "https://element.io/matrix-services?utm_source=element-web&utm_medium=web",
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
"uisi_autorageshake_app": "element-auto-uisi",
"showLabsSettings": true,
"roomDirectory": {
"servers": [
"matrix.org",
"gitter.im",
"libera.chat"
]
"show_labs_settings": true,
"room_directory": {
"servers": ["matrix.org", "gitter.im", "libera.chat"]
},
"enable_presence_by_hs_url": {
"https://matrix.org": false,
@@ -41,8 +44,8 @@
"environment": "nightly"
},
"posthog": {
"projectApiKey": "phc_Jzsm6DTm6V2705zeU5dcNvQDlonOR68XvX2sh1sEOHO",
"apiHost": "https://posthog.element.io"
"project_api_key": "phc_Jzsm6DTm6V2705zeU5dcNvQDlonOR68XvX2sh1sEOHO",
"api_host": "https://posthog.element.io"
},
"privacy_policy_url": "https://element.io/cookie-policy",
"features": {
@@ -50,7 +53,7 @@
"feature_video_rooms": true
},
"element_call": {
"url": "https://element-call.netlify.app"
"url": "https://call.element.dev"
},
"map_style_url": "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx"
}

View File

@@ -1,12 +0,0 @@
Package: element-nightly
License: Apache-2.0
Vendor: support@element.io
Architecture: amd64
Maintainer: support@element.io
Depends: libgtk-3-0, libnotify4, libnss3, libxss1, libxtst6, xdg-utils, libatspi2.0-0, libuuid1, libsecret-1-0
Recommends: libappindicator3-1, libsqlcipher0
Section: net
Priority: extra
Homepage: https://element.io/
Description:
riot.im A feature-rich client for Matrix.org (nightly unstable build).

View File

@@ -1,9 +0,0 @@
Package: riot-nightly
Version: 2020071502
Depends: element-nightly
Maintainer: packages@element.io
Architecture: all
Priority: optional
Section: oldlibs
Description: transitional package
This is a transitional package. It can safely be removed.

View File

@@ -1,81 +0,0 @@
Origin: riot.im
Codename: default
Architectures: amd64 i386 source
Components: main
SignWith: D7B0B66941D01538
Tracking: minimal
Origin: riot.im
Suite: oldoldstable
Codename: jessie
Architectures: amd64 i386 source
Components: main
SignWith: D7B0B66941D01538
Tracking: minimal
Origin: riot.im
Suite: oldstable
Codename: stretch
Architectures: amd64 i386 source
Components: main
SignWith: D7B0B66941D01538
Tracking: minimal
Origin: riot.im
Suite: stable
Codename: buster
Architectures: amd64 i386 source
Components: main
SignWith: D7B0B66941D01538
Tracking: minimal
Origin: riot.im
Suite: testing
Codename: bullseye
Architectures: amd64 i386 source
Components: main
SignWith: D7B0B66941D01538
Tracking: minimal
Origin: riot.im
Suite: unstable
Codename: sid
Architectures: amd64 i386 source
Components: main
SignWith: D7B0B66941D01538
Tracking: minimal
Origin: riot.im
Codename: xenial
Architectures: amd64 i386 source
Components: main
SignWith: D7B0B66941D01538
Tracking: minimal
Origin: riot.im
Codename: bionic
Architectures: amd64 i386 source
Components: main
SignWith: D7B0B66941D01538
Tracking: minimal
Origin: riot.im
Codename: cosmic
Architectures: amd64 i386 source
Components: main
SignWith: D7B0B66941D01538
Tracking: minimal
Origin: riot.im
Codename: disco
Architectures: amd64 i386 source
Components: main
SignWith: D7B0B66941D01538
Tracking: minimal
Origin: riot.im
Codename: eoan
Architectures: amd64 i386 source
Components: main
SignWith: D7B0B66941D01538
Tracking: minimal

View File

@@ -1,6 +1,14 @@
{
"update_base_url": "https://packages.element.io/desktop/update/",
"default_server_name": "matrix.org",
"default_server_config": {
"m.homeserver": {
"base_url": "https://matrix-client.matrix.org"
},
"m.identity_server": {
"base_url": "https://vector.im"
}
},
"brand": "Element",
"integrations_ui_url": "https://scalar.vector.im/",
"integrations_rest_url": "https://scalar.vector.im/api",
@@ -11,17 +19,12 @@
"https://scalar-staging.vector.im/api",
"https://scalar-staging.riot.im/scalar/api"
],
"hosting_signup_link": "https://element.io/matrix-services?utm_source=element-web&utm_medium=web",
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
"uisi_autorageshake_app": "element-auto-uisi",
"roomDirectory": {
"servers": [
"matrix.org",
"gitter.im",
"libera.chat"
]
"room_directory": {
"servers": ["matrix.org", "gitter.im", "libera.chat"]
},
"showLabsSettings": false,
"show_labs_settings": false,
"enable_presence_by_hs_url": {
"https://matrix.org": false,
"https://matrix-client.matrix.org": false
@@ -37,8 +40,8 @@
}
],
"posthog": {
"projectApiKey": "phc_Jzsm6DTm6V2705zeU5dcNvQDlonOR68XvX2sh1sEOHO",
"apiHost": "https://posthog.element.io"
"project_api_key": "phc_Jzsm6DTm6V2705zeU5dcNvQDlonOR68XvX2sh1sEOHO",
"api_host": "https://posthog.element.io"
},
"privacy_policy_url": "https://element.io/cookie-policy",
"map_style_url": "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx"

View File

@@ -1,14 +0,0 @@
Package: element-desktop
License: Apache-2.0
Vendor: support@element.io
Architecture: amd64
Maintainer: support@element.io
Depends: libgtk-3-0, libnotify4, libnss3, libxss1, libxtst6, xdg-utils, libatspi2.0-0, libuuid1, libsecret-1-0
Recommends: libappindicator3-1, libsqlcipher0
Replaces: riot-desktop (<< 1.7.0), riot-web (<< 1.7.0)
Breaks: riot-desktop (<< 1.7.0), riot-web (<< 1.7.0)
Section: net
Priority: extra
Homepage: https://element.io/
Description:
A feature-rich client for Matrix.org

View File

@@ -1,9 +0,0 @@
Package: riot-desktop
Version: 1.7.0
Depends: element-desktop
Maintainer: packages@element.io
Architecture: all
Priority: optional
Section: oldlibs
Description: transitional package
This is a transitional package. It can safely be removed.

View File

@@ -14,11 +14,11 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import path from 'path';
import childProcess from 'child_process';
import path from "path";
import childProcess from "child_process";
import HakEnv from '../../scripts/hak/hakEnv';
import { DependencyInfo } from '../../scripts/hak/dep';
import HakEnv from "../../scripts/hak/hakEnv";
import { DependencyInfo } from "../../scripts/hak/dep";
export default async function buildKeytar(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
const env = hakEnv.makeGypEnv();
@@ -26,15 +26,15 @@ export default async function buildKeytar(hakEnv: HakEnv, moduleInfo: Dependency
console.log("Running yarn with env", env);
await new Promise<void>((resolve, reject) => {
const proc = childProcess.spawn(
path.join(moduleInfo.nodeModuleBinDir, 'node-gyp' + (hakEnv.isWin() ? '.cmd' : '')),
['rebuild'],
path.join(moduleInfo.nodeModuleBinDir, "node-gyp" + (hakEnv.isWin() ? ".cmd" : "")),
["rebuild", "--arch", hakEnv.getTargetArch()],
{
cwd: moduleInfo.moduleBuildDir,
env,
stdio: 'inherit',
stdio: "inherit",
},
);
proc.on('exit', (code) => {
proc.on("exit", (code) => {
code ? reject(code) : resolve();
});
});

View File

@@ -14,20 +14,20 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import childProcess from 'child_process';
import childProcess from "child_process";
import HakEnv from '../../scripts/hak/hakEnv';
import { DependencyInfo } from '../../scripts/hak/dep';
import HakEnv from "../../scripts/hak/hakEnv";
import { DependencyInfo } from "../../scripts/hak/dep";
export default async function(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
const tools = [['python', '--version']]; // node-gyp uses python for reasons beyond comprehension
export default async function (hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
const tools = [["python", "--version"]]; // node-gyp uses python for reasons beyond comprehension
for (const tool of tools) {
await new Promise<void>((resolve, reject) => {
const proc = childProcess.spawn(tool[0], tool.slice(1), {
stdio: ['ignore'],
stdio: ["ignore"],
});
proc.on('exit', (code) => {
proc.on("exit", (code) => {
if (code !== 0) {
reject("Can't find " + tool);
} else {

View File

@@ -14,319 +14,50 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import path from 'path';
import childProcess from 'child_process';
import mkdirp from 'mkdirp';
import fsExtra from 'fs-extra';
import childProcess from "child_process";
import HakEnv from '../../scripts/hak/hakEnv';
import { DependencyInfo } from '../../scripts/hak/dep';
import HakEnv from "../../scripts/hak/hakEnv";
import { DependencyInfo } from "../../scripts/hak/dep";
export default async function(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
if (hakEnv.isWin()) {
await buildOpenSslWin(hakEnv, moduleInfo);
await buildSqlCipherWin(hakEnv, moduleInfo);
} else if (hakEnv.wantsStaticSqlCipherUnix()) {
await buildSqlCipherUnix(hakEnv, moduleInfo);
}
await buildMatrixSeshat(hakEnv, moduleInfo);
}
async function buildOpenSslWin(hakEnv: HakEnv, moduleInfo: DependencyInfo) {
const version = moduleInfo.cfg.dependencies.openssl;
const openSslDir = path.join(moduleInfo.moduleTargetDotHakDir, `openssl-${version}`);
const openSslArch = hakEnv.getTargetArch() === 'x64' ? 'VC-WIN64A' : 'VC-WIN32';
console.log("Building openssl in " + openSslDir);
await new Promise<void>((resolve, reject) => {
const proc = childProcess.spawn(
'perl',
[
'Configure',
'--prefix=' + moduleInfo.depPrefix,
// sqlcipher only uses about a tiny part of openssl. We link statically
// so will only pull in the symbols we use, but we may as well turn off
// as much as possible to save on build time.
'no-afalgeng',
'no-capieng',
'no-cms',
'no-ct',
'no-deprecated',
'no-dgram',
'no-dso',
'no-ec',
'no-ec2m',
'no-gost',
'no-nextprotoneg',
'no-ocsp',
'no-sock',
'no-srp',
'no-srtp',
'no-tests',
'no-ssl',
'no-tls',
'no-dtls',
'no-shared',
'no-aria',
'no-camellia',
'no-cast',
'no-chacha',
'no-cmac',
'no-des',
'no-dh',
'no-dsa',
'no-ecdh',
'no-ecdsa',
'no-idea',
'no-md4',
'no-mdc2',
'no-ocb',
'no-poly1305',
'no-rc2',
'no-rc4',
'no-rmd160',
'no-scrypt',
'no-seed',
'no-siphash',
'no-sm2',
'no-sm3',
'no-sm4',
'no-whirlpool',
openSslArch,
],
{
cwd: openSslDir,
stdio: 'inherit',
},
);
proc.on('exit', (code) => {
code ? reject(code) : resolve();
});
});
await new Promise<void>((resolve, reject) => {
const proc = childProcess.spawn(
'nmake',
['build_libs'],
{
cwd: openSslDir,
stdio: 'inherit',
},
);
proc.on('exit', (code) => {
code ? reject(code) : resolve();
});
});
await new Promise<void>((resolve, reject) => {
const proc = childProcess.spawn(
'nmake',
['install_dev'],
{
cwd: openSslDir,
stdio: 'inherit',
},
);
proc.on('exit', (code) => {
code ? reject(code) : resolve();
});
});
}
async function buildSqlCipherWin(hakEnv: HakEnv, moduleInfo: DependencyInfo) {
const version = moduleInfo.cfg.dependencies.sqlcipher;
const sqlCipherDir = path.join(moduleInfo.moduleTargetDotHakDir, `sqlcipher-${version}`);
const buildDir = path.join(sqlCipherDir, 'bld');
await mkdirp(buildDir);
await new Promise<void>((resolve, reject) => {
const proc = childProcess.spawn(
'nmake',
['/f', path.join('..', 'Makefile.msc'), 'libsqlite3.lib', 'TOP=..'],
{
cwd: buildDir,
stdio: 'inherit',
env: Object.assign({}, process.env, {
CCOPTS: "-DSQLITE_HAS_CODEC -I" + path.join(moduleInfo.depPrefix, 'include'),
LTLIBPATHS: "/LIBPATH:" + path.join(moduleInfo.depPrefix, 'lib'),
LTLIBS: "libcrypto.lib",
}),
},
);
proc.on('exit', (code) => {
code ? reject(code) : resolve();
});
});
await fsExtra.copy(
path.join(buildDir, 'libsqlite3.lib'),
path.join(moduleInfo.depPrefix, 'lib', 'sqlcipher.lib'),
);
await fsExtra.copy(
path.join(buildDir, 'sqlite3.h'),
path.join(moduleInfo.depPrefix, 'include', 'sqlcipher.h'),
);
}
async function buildSqlCipherUnix(hakEnv: HakEnv, moduleInfo: DependencyInfo) {
const version = moduleInfo.cfg.dependencies.sqlcipher;
const sqlCipherDir = path.join(moduleInfo.moduleTargetDotHakDir, `sqlcipher-${version}`);
const args = [
'--prefix=' + moduleInfo.depPrefix + '',
'--enable-tempstore=yes',
'--enable-shared=no',
'--enable-tcl=no',
];
if (hakEnv.isMac()) {
args.push('--with-crypto-lib=commoncrypto');
}
if (hakEnv.wantsStaticSqlCipherUnix()) {
args.push('--enable-tcl=no');
if (hakEnv.isLinux()) {
args.push('--with-pic=yes');
}
}
if (!hakEnv.isHost()) {
// In the nonsense world of `configure`, it is assumed you are building
// a compiler like `gcc`, so the `host` option actually means the target
// the build output runs on.
args.push(`--host=${hakEnv.getTargetId()}`);
}
const cflags = [
'-DSQLITE_HAS_CODEC',
];
if (!hakEnv.isHost()) {
// `clang` uses more logical option naming.
cflags.push(`--target=${hakEnv.getTargetId()}`);
}
if (cflags.length) {
args.push(`CFLAGS=${cflags.join(' ')}`);
}
const ldflags: string[] = [];
if (hakEnv.isMac()) {
ldflags.push('-framework Security');
ldflags.push('-framework Foundation');
}
if (ldflags.length) {
args.push(`LDFLAGS=${ldflags.join(' ')}`);
}
await new Promise<void>((resolve, reject) => {
const proc = childProcess.spawn(
path.join(sqlCipherDir, 'configure'),
args,
{
cwd: sqlCipherDir,
stdio: 'inherit',
},
);
proc.on('exit', (code) => {
code ? reject(code) : resolve();
});
});
await new Promise<void>((resolve, reject) => {
const proc = childProcess.spawn(
'make',
[],
{
cwd: sqlCipherDir,
stdio: 'inherit',
},
);
proc.on('exit', (code) => {
code ? reject(code) : resolve();
});
});
await new Promise<void>((resolve, reject) => {
const proc = childProcess.spawn(
'make',
['install'],
{
cwd: sqlCipherDir,
stdio: 'inherit',
},
);
proc.on('exit', (code) => {
code ? reject(code) : resolve();
});
});
}
async function buildMatrixSeshat(hakEnv: HakEnv, moduleInfo: DependencyInfo) {
// seshat now uses n-api so we shouldn't need to specify a node version to
// build against, but it does seems to still need something in here, so leaving
// it for now: we should confirm how much of this it still actually needs.
export default async function (hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
const env = hakEnv.makeGypEnv();
if (!hakEnv.isLinux() || hakEnv.wantsStaticSqlCipherUnix()) {
Object.assign(env, {
SQLCIPHER_STATIC: 1,
SQLCIPHER_LIB_DIR: path.join(moduleInfo.depPrefix, 'lib'),
SQLCIPHER_INCLUDE_DIR: path.join(moduleInfo.depPrefix, 'include'),
});
}
if (hakEnv.isLinux() && hakEnv.wantsStaticSqlCipherUnix()) {
// Ensure Element uses the statically-linked seshat build, and prevent other applications
// from attempting to use this one. Detailed explanation:
//
// RUSTFLAGS
// An environment variable containing a list of arguments to pass to rustc.
// -Clink-arg=VALUE
// A rustc argument to pass a single argument to the linker.
// -Wl,
// gcc syntax to pass an argument (from gcc) to the linker (ld).
// -Bsymbolic:
// Prefer local/statically linked symbols over those in the environment.
// Prevent overriding native libraries by LD_PRELOAD etc.
// --exclude-libs ALL
// Prevent symbols from being exported by any archive libraries.
// Reduces output filesize and prevents being dynamically linked against.
env.RUSTFLAGS = '-Clink-arg=-Wl,-Bsymbolic -Clink-arg=-Wl,--exclude-libs,ALL';
}
if (hakEnv.isWin()) {
env.RUSTFLAGS = '-Ctarget-feature=+crt-static -Clink-args=libcrypto.lib';
// Note that in general, you can specify targets in Rust without having to have
// the matching toolchain, however for this, cargo gets confused when building
// the build scripts since they run on the host, but vcvarsall.bat sets the c
// compiler in the path to be the one for the target, so we just use the matching
// toolchain for the target architecture which makes everything happy.
env.RUSTUP_TOOLCHAIN = `stable-${hakEnv.getTargetId()}`;
}
if (!hakEnv.isHost()) {
env.CARGO_BUILD_TARGET = hakEnv.getTargetId();
}
console.log("Running neon with env", env);
console.log("Running yarn install");
await new Promise<void>((resolve, reject) => {
const proc = childProcess.spawn(
path.join(moduleInfo.nodeModuleBinDir, 'neon' + (hakEnv.isWin() ? '.cmd' : '')),
['build', '--release'],
"yarn" + (hakEnv.isWin() ? ".cmd" : ""),
["install"],
{
cwd: moduleInfo.moduleBuildDir,
env,
stdio: 'inherit',
shell: true,
stdio: "inherit",
},
);
proc.on('exit', (code) => {
proc.on("exit", (code) => {
code ? reject(code) : resolve();
});
});
const buildTarget = hakEnv.wantsStaticSqlCipher() ? "build-bundled" : "build";
console.log("Running yarn build");
await new Promise<void>((resolve, reject) => {
const proc = childProcess.spawn(
"yarn" + (hakEnv.isWin() ? ".cmd" : ""),
["run", buildTarget],
{
cwd: moduleInfo.moduleBuildDir,
env,
shell: true,
stdio: "inherit",
},
);
proc.on("exit", (code) => {
code ? reject(code) : resolve();
});
});

View File

@@ -14,49 +14,32 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import childProcess from 'child_process';
import fsProm from 'fs/promises';
import childProcess from "child_process";
import fsProm from "fs/promises";
import HakEnv from '../../scripts/hak/hakEnv';
import { DependencyInfo } from '../../scripts/hak/dep';
export default async function(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
if (hakEnv.wantsStaticSqlCipher()) {
// of course tcl doesn't have a --version
await new Promise<void>((resolve, reject) => {
const proc = childProcess.spawn('tclsh', [], {
stdio: ['pipe', 'ignore', 'ignore'],
});
proc.on('exit', (code) => {
if (code !== 0) {
reject("Can't find tclsh - have you installed TCL?");
} else {
resolve();
}
});
proc.stdin.end();
});
}
import HakEnv from "../../scripts/hak/hakEnv";
import { DependencyInfo } from "../../scripts/hak/dep";
export default async function (hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
const tools = [
['rustc', '--version'],
['python', '--version'], // node-gyp uses python for reasons beyond comprehension
["rustc", "--version"],
["python", "--version"], // node-gyp uses python for reasons beyond comprehension
];
if (hakEnv.isWin()) {
tools.push(['perl', '--version']); // for openssl configure
tools.push(['nasm', '-v']); // for openssl building
tools.push(['patch', '--version']); // to patch sqlcipher Makefile.msc
tools.push(['nmake', '/?']);
tools.push(["perl", "--version"]); // for openssl configure
tools.push(["nasm", "-v"]); // for openssl building
tools.push(["patch", "--version"]); // to patch sqlcipher Makefile.msc
tools.push(["nmake", "/?"]);
} else {
tools.push(['make', '--version']);
tools.push(["make", "--version"]);
}
for (const tool of tools) {
await new Promise<void>((resolve, reject) => {
const proc = childProcess.spawn(tool[0], tool.slice(1), {
stdio: ['ignore'],
stdio: ["ignore"],
});
proc.on('exit', (code) => {
proc.on("exit", (code) => {
if (code !== 0) {
reject("Can't find " + tool);
} else {
@@ -68,19 +51,26 @@ export default async function(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promi
// Ensure Rust target exists (nb. we avoid depending on rustup)
await new Promise((resolve, reject) => {
const rustc = childProcess.execFile('rustc', [
'--target', hakEnv.getTargetId(), '-o', 'tmp', '-',
], (err, out) => {
if (err) {
reject(
"rustc can't build for target " + hakEnv.getTargetId() +
": ensure target is installed via `rustup target add " + hakEnv.getTargetId() + "` " +
"or your package manager if not using `rustup`",
);
}
fsProm.unlink('tmp').then(resolve);
});
rustc.stdin.write('fn main() {}');
rustc.stdin.end();
const rustc = childProcess.execFile(
"rustc",
["--target", hakEnv.getTargetId(), "--emit=obj", "-o", "tmp", "-"],
(err, out) => {
if (err) {
reject(
"rustc can't build for target " +
hakEnv.getTargetId() +
": ensure target is installed via `rustup target add " +
hakEnv.getTargetId() +
"` " +
"or your package manager if not using `rustup`",
);
}
fsProm.unlink("tmp").then(resolve);
},
);
rustc.stdin!.write("fn main() {}");
rustc.stdout!.pipe(process.stdout);
rustc.stderr!.pipe(process.stderr);
rustc.stdin!.end();
});
}

View File

@@ -1,132 +0,0 @@
/*
Copyright 2020 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import path from 'path';
import childProcess from 'child_process';
import fs from 'fs';
import fsProm from 'fs/promises';
import needle from 'needle';
import tar from 'tar';
import HakEnv from '../../scripts/hak/hakEnv';
import { DependencyInfo } from '../../scripts/hak/dep';
export default async function(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
if (hakEnv.wantsStaticSqlCipher()) {
await getSqlCipher(hakEnv, moduleInfo);
}
if (hakEnv.isWin()) {
await getOpenSsl(hakEnv, moduleInfo);
}
}
async function getSqlCipher(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
const version = moduleInfo.cfg.dependencies.sqlcipher;
const sqlCipherDir = path.join(moduleInfo.moduleTargetDotHakDir, `sqlcipher-${version}`);
let haveSqlcipher: boolean;
try {
await fsProm.stat(sqlCipherDir);
haveSqlcipher = true;
} catch (e) {
haveSqlcipher = false;
}
if (haveSqlcipher) return;
const sqlCipherTarball = path.join(moduleInfo.moduleDotHakDir, `sqlcipher-${version}.tar.gz`);
let haveSqlcipherTar: boolean;
try {
await fsProm.stat(sqlCipherTarball);
haveSqlcipherTar = true;
} catch (e) {
haveSqlcipherTar = false;
}
if (!haveSqlcipherTar) {
const bob = needle('get', `https://github.com/sqlcipher/sqlcipher/archive/v${version}.tar.gz`, {
follow: 10,
output: sqlCipherTarball,
});
await bob;
}
// Extract the tarball to per-target directories, then we avoid cross-contaiminating archs
await tar.x({
file: sqlCipherTarball,
cwd: moduleInfo.moduleTargetDotHakDir,
});
if (hakEnv.isWin()) {
// On Windows, we need to patch the makefile because it forces TEMP_STORE to
// default to files (1) but the README specifically says you '*must*' set it
// set it to 2 (default to memory).
const patchFile = path.join(moduleInfo.moduleHakDir, `sqlcipher-${version}-win.patch`);
await new Promise<void>((resolve, reject) => {
const readStream = fs.createReadStream(patchFile);
const proc = childProcess.spawn(
'patch',
['-p1'],
{
cwd: sqlCipherDir,
stdio: ['pipe', 'inherit', 'inherit'],
},
);
proc.on('exit', (code) => {
code ? reject(code) : resolve();
});
readStream.pipe(proc.stdin);
});
}
}
async function getOpenSsl(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
const version = moduleInfo.cfg.dependencies.openssl;
const openSslDir = path.join(moduleInfo.moduleTargetDotHakDir, `openssl-${version}`);
let haveOpenSsl: boolean;
try {
await fsProm.stat(openSslDir);
haveOpenSsl = true;
} catch (e) {
haveOpenSsl = false;
}
if (haveOpenSsl) return;
const openSslTarball = path.join(moduleInfo.moduleDotHakDir, `openssl-${version}.tar.gz`);
let haveOpenSslTar: boolean;
try {
await fsProm.stat(openSslTarball);
haveOpenSslTar = true;
} catch (e) {
haveOpenSslTar = false;
}
if (!haveOpenSslTar) {
await needle('get', `https://www.openssl.org/source/openssl-${version}.tar.gz`, {
follow: 10,
output: openSslTarball,
});
}
console.log("extracting " + openSslTarball + " in " + moduleInfo.moduleTargetDotHakDir);
await tar.x({
file: openSslTarball,
cwd: moduleInfo.moduleTargetDotHakDir,
});
}

View File

@@ -1,13 +1,7 @@
{
"scripts": {
"check": "check.ts",
"fetchDeps": "fetchDeps.ts",
"build": "build.ts"
},
"prune": "native",
"copy": "native/index.node",
"dependencies": {
"openssl": "1.1.1f",
"sqlcipher": "4.3.0"
}
"copy": "index.node"
}

View File

@@ -1,14 +0,0 @@
diff -Nur sqlcipher-4.3.0-orig/Makefile.msc sqlcipher-4.3.0-mod/Makefile.msc
--- sqlcipher-4.3.0-orig/Makefile.msc 2019-12-20 16:40:26.000000000 +0000
+++ sqlcipher-4.3.0-mod/Makefile.msc 2020-02-14 11:31:39.000000000 +0000
@@ -985,8 +985,8 @@
# default to file, 2 to default to memory, and 3 to force temporary
# tables to always be in memory.
#
-TCC = $(TCC) -DSQLITE_TEMP_STORE=1
-RCC = $(RCC) -DSQLITE_TEMP_STORE=1
+TCC = $(TCC) -DSQLITE_TEMP_STORE=2
+RCC = $(RCC) -DSQLITE_TEMP_STORE=2
# Enable/disable loadable extensions, and other optional features
# based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*).

View File

@@ -1,17 +1,14 @@
{
"compilerOptions": {
"moduleResolution": "node",
"esModuleInterop": true,
"target": "es2016",
"sourceMap": false,
"lib": [
"es2019",
]
},
"include": [
"./**/*.ts"
],
"ts-node": {
"transpileOnly": true
}
"compilerOptions": {
"moduleResolution": "node",
"esModuleInterop": true,
"target": "es2016",
"sourceMap": false,
"strict": true,
"lib": ["es2020"]
},
"include": ["../scripts/@types/*.d.ts", "./**/*.ts"],
"ts-node": {
"transpileOnly": true
}
}

37
localazy.json Normal file
View File

@@ -0,0 +1,37 @@
{
"readKey": "a7688614897667993891-866e2615b0a22e6ccef56aea9b10e815efa3e1296752a7a30bd9925f1a8f33e7",
"upload": {
"type": "json",
"keySeparator": "|",
"deprecate": "file",
"features": ["plural_object", "filter_untranslated"],
"files": [
{
"pattern": "src/i18n/strings/en_EN.json",
"file": "element-desktop.json",
"lang": "inherited"
},
{
"group": "existing",
"pattern": "src/i18n/strings/*.json",
"file": "element-desktop.json",
"excludes": ["src/i18n/strings/en_EN.json"],
"lang": "${autodetectLang}"
}
]
},
"download": {
"files": [
{
"conditions": "equals: ${file}, element-desktop.json",
"output": "src/i18n/strings/${langLsrUnderscore}.json"
}
],
"includeSourceLang": "${includeSourceLang|false}",
"langAliases": {
"en": "en-EN"
}
}
}

View File

@@ -1,168 +1,213 @@
{
"name": "element-desktop",
"productName": "Element",
"main": "lib/electron-main.js",
"version": "1.11.10",
"description": "A feature-rich client for Matrix.org",
"author": "Element",
"repository": {
"type": "git",
"url": "https://github.com/vector-im/element-desktop"
},
"license": "Apache-2.0",
"files": [],
"scripts": {
"i18n": "matrix-gen-i18n",
"prunei18n": "matrix-prune-i18n",
"diff-i18n": "cp src/i18n/strings/en_EN.json src/i18n/strings/en_EN_orig.json && matrix-gen-i18n && matrix-compare-i18n-files src/i18n/strings/en_EN_orig.json src/i18n/strings/en_EN.json",
"mkdirs": "mkdirp packages deploys",
"fetch": "yarn run mkdirs && node scripts/fetch-package.js",
"asar-webapp": "asar p webapp webapp.asar",
"start": "yarn run build:ts && yarn run build:res && electron .",
"lint": "yarn lint:types && yarn lint:js",
"lint:js": "eslint --max-warnings 0 src scripts hak",
"lint:js-fix": "eslint --fix src scripts hak",
"lint:types": "tsc --noEmit && tsc -p scripts/hak/tsconfig.json --noEmit && tsc -p hak/tsconfig.json --noEmit",
"build:native": "yarn run hak",
"build:native:universal": "yarn run hak --target x86_64-apple-darwin fetchandbuild && yarn run hak --target aarch64-apple-darwin fetchandbuild && yarn run hak --target x86_64-apple-darwin --target aarch64-apple-darwin copyandlink",
"build:32": "yarn run build:ts && yarn run build:res && electron-builder --ia32",
"build:64": "yarn run build:ts && yarn run build:res && electron-builder --x64",
"build:universal": "yarn run build:ts && yarn run build:res && electron-builder --universal",
"build": "yarn run build:ts && yarn run build:res && electron-builder",
"build:ts": "tsc",
"build:res": "node scripts/copy-res.js",
"docker:setup": "docker build -t element-desktop-dockerbuild dockerbuild",
"docker:build:native": "scripts/in-docker.sh yarn run hak",
"docker:build": "scripts/in-docker.sh yarn run build",
"docker:install": "scripts/in-docker.sh yarn install",
"debrepo": "scripts/mkrepo.sh",
"clean": "rimraf webapp.asar dist packages deploys lib",
"hak": "ts-node scripts/hak/index.ts",
"test": "jest"
},
"dependencies": {
"auto-launch": "^5.0.5",
"counterpart": "^0.18.6",
"electron-store": "^8.0.2",
"electron-window-state": "^5.0.3",
"minimist": "^1.2.6",
"png-to-ico": "^2.1.1",
"request": "^2.88.2"
},
"devDependencies": {
"@babel/core": "^7.18.10",
"@babel/preset-env": "^7.18.10",
"@babel/preset-typescript": "^7.18.6",
"@types/auto-launch": "^5.0.1",
"@types/counterpart": "^0.18.1",
"@types/detect-libc": "^1.0.0",
"@types/jest": "^28",
"@types/minimist": "^1.2.1",
"@types/mkdirp": "^1.0.2",
"@types/pacote": "^11.1.1",
"@types/rimraf": "^3.0.2",
"@typescript-eslint/eslint-plugin": "^5.6.0",
"@typescript-eslint/parser": "^5.6.0",
"allchange": "^1.0.6",
"app-builder-lib": "^22.14.10",
"asar": "^2.0.1",
"babel-jest": "^28.1.3",
"chokidar": "^3.5.2",
"detect-libc": "^1.0.3",
"electron": "^20",
"electron-builder": "22.11.4",
"electron-builder-squirrel-windows": "22.11.4",
"electron-devtools-installer": "^3.1.1",
"electron-notarize": "^1.0.0",
"eslint": "7.18.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-matrix-org": "^0.4.0",
"expect-playwright": "^0.8.0",
"find-npm-prefix": "^1.0.2",
"fs-extra": "^8.1.0",
"glob": "^7.1.6",
"jest": "^28",
"matrix-web-i18n": "^1.3.0",
"mkdirp": "^1.0.3",
"needle": "^2.5.0",
"node-pre-gyp": "^0.15.0",
"pacote": "^11.3.5",
"playwright": "^1.25.0",
"rimraf": "^3.0.2",
"tar": "^6.1.2",
"ts-jest": "^28.0.8",
"ts-node": "^10.4.0",
"typescript": "4.5.5"
},
"hakDependencies": {
"matrix-seshat": "^2.3.3",
"keytar": "^7.9.0"
},
"resolutions": {
"@types/node": "16.11.38"
},
"build": {
"appId": "im.riot.app",
"asarUnpack": "**/*.node",
"files": [
"package.json",
{
"from": ".hak/hakModules",
"to": "node_modules"
},
"lib/**"
],
"extraResources": [
{
"from": "res/img",
"to": "img"
},
"webapp.asar"
],
"linux": {
"target": "deb",
"category": "Network;InstantMessaging;Chat",
"maintainer": "support@element.io",
"desktop": {
"StartupWMClass": "element"
}
"name": "element-desktop",
"productName": "Element",
"main": "lib/electron-main.js",
"version": "1.11.47",
"description": "A feature-rich client for Matrix.org",
"author": "Element",
"homepage": "https://element.io",
"repository": {
"type": "git",
"url": "https://github.com/vector-im/element-desktop"
},
"mac": {
"category": "public.app-category.social-networking",
"darkModeSupport": true
"license": "Apache-2.0",
"files": [],
"engines": {
"node": ">=16.0.0"
},
"win": {
"target": [
"squirrel",
"msi"
],
"sign": "scripts/electron_winSign"
"scripts": {
"i18n": "matrix-gen-i18n && yarn i18n:sort && yarn i18n:lint",
"i18n:sort": "jq --sort-keys '.' src/i18n/strings/en_EN.json > src/i18n/strings/en_EN.json.tmp && mv src/i18n/strings/en_EN.json.tmp src/i18n/strings/en_EN.json",
"i18n:lint": "prettier --write src/i18n/strings/ --ignore-path /dev/null",
"i18n:diff": "cp src/i18n/strings/en_EN.json src/i18n/strings/en_EN_orig.json && yarn i18n && matrix-compare-i18n-files src/i18n/strings/en_EN_orig.json src/i18n/strings/en_EN.json",
"mkdirs": "mkdirp packages deploys",
"fetch": "yarn run mkdirs && ts-node scripts/fetch-package.ts",
"asar-webapp": "asar p webapp webapp.asar",
"start": "yarn run build:ts && yarn run build:res && electron .",
"lint": "yarn lint:types && yarn lint:js",
"lint:js": "yarn lint:js:src && yarn lint:js:test && yarn lint:js:scripts && yarn lint:js:hak",
"lint:js:src": "eslint --max-warnings 0 src",
"lint:js:test": "eslint --max-warnings 0 --config .eslintrc-test.js test",
"lint:js:scripts": "eslint --max-warnings 0 --config .eslintrc-scripts.js scripts",
"lint:js:hak": "eslint --max-warnings 0 --config .eslintrc-hak.js hak",
"lint:js-fix": "yarn lint:js-fix:src &&yarn lint:js-fix:test && yarn lint:js-fix:scripts && yarn lint:js-fix:hak",
"lint:js-fix:src": "eslint --fix --max-warnings 0 src",
"lint:js-fix:test": "eslint --fix --max-warnings 0 --config .eslintrc-test.js test",
"lint:js-fix:scripts": "eslint --fix --max-warnings 0 --config .eslintrc-scripts.js scripts",
"lint:js-fix:hak": "eslint --fix --max-warnings 0 --config .eslintrc-hak.js hak",
"lint:types": "yarn lint:types:src && yarn lint:types:test && yarn lint:types:scripts && yarn lint:types:hak",
"lint:types:src": "tsc --noEmit",
"lint:types:test": "tsc --noEmit -p test/tsconfig.json",
"lint:types:scripts": "tsc --noEmit -p scripts/tsconfig.json",
"lint:types:hak": "tsc --noEmit -p hak/tsconfig.json",
"build:native": "yarn run hak",
"build:native:universal": "yarn run hak --target x86_64-apple-darwin fetchandbuild && yarn run hak --target aarch64-apple-darwin fetchandbuild && yarn run hak --target x86_64-apple-darwin --target aarch64-apple-darwin copyandlink",
"build:32": "yarn run build:ts && yarn run build:res && electron-builder --ia32",
"build:64": "yarn run build:ts && yarn run build:res && electron-builder --x64",
"build:universal": "yarn run build:ts && yarn run build:res && electron-builder --universal",
"build": "yarn run build:ts && yarn run build:res && electron-builder",
"build:ts": "tsc",
"build:res": "ts-node scripts/copy-res.ts",
"docker:setup": "docker build -t element-desktop-dockerbuild dockerbuild",
"docker:build:native": "scripts/in-docker.sh yarn run hak",
"docker:build": "scripts/in-docker.sh yarn run build",
"docker:install": "scripts/in-docker.sh yarn install",
"clean": "rimraf webapp.asar dist packages deploys lib",
"hak": "ts-node scripts/hak/index.ts",
"test": "jest"
},
"msi": {
"perMachine": true
"dependencies": {
"@sentry/electron": "^4.3.0",
"auto-launch": "^5.0.5",
"counterpart": "^0.18.6",
"electron-clear-data": "^1.0.5",
"electron-store": "^8.0.2",
"electron-window-state": "^5.0.3",
"minimist": "^1.2.6",
"node-fetch": "^2",
"png-to-ico": "^2.1.1",
"uuid": "^9.0.0"
},
"directories": {
"output": "dist"
"devDependencies": {
"@babel/core": "^7.18.10",
"@babel/preset-env": "^7.18.10",
"@babel/preset-typescript": "^7.18.6",
"@electron/asar": "^3.2.3",
"@electron/notarize": "^2.0.0",
"@types/auto-launch": "^5.0.1",
"@types/counterpart": "^0.18.1",
"@types/detect-libc": "^1.0.0",
"@types/jest": "^29.0.0",
"@types/minimist": "^1.2.1",
"@types/mkdirp": "^1.0.2",
"@types/node": "16.18.52",
"@types/pacote": "^11.1.1",
"@types/tar": "^6.1.3",
"@types/uuid": "^9.0.2",
"@typescript-eslint/eslint-plugin": "^5.42.0",
"@typescript-eslint/parser": "^5.42.0",
"allchange": "^1.0.6",
"app-builder-lib": "24.6.5",
"babel-jest": "^29.0.0",
"chokidar": "^3.5.2",
"detect-libc": "^1.0.3",
"electron": "^26.2.1",
"electron-builder": "24.6.4",
"electron-builder-squirrel-windows": "24.6.5",
"electron-devtools-installer": "^3.2.0",
"eslint": "^8.26.0",
"eslint-config-google": "^0.14.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-matrix-org": "^1.0.0",
"eslint-plugin-unicorn": "^48.0.0",
"expect-playwright": "^0.8.0",
"find-npm-prefix": "^1.0.2",
"fs-extra": "^11.0.0",
"glob": "^10.0.0",
"jest": "^29.0.0",
"matrix-web-i18n": "^3.1.3",
"mkdirp": "^3.0.0",
"node-pre-gyp": "^0.17.0",
"pacote": "^17.0.0",
"playwright": "^1.25.0",
"prettier": "^2.8.1",
"rimraf": "^5.0.0",
"tar": "^6.1.2",
"ts-jest": "^29.0.0",
"ts-node": "^10.9.1",
"typescript": "5.1.6"
},
"afterPack": "scripts/electron_afterPack",
"afterSign": "scripts/electron_afterSign",
"protocols": [
{
"name": "element",
"schemes": [
"element"
"hakDependencies": {
"matrix-seshat": "^3.0.1",
"keytar": "^7.9.0"
},
"resolutions": {
"@types/node": "16.18.52"
},
"build": {
"appId": "im.riot.app",
"asarUnpack": "**/*.node",
"files": [
"package.json",
{
"from": ".hak/hakModules",
"to": "node_modules"
},
"lib/**"
],
"extraResources": [
{
"from": "res/img",
"to": "img"
},
"webapp.asar"
],
"linux": {
"target": [
"tar.gz",
"deb"
],
"category": "Network;InstantMessaging;Chat",
"maintainer": "support@element.io",
"icon": "build/icons"
},
"deb": {
"packageCategory": "net",
"depends": [
"libgtk-3-0",
"libnotify4",
"libnss3",
"libxss1",
"libxtst6",
"xdg-utils",
"libatspi2.0-0",
"libuuid1",
"libsecret-1-0",
"libasound2",
"libgbm1"
],
"recommends": [
"libsqlcipher0",
"element-io-archive-keyring"
]
},
"mac": {
"category": "public.app-category.social-networking",
"darkModeSupport": true,
"hardenedRuntime": true,
"gatekeeperAssess": true,
"entitlements": "./build/entitlements.mac.plist",
"icon": "build/icons/icon.icns"
},
"win": {
"target": [
"squirrel"
],
"signingHashAlgorithms": [
"sha256"
],
"icon": "build/icons/icon.ico"
},
"directories": {
"output": "dist"
},
"protocols": [
{
"name": "element",
"schemes": [
"element"
]
}
]
}
]
},
"jest": {
"testEnvironment": "node",
"testMatch": [
"<rootDir>/test/**/*-test.[jt]s?(x)"
],
"setupFilesAfterEnv": [
"expect-playwright"
]
}
},
"jest": {
"testEnvironment": "node",
"testMatch": [
"<rootDir>/test/**/*-test.[jt]s?(x)"
],
"setupFilesAfterEnv": [
"expect-playwright"
]
}
}

19
scripts/@types/find-npm-prefix.d.ts vendored Normal file
View File

@@ -0,0 +1,19 @@
/*
Copyright 2022 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
declare module "find-npm-prefix" {
export default function findPrefix(dir: string): Promise<string>;
}

20
scripts/@types/node-pre-gyp.d.ts vendored Normal file
View File

@@ -0,0 +1,20 @@
/*
Copyright 2022 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
declare module "node-pre-gyp/lib/util/versioning" {
// eslint-disable-next-line @typescript-eslint/naming-convention
export function get_runtime_abi(runtime: string, version: string): string;
}

View File

@@ -1,127 +0,0 @@
#!/usr/bin/env node
// copies resources into the lib directory.
const parseArgs = require('minimist');
const chokidar = require('chokidar');
const path = require('path');
const fs = require('fs');
const argv = parseArgs(process.argv.slice(2), {});
const watch = argv.w;
const verbose = argv.v;
function errCheck(err) {
if (err) {
console.error(err.message);
process.exit(1);
}
}
const I18N_BASE_PATH = "src/i18n/strings/";
const INCLUDE_LANGS = fs.readdirSync(I18N_BASE_PATH).filter(fn => fn.endsWith(".json"));
// Ensure lib, lib/i18n and lib/i18n/strings all exist
fs.mkdirSync('lib/i18n/strings', { recursive: true });
function genLangFile(file, dest) {
let translations = {};
[file].forEach(function(f) {
if (fs.existsSync(f)) {
try {
Object.assign(
translations,
JSON.parse(fs.readFileSync(f).toString()),
);
} catch (e) {
console.error("Failed: " + f, e);
throw e;
}
}
});
translations = weblateToCounterpart(translations);
const json = JSON.stringify(translations, null, 4);
const filename = path.basename(file);
fs.writeFileSync(dest + filename, json);
if (verbose) {
console.log("Generated language file: " + filename);
}
}
/*
* Convert translation key from weblate format
* (which only supports a single level) to counterpart
* which requires object values for 'count' translations.
*
* eg.
* "there are %(count)s badgers|one": "a badger",
* "there are %(count)s badgers|other": "%(count)s badgers"
* becomes
* "there are %(count)s badgers": {
* "one": "a badger",
* "other": "%(count)s badgers"
* }
*/
function weblateToCounterpart(inTrs) {
const outTrs = {};
for (const key of Object.keys(inTrs)) {
const keyParts = key.split('|', 2);
if (keyParts.length === 2) {
let obj = outTrs[keyParts[0]];
if (obj === undefined) {
obj = outTrs[keyParts[0]] = {};
} else if (typeof obj === "string") {
// This is a transitional edge case if a string went from singular to pluralised and both still remain
// in the translation json file. Use the singular translation as `other` and merge pluralisation atop.
obj = outTrs[keyParts[0]] = {
"other": inTrs[key],
};
console.warn("Found entry in i18n file in both singular and pluralised form", keyParts[0]);
}
obj[keyParts[1]] = inTrs[key];
} else {
outTrs[key] = inTrs[key];
}
}
return outTrs;
}
/*
watch the input files for a given language,
regenerate the file, and regenerating languages.json with the new filename
*/
function watchLanguage(file, dest) {
// XXX: Use a debounce because for some reason if we read the language
// file immediately after the FS event is received, the file contents
// appears empty. Possibly https://github.com/nodejs/node/issues/6112
let makeLangDebouncer;
const makeLang = () => {
if (makeLangDebouncer) {
clearTimeout(makeLangDebouncer);
}
makeLangDebouncer = setTimeout(() => {
genLangFile(file, dest);
}, 500);
};
chokidar.watch(file)
.on('add', makeLang)
.on('change', makeLang)
.on('error', errCheck);
}
// language resources
const I18N_DEST = "lib/i18n/strings/";
INCLUDE_LANGS.forEach((file) => {
genLangFile(I18N_BASE_PATH + file, I18N_DEST);
}, {});
if (watch) {
INCLUDE_LANGS.forEach(file => watchLanguage(I18N_BASE_PATH + file, I18N_DEST));
}

81
scripts/copy-res.ts Executable file
View File

@@ -0,0 +1,81 @@
#!/usr/bin/env -S npx ts-node
// copies resources into the lib directory.
import parseArgs from "minimist";
import * as chokidar from "chokidar";
import * as path from "path";
import * as fs from "fs";
const argv = parseArgs(process.argv.slice(2), {});
const watch = argv.w;
const verbose = argv.v;
function errCheck(err?: Error): void {
if (err) {
console.error(err.message);
process.exit(1);
}
}
const I18N_BASE_PATH = "src/i18n/strings/";
const INCLUDE_LANGS = fs.readdirSync(I18N_BASE_PATH).filter((fn) => fn.endsWith(".json"));
// Ensure lib, lib/i18n and lib/i18n/strings all exist
fs.mkdirSync("lib/i18n/strings", { recursive: true });
type Translations = Record<string, Record<string, string> | string>;
function genLangFile(file: string, dest: string): void {
const translations: Translations = {};
[file].forEach(function (f) {
if (fs.existsSync(f)) {
try {
Object.assign(translations, JSON.parse(fs.readFileSync(f).toString()));
} catch (e) {
console.error("Failed: " + f, e);
throw e;
}
}
});
const json = JSON.stringify(translations, null, 4);
const filename = path.basename(file);
fs.writeFileSync(dest + filename, json);
if (verbose) {
console.log("Generated language file: " + filename);
}
}
/*
watch the input files for a given language,
regenerate the file, and regenerating languages.json with the new filename
*/
function watchLanguage(file: string, dest: string): void {
// XXX: Use a debounce because for some reason if we read the language
// file immediately after the FS event is received, the file contents
// appears empty. Possibly https://github.com/nodejs/node/issues/6112
let makeLangDebouncer: NodeJS.Timeout | undefined;
const makeLang = (): void => {
if (makeLangDebouncer) {
clearTimeout(makeLangDebouncer);
}
makeLangDebouncer = setTimeout(() => {
genLangFile(file, dest);
}, 500);
};
chokidar.watch(file).on("add", makeLang).on("change", makeLang).on("error", errCheck);
}
// language resources
const I18N_DEST = "lib/i18n/strings/";
INCLUDE_LANGS.forEach((file): void => {
genLangFile(I18N_BASE_PATH + file, I18N_DEST);
}, {});
if (watch) {
INCLUDE_LANGS.forEach((file) => watchLanguage(I18N_BASE_PATH + file, I18N_DEST));
}

View File

@@ -1,15 +0,0 @@
const fsProm = require('fs').promises;
const path = require('path');
exports.default = async function(context) {
const { electronPlatformName, appOutDir } = context;
// Squirrel windows will try to relaunch the app using an executable of the same name as
// before in the new version, so will fail if the executable is now called something else.
// We add a fake Riot.exe that it can run which runs the real one.
// This also gets signed automatically, presumably because electron-build just looks for all
// exe files and signs them all...
if (electronPlatformName === 'win32') {
await fsProm.copyFile('build/rebrand_stub/rebrand_stub.exe', path.join(appOutDir, "Riot.exe"));
}
};

View File

@@ -1,33 +0,0 @@
const { notarize } = require('electron-notarize');
let warned = false;
exports.default = async function(context) {
const { electronPlatformName, appOutDir } = context;
const appId = context.packager.info.appInfo.id;
if (electronPlatformName === 'darwin') {
const appName = context.packager.appInfo.productFilename;
// We get the password from keychain. The keychain stores
// user IDs too, but apparently altool can't get the user ID
// from the keychain, so we need to get it from the environment.
const userId = process.env.NOTARIZE_APPLE_ID;
if (userId === undefined) {
if (!warned) {
console.log("*************************************");
console.log("* NOTARIZE_APPLE_ID is not set. *");
console.log("* This build will NOT be notarised. *");
console.log("*************************************");
warned = true;
}
return;
}
console.log("Notarising macOS app. This may be some time.");
return await notarize({
appBundleId: appId,
appPath: `${appOutDir}/${appName}.app`,
appleId: userId,
appleIdPassword: '@keychain:NOTARIZE_CREDS',
});
}
};

View File

@@ -1,78 +0,0 @@
const { execFile } = require('child_process');
// Loosely based on computeSignToolArgs from app-builder-lib/src/codeSign/windowsCodeSign.ts
function computeSignToolArgs(options, keyContainer) {
const args = [];
if (process.env.ELECTRON_BUILDER_OFFLINE !== "true") {
const timestampingServiceUrl = options.options.timeStampServer || "http://timestamp.digicert.com";
args.push(
options.isNest || options.hash === "sha256" ? "/tr" : "/t",
options.isNest || options.hash === "sha256" ? (
options.options.rfc3161TimeStampServer || "http://timestamp.comodoca.com/rfc3161"
) : timestampingServiceUrl,
);
}
args.push('/kc', keyContainer);
// To use the hardware token (this should probably be less hardcoded)
args.push('/csp', 'eToken Base Cryptographic Provider');
// The certificate file. Somehow this appears to be the only way to specify
// the cert that works. If you specify the subject name or hash, it will
// say it can't associate the private key to the certificate.
// TODO: Find a way to pass this through from the electron-builder config
// so we don't have to hard-code this here
// fwiw https://stackoverflow.com/questions/17927895/automate-extended-validation-ev-code-signing
// is about the most useful resource on automating code signing...
args.push('/f', 'element.io\\New_Vector_Ltd.pem');
if (options.hash !== "sha1") {
args.push("/fd", options.hash);
if (process.env.ELECTRON_BUILDER_OFFLINE !== "true") {
args.push("/td", "sha256");
}
}
// msi does not support dual-signing
if (options.isNest) {
args.push("/as");
}
// https://github.com/electron-userland/electron-builder/issues/2875#issuecomment-387233610
args.push("/debug");
// must be last argument
args.push(options.path);
return args;
}
let warned = false;
exports.default = async function(options) {
const keyContainer = process.env.SIGNING_KEY_CONTAINER;
if (keyContainer === undefined) {
if (!warned) {
console.warn(
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" +
"! Skipping Windows signing. !\n" +
"! SIGNING_KEY_CONTAINER not defined. !\n" +
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!",
);
warned = true;
}
return;
}
return new Promise((resolve, reject) => {
const args = ['sign'].concat(computeSignToolArgs(options, keyContainer));
execFile('signtool', args, {}, (error, stdout) => {
if (error) {
console.error("signtool failed with code " + error);
reject("signtool failed with code " + error);
console.log(stdout);
} else {
resolve();
}
});
});
};

View File

@@ -1,43 +1,41 @@
#!/usr/bin/env node
#!/usr/bin/env -S npx ts-node --resolveJsonModule
const process = require('process');
const path = require('path');
const fs = require('fs');
const fsPromises = require('fs').promises;
const childProcess = require('child_process');
const tar = require('tar');
const asar = require('asar');
const needle = require('needle');
import * as path from "path";
import { createWriteStream, promises as fs } from "fs";
import * as childProcess from "child_process";
import tar from "tar";
import * as asar from "@electron/asar";
import fetch from "node-fetch";
import { promises as stream } from "stream";
const riotDesktopPackageJson = require('../package.json');
const { setPackageVersion } = require('./set-version.js');
import riotDesktopPackageJson from "../package.json";
import { setPackageVersion } from "./set-version";
const PUB_KEY_URL = "https://packages.riot.im/element-release-key.asc";
const PACKAGE_URL_PREFIX = "https://github.com/vector-im/element-web/releases/download/";
const DEVELOP_TGZ_URL = "https://vector-im.github.io/element-web/develop.tar.gz";
const ASAR_PATH = 'webapp.asar';
const DEVELOP_TGZ_URL = "https://develop.element.io/develop.tar.gz";
const ASAR_PATH = "webapp.asar";
async function downloadToFile(url, filename) {
async function downloadToFile(url: string, filename: string): Promise<void> {
console.log("Downloading " + url + "...");
try {
await needle('get', url, null,
{
follow_max: 5,
output: filename,
},
);
const resp = await fetch(url);
if (!resp.ok) throw new Error(`unexpected response ${resp.statusText}`);
if (!resp.body) throw new Error(`unexpected response has no body ${resp.statusText}`);
await stream.pipeline(resp.body, createWriteStream(filename));
} catch (e) {
console.error(e);
try {
await fsPromises.unlink(filename);
await fs.unlink(filename);
} catch (_) {}
throw e;
}
}
async function verifyFile(filename) {
return new Promise((resolve, reject) => {
childProcess.execFile('gpg', ['--verify', filename + '.asc', filename], (error) => {
async function verifyFile(filename: string): Promise<void> {
return new Promise<void>((resolve, reject) => {
childProcess.execFile("gpg", ["--verify", filename + ".asc", filename], (error) => {
if (error) {
reject(error);
} else {
@@ -47,35 +45,35 @@ async function verifyFile(filename) {
});
}
async function main() {
async function main(): Promise<number | undefined> {
let verify = true;
let importkey = false;
let pkgDir = 'packages';
let deployDir = 'deploys';
let cfgDir;
let targetVersion;
let filename;
let url;
let pkgDir = "packages";
let deployDir = "deploys";
let cfgDir: string | undefined;
let targetVersion: string | undefined;
let filename: string | undefined;
let url: string | undefined;
let setVersion = false;
while (process.argv.length > 2) {
switch (process.argv[2]) {
case '--noverify':
case "--noverify":
verify = false;
break;
case '--importkey':
case "--importkey":
importkey = true;
break;
case '--packages':
case "--packages":
process.argv.shift();
pkgDir = process.argv[2];
break;
case '--deploys':
case "--deploys":
process.argv.shift();
deployDir = process.argv[2];
break;
case '--cfgdir':
case '-d':
case "--cfgdir":
case "-d":
process.argv.shift();
cfgDir = process.argv[2];
break;
@@ -86,13 +84,13 @@ async function main() {
}
if (targetVersion === undefined) {
targetVersion = 'v' + riotDesktopPackageJson.version;
} else if (targetVersion !== 'develop') {
targetVersion = "v" + riotDesktopPackageJson.version;
} else if (targetVersion !== "develop") {
setVersion = true; // version was specified
}
if (targetVersion === 'develop') {
filename = 'develop.tar.gz';
if (targetVersion === "develop") {
filename = "develop.tar.gz";
url = DEVELOP_TGZ_URL;
verify = false; // develop builds aren't signed
} else if (targetVersion.includes("://")) {
@@ -101,11 +99,11 @@ async function main() {
verify = false; // manually verified
} else {
filename = `element-${targetVersion}.tar.gz`;
url = PACKAGE_URL_PREFIX + targetVersion + '/' + filename;
url = PACKAGE_URL_PREFIX + targetVersion + "/" + filename;
}
const haveGpg = await new Promise((resolve) => {
childProcess.execFile('gpg', ['--version'], (error) => {
const haveGpg = await new Promise<boolean>((resolve) => {
childProcess.execFile("gpg", ["--version"], (error) => {
resolve(!error);
});
});
@@ -116,8 +114,8 @@ async function main() {
return 1;
}
await new Promise((resolve) => {
const gpgProc = childProcess.execFile('gpg', ['--import'], (error) => {
await new Promise<boolean>((resolve) => {
const gpgProc = childProcess.execFile("gpg", ["--import"], (error) => {
if (error) {
console.log("Failed to import key", error);
} else {
@@ -125,7 +123,9 @@ async function main() {
}
resolve(!error);
});
needle.get(PUB_KEY_URL).pipe(gpgProc.stdin);
fetch(PUB_KEY_URL).then((resp) => {
stream.pipeline(resp.body, gpgProc.stdin!);
});
});
return 0;
}
@@ -143,18 +143,17 @@ async function main() {
}
let haveDeploy = false;
let expectedDeployDir = path.join(deployDir, path.basename(filename).replace(/\.tar\.gz/, ''));
let expectedDeployDir = path.join(deployDir, path.basename(filename).replace(/\.tar\.gz/, ""));
try {
await fs.opendir(expectedDeployDir);
console.log(expectedDeployDir + "already exists");
haveDeploy = true;
} catch (e) {
}
} catch (e) {}
if (!haveDeploy) {
const outPath = path.join(pkgDir, filename);
try {
await fsPromises.stat(outPath);
await fs.stat(outPath);
console.log("Already have " + filename + ": not redownloading");
} catch (e) {
try {
@@ -167,11 +166,11 @@ async function main() {
if (verify) {
try {
await fsPromises.stat(outPath+'.asc');
await fs.stat(outPath + ".asc");
console.log("Already have " + filename + ".asc: not redownloading");
} catch (e) {
try {
await downloadToFile(url + '.asc', outPath + '.asc');
await downloadToFile(url + ".asc", outPath + ".asc");
} catch (e) {
console.log("Failed to download " + url, e);
return 1;
@@ -192,7 +191,7 @@ async function main() {
await tar.x({
file: outPath,
cwd: deployDir,
onentry: entry => {
onentry: (entry) => {
// Find the appropriate extraction path, only needed for `develop` where the dir name is unknown
if (entry.type === "Directory" && !path.join(deployDir, entry.path).startsWith(expectedDeployDir)) {
expectedDeployDir = path.join(deployDir, entry.path);
@@ -202,17 +201,16 @@ async function main() {
}
try {
await fsPromises.stat(ASAR_PATH);
await fs.stat(ASAR_PATH);
console.log(ASAR_PATH + " already present: removing");
await fsPromises.unlink(ASAR_PATH);
} catch (e) {
}
await fs.unlink(ASAR_PATH);
} catch (e) {}
if (cfgDir.length) {
const configJsonSource = path.join(cfgDir, 'config.json');
const configJsonDest = path.join(expectedDeployDir, 'config.json');
console.log(configJsonSource + ' -> ' + configJsonDest);
await fsPromises.copyFile(configJsonSource, configJsonDest);
const configJsonSource = path.join(cfgDir, "config.json");
const configJsonDest = path.join(expectedDeployDir, "config.json");
console.log(configJsonSource + " -> " + configJsonDest);
await fs.copyFile(configJsonSource, configJsonDest);
} else {
console.log("Skipping config file");
}
@@ -221,7 +219,7 @@ async function main() {
await asar.createPackage(expectedDeployDir, ASAR_PATH);
if (setVersion) {
const semVer = fs.readFileSync(path.join(expectedDeployDir, "version"), "utf-8").trim();
const semVer = (await fs.readFile(path.join(expectedDeployDir, "version"), "utf-8")).trim();
console.log("Updating version to " + semVer);
await setPackageVersion(semVer);
}
@@ -229,9 +227,11 @@ async function main() {
console.log("Done!");
}
main().then((ret) => {
process.exit(ret);
}).catch(e => {
console.error(e);
process.exit(1);
});
main()
.then((ret) => {
process.exit(ret);
})
.catch((e) => {
console.error(e);
process.exit(1);
});

View File

@@ -0,0 +1,129 @@
#!/usr/bin/env -S npx ts-node
/**
* Script to generate electron-builder.json config files for builds which don't match package.json, e.g. nightlies
* This script has different outputs depending on your os platform.
*
* On Windows:
* Prefixes the nightly version with `0.0.1-nightly.` as it breaks if it is not semver
*
* On macOS:
* Passes --notarytool-team-id to build.mac.notarize.notarize if specified
*
* On Linux:
* Replaces spaces in the product name with dashes as spaces in paths can cause issues
* Passes --deb-custom-control to build.deb.fpm if specified
* Removes libsqlcipher0 recommended dependency if env SQLCIPHER_BUNDLED is asserted.
*/
import parseArgs from "minimist";
import fsProm from "fs/promises";
import * as os from "os";
import { Configuration } from "app-builder-lib";
const ELECTRON_BUILDER_CFG_FILE = "electron-builder.json";
const NIGHTLY_APP_ID = "im.riot.nightly";
const NIGHTLY_APP_NAME = "element-desktop-nightly";
const NIGHTLY_DEB_NAME = "element-nightly";
const argv = parseArgs<{
"nightly"?: string;
"signtool-thumbprint"?: string;
"signtool-subject-name"?: string;
"notarytool-team-id"?: string;
"deb-changelog"?: string;
}>(process.argv.slice(2), {
string: ["nightly", "deb-changelog", "signtool-thumbprint", "signtool-subject-name", "notarytool-team-id"],
});
type DeepWriteable<T> = { -readonly [P in keyof T]: DeepWriteable<T[P]> };
interface PackageBuild extends DeepWriteable<Omit<Configuration, "extraMetadata">> {
extraMetadata?: {
productName?: string;
name?: string;
version?: string;
description?: string;
};
}
interface Package {
build: PackageBuild;
productName: string;
description: string;
}
async function main(): Promise<number | void> {
// Electron builder doesn't overlay with the config in package.json, so load it here
const pkg: Package = JSON.parse(await fsProm.readFile("package.json", "utf8"));
const cfg: PackageBuild = {
...pkg.build,
extraMetadata: {
productName: pkg.productName,
description: pkg.description,
},
};
if (!cfg.deb!.fpm) cfg.deb!.fpm = [];
if (argv.nightly) {
cfg.appId = NIGHTLY_APP_ID;
cfg.extraMetadata!.productName += " Nightly";
cfg.extraMetadata!.name = NIGHTLY_APP_NAME;
cfg.extraMetadata!.description += " (nightly unstable build)";
cfg.deb!.fpm!.push("--name", NIGHTLY_DEB_NAME);
let version = argv.nightly;
if (os.platform() === "win32") {
// The windows packager relies on parsing this as semver, so we have to make it look like one.
// This will give our update packages really stupid names, but we probably can't change that either
// because squirrel windows parses them for the version too. We don't really care: nobody sees them.
// We just give the installer a static name, so you'll just see this in the 'about' dialog.
// Turns out if you use 0.0.0 here it makes Squirrel windows crash, so we use 0.0.1.
version = "0.0.1-nightly." + version;
}
cfg.extraMetadata!.version = version;
} else {
cfg.deb!.fpm!.push("--deb-field", "Replaces: riot-desktop (<< 1.7.0), riot-web (<< 1.7.0)");
cfg.deb!.fpm!.push("--deb-field", "Breaks: riot-desktop (<< 1.7.0), riot-web (<< 1.7.0)");
}
if (argv["signtool-thumbprint"] && argv["signtool-subject-name"]) {
cfg.win!.certificateSubjectName = argv["signtool-subject-name"];
cfg.win!.certificateSha1 = argv["signtool-thumbprint"];
}
if (argv["notarytool-team-id"]) {
cfg.mac!.notarize = {
teamId: argv["notarytool-team-id"],
};
}
if (os.platform() === "linux") {
// Electron crashes on debian if there's a space in the path.
// https://github.com/vector-im/element-web/issues/13171
cfg.extraMetadata!.productName = cfg.extraMetadata!.productName!.replace(/ /g, "-");
if (argv["deb-changelog"]) {
cfg.deb!.fpm!.push(`--deb-changelog=${argv["deb-changelog"]}`);
}
if (process.env.SQLCIPHER_BUNDLED) {
// Remove sqlcipher dependency when using bundled
cfg.deb!.recommends = cfg.deb!.recommends?.filter((d) => d !== "libsqlcipher0");
}
}
await fsProm.writeFile(ELECTRON_BUILDER_CFG_FILE, JSON.stringify(cfg, null, 4));
}
main()
.then((ret) => {
process.exit(ret!);
})
.catch((e) => {
console.error(e);
process.exit(1);
});

View File

@@ -0,0 +1,41 @@
#!/usr/bin/env -S npx ts-node
/**
* Script to generate incremental Nightly build versions, based on the latest Nightly build version of that kind.
* The version format is YYYYMMDDNN where NN is in case we need to do multiple versions in a day.
*
* NB. on windows, squirrel will try to parse the version number parts, including this string, into 32-bit integers,
* which is fine as long as we only add two digits to the end...
*/
import parseArgs from "minimist";
const argv = parseArgs<{
latest?: string;
}>(process.argv.slice(2), {
string: ["latest"],
});
function parseVersion(version: string): [Date, number] {
const year = parseInt(version.slice(0, 4), 10);
const month = parseInt(version.slice(4, 6), 10);
const day = parseInt(version.slice(6, 8), 10);
const num = parseInt(version.slice(8, 10), 10);
return [new Date(year, month - 1, day), num];
}
const [latestDate, latestNum] = argv.latest ? parseVersion(argv.latest) : [];
const now = new Date();
const month = (now.getMonth() + 1).toString().padStart(2, "0");
const date = now.getDate().toString().padStart(2, "0");
let buildNum = 1;
if (latestDate && new Date(latestDate).getDate().toString().padStart(2, "0") === date) {
buildNum = latestNum! + 1;
}
if (buildNum > 99) {
throw new Error("Maximum number of Nightlies exceeded on this day.");
}
console.log(now.getFullYear() + month + date + buildNum.toString().padStart(2, "0"));

25
scripts/get-version.ts Executable file
View File

@@ -0,0 +1,25 @@
#!/usr/bin/env -S npx ts-node
/*
* Checks for the presence of a webapp, inspects its version and prints it
*/
import { versionFromAsar } from "./set-version";
async function main(): Promise<number> {
const version = await versionFromAsar();
console.log(version);
return 0;
}
if (require.main === module) {
main()
.then((ret) => {
process.exit(ret);
})
.catch((e) => {
console.error(e);
process.exit(1);
});
}

View File

@@ -1,40 +1,40 @@
hak
===
# hak
This tool builds native dependencies for element-desktop. Here follows some very minimal
documentation for it.
Goals:
* Must build compiled native node modules in a shippable state
(ie. only dynamically linked against libraries that will be on the
target system, all unnecessary files removed).
* Must be able to build any native module, no matter what build system
it uses (electron-rebuild is supposed to do this job but only works
for modules that use gyp).
- Must build compiled native node modules in a shippable state
(ie. only dynamically linked against libraries that will be on the
target system, all unnecessary files removed).
- Must be able to build any native module, no matter what build system
it uses (electron-rebuild is supposed to do this job but only works
for modules that use gyp).
It's also loosely designed to be a general tool and agnostic to what it's
actually building. It's used here to build modules for the electron app
but should work equally well for building modules for normal node.
Running
=======
# Running
Hak is invoked with a command and a dependency, eg. `yarn run hak fetch matrix-seshat`.
If no dependencies are given, hak runs the command on all dependencies.
Files
=====
# Files
There are a lot of files involved:
* scripts/hak/... - The tool itself
* hak/[dependency] - Files provided by the app that tell hak how to build each of its native dependencies.
Contains a hak.json file and also some script files, each of which must be referenced in hak.json.
* .hak/ - Files generated by hak in the course of doing its job. Includes the dependency module itself and
any of the native dependency's native dependencies.
* .hak/[dependency]/build - An extracted copy of the dependency's node module used to build it.
* .hak/[dependency]/out - Another extracted copy of the dependency, this one contains only what will be shipped.
- scripts/hak/... - The tool itself
- hak/[dependency] - Files provided by the app that tell hak how to build each of its native dependencies.
Contains a hak.json file and also some script files, each of which must be referenced in hak.json.
- .hak/ - Files generated by hak in the course of doing its job. Includes the dependency module itself and
any of the native dependency's native dependencies.
- .hak/[dependency]/build - An extracted copy of the dependency's node module used to build it.
- .hak/[dependency]/out - Another extracted copy of the dependency, this one contains only what will be shipped.
# Workings
Workings
========
Hak works around native node modules that try to fetch or build their native component in
the npm 'install' phase - modules that do this will typically end up with native components
targeted to the build platform and the node that npm/yarn is using, which is no good for an
@@ -49,33 +49,33 @@ This also means that the dependencies cannot be listed in `dependencies` or
try to fetch their native parts. Instead, they are listed in `hakDependencies` which
hak reads to install them for you.
Hak will *not* install dependencies for the copy of the module it links into your
Hak will _not_ install dependencies for the copy of the module it links into your
project, so if your native module has javascript dependencies that are actually needed at
runtime (and not just to fetch / build the native parts), it won't work.
Hak will generate a `.yarnrc` in the project directory to set the link directory to its
own in the .hak directory (unless one already exists, in which case this is your problem).
Lifecycle
=========
Hak is divided into lifecycle stages, in order:
* fetch - Download and extract the source of the dependency
* link - Link the copy of the dependency into your node_modules directory
* fetchDeps - Fetch & extract any native dependencies required to build the module.
* build - The Good Stuff. Configure and build any native dependencies, then the module itself.
* copy - Copy the built artifact from the module build directory to the module output directory.
# Lifecycle
Hak is divided into lifecycle stages, in order:
- fetch - Download and extract the source of the dependency
- link - Link the copy of the dependency into your node_modules directory
- build - The Good Stuff. Configure and build any native dependencies, then the module itself.
- copy - Copy the built artifact from the module build directory to the module output directory.
# hak.json
hak.json
========
The scripts section contains scripts used for lifecycle stages that need them (fetch, fetchDeps, build).
It also contains 'prune' and 'copy' which are globs of files to delete from the output module directory
and copy over from the module build directory to the output module directory, respectively.
Shortcomings
============
# Shortcomings
Hak doesn't know about dependencies between lifecycle stages, ie. it doesn't know that you need to
'fetch' and 'fetchDeps' before you can 'build', etc. You get to run each individually, and remember
the right order.
There is also a *lot* of duplication in the command execution: we should abstract away
There is also a _lot_ of duplication in the command execution: we should abstract away
some of the boilerplate required to run commands & so forth.

View File

@@ -14,40 +14,14 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import path from 'path';
import rimraf from 'rimraf';
import path from "path";
import { rimraf } from "rimraf";
import { DependencyInfo } from './dep';
import HakEnv from './hakEnv';
import { DependencyInfo } from "./dep";
import HakEnv from "./hakEnv";
export default async function clean(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
await new Promise<void>((resolve, reject) => {
rimraf(moduleInfo.moduleDotHakDir, (err: Error) => {
if (err) {
reject(err);
} else {
resolve();
}
});
});
await new Promise<void>((resolve, reject) => {
rimraf(path.join(hakEnv.dotHakDir, 'links', moduleInfo.name), (err: Error) => {
if (err) {
reject(err);
} else {
resolve();
}
});
});
await new Promise<void>((resolve, reject) => {
rimraf(path.join(hakEnv.projectRoot, 'node_modules', moduleInfo.name), (err: Error) => {
if (err) {
reject(err);
} else {
resolve();
}
});
});
await rimraf(moduleInfo.moduleDotHakDir);
await rimraf(path.join(hakEnv.dotHakDir, "links", moduleInfo.name));
await rimraf(path.join(hakEnv.projectRoot, "node_modules", moduleInfo.name));
}

View File

@@ -14,15 +14,15 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import path from 'path';
import fsProm from 'fs/promises';
import childProcess from 'child_process';
import rimraf from 'rimraf';
import glob from 'glob';
import mkdirp from 'mkdirp';
import path from "path";
import fsProm from "fs/promises";
import childProcess from "child_process";
import { rimraf } from "rimraf";
import { glob } from "glob";
import { mkdirp } from "mkdirp";
import HakEnv from './hakEnv';
import { DependencyInfo } from './dep';
import HakEnv from "./hakEnv";
import { DependencyInfo } from "./dep";
export default async function copy(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
if (moduleInfo.cfg.prune) {
@@ -33,11 +33,7 @@ export default async function copy(hakEnv: HakEnv, moduleInfo: DependencyInfo):
try {
await mkdirp(moduleInfo.moduleOutDir);
process.chdir(moduleInfo.moduleOutDir);
await new Promise<void>((resolve, reject) => {
rimraf(moduleInfo.cfg.prune, {}, err => {
err ? reject(err) : resolve();
});
});
await rimraf(moduleInfo.cfg.prune);
} finally {
process.chdir(oldCwd);
}
@@ -47,47 +43,35 @@ export default async function copy(hakEnv: HakEnv, moduleInfo: DependencyInfo):
// If there are multiple moduleBuildDirs, singular moduleBuildDir
// is the same as moduleBuildDirs[0], so we're just listing the contents
// of the first one.
const files = await new Promise<string[]>((resolve, reject) => {
glob(moduleInfo.cfg.copy, {
nosort: true,
silent: true,
cwd: moduleInfo.moduleBuildDir,
}, (err, files) => {
err ? reject(err) : resolve(files);
});
const files = await glob(moduleInfo.cfg.copy, {
cwd: moduleInfo.moduleBuildDir,
});
if (moduleInfo.moduleBuildDirs.length > 1) {
if (!hakEnv.isMac()) {
console.error(
"You asked me to copy multiple targets but I've only been taught " +
"how to do that on macOS.",
"You asked me to copy multiple targets but I've only been taught " + "how to do that on macOS.",
);
throw new Error("Can't copy multiple targets on this platform");
}
for (const f of files) {
const components = moduleInfo.moduleBuildDirs.map(dir => path.join(dir, f));
const components = moduleInfo.moduleBuildDirs.map((dir) => path.join(dir, f));
const dst = path.join(moduleInfo.moduleOutDir, f);
await mkdirp(path.dirname(dst));
await new Promise<void>((resolve, reject) => {
childProcess.execFile('lipo',
['-create', '-output', dst, ...components], (err) => {
if (err) {
reject(err);
} else {
resolve();
}
},
);
childProcess.execFile("lipo", ["-create", "-output", dst, ...components], (err) => {
if (err) {
reject(err);
} else {
resolve();
}
});
});
}
} else {
console.log(
"Copying files from " +
moduleInfo.moduleBuildDir + " to " + moduleInfo.moduleOutDir,
);
console.log("Copying files from " + moduleInfo.moduleBuildDir + " to " + moduleInfo.moduleOutDir);
for (const f of files) {
console.log("\t" + f);
const src = path.join(moduleInfo.moduleBuildDir, f);

View File

@@ -28,5 +28,5 @@ export interface DependencyInfo {
moduleOutDir: string;
nodeModuleBinDir: string;
depPrefix: string;
scripts: Record<string, (hakEnv: HakEnv, moduleInfo: DependencyInfo) => Promise<void> >;
scripts: Record<string, (hakEnv: HakEnv, moduleInfo: DependencyInfo) => Promise<void>>;
}

View File

@@ -14,12 +14,12 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import fsProm from 'fs/promises';
import childProcess from 'child_process';
import pacote from 'pacote';
import fsProm from "fs/promises";
import childProcess from "child_process";
import pacote from "pacote";
import HakEnv from './hakEnv';
import { DependencyInfo } from './dep';
import HakEnv from "./hakEnv";
import { DependencyInfo } from "./dep";
export default async function fetch(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
let haveModuleBuildDir;
@@ -41,15 +41,11 @@ export default async function fetch(hakEnv: HakEnv, moduleInfo: DependencyInfo):
console.log("Running yarn install in " + moduleInfo.moduleBuildDir);
await new Promise<void>((resolve, reject) => {
const proc = childProcess.spawn(
hakEnv.isWin() ? 'yarn.cmd' : 'yarn',
['install', '--ignore-scripts'],
{
stdio: 'inherit',
cwd: moduleInfo.moduleBuildDir,
},
);
proc.on('exit', code => {
const proc = childProcess.spawn(hakEnv.isWin() ? "yarn.cmd" : "yarn", ["install", "--ignore-scripts"], {
stdio: "inherit",
cwd: moduleInfo.moduleBuildDir,
});
proc.on("exit", (code) => {
code ? reject(code) : resolve();
});
});

View File

@@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import mkdirp from 'mkdirp';
import { mkdirp } from "mkdirp";
import { DependencyInfo } from './dep';
import HakEnv from './hakEnv';
import { DependencyInfo } from "./dep";
import HakEnv from "./hakEnv";
export default async function fetchDeps(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
await mkdirp(moduleInfo.moduleDotHakDir);

View File

@@ -14,16 +14,16 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import path from 'path';
import os from 'os';
import path from "path";
import os from "os";
import nodePreGypVersioning from "node-pre-gyp/lib/util/versioning";
import { getElectronVersion } from "app-builder-lib/out/electron/electronVersion";
import { Arch, Target, TARGETS, getHost, isHostId, TargetId } from './target';
import { Arch, Target, TARGETS, getHost, isHostId, TargetId } from "./target";
async function getRuntime(projectRoot: string): Promise<string> {
const electronVersion = await getElectronVersion(projectRoot);
return electronVersion ? 'electron' : 'node-webkit';
return electronVersion ? "electron" : "node-webkit";
}
async function getRuntimeVersion(projectRoot: string): Promise<string> {
@@ -37,38 +37,32 @@ async function getRuntimeVersion(projectRoot: string): Promise<string> {
export default class HakEnv {
public readonly target: Target;
public runtime: string;
public runtimeVersion: string;
public runtime?: string;
public runtimeVersion?: string;
public dotHakDir: string;
constructor(public readonly projectRoot: string, targetId: TargetId | null) {
if (targetId) {
this.target = TARGETS[targetId];
} else {
this.target = getHost();
}
public constructor(public readonly projectRoot: string, targetId: TargetId | null) {
const target = targetId ? TARGETS[targetId] : getHost();
if (!this.target) {
if (!target) {
throw new Error(`Unknown target ${targetId}!`);
}
this.dotHakDir = path.join(this.projectRoot, '.hak');
this.target = target;
this.dotHakDir = path.join(this.projectRoot, ".hak");
}
public async init() {
public async init(): Promise<void> {
this.runtime = await getRuntime(this.projectRoot);
this.runtimeVersion = await getRuntimeVersion(this.projectRoot);
}
public getRuntimeAbi(): string {
return nodePreGypVersioning.get_runtime_abi(
this.runtime,
this.runtimeVersion,
);
return nodePreGypVersioning.get_runtime_abi(this.runtime!, this.runtimeVersion!);
}
// {node_abi}-{platform}-{arch}
public getNodeTriple(): string {
return this.getRuntimeAbi() + '-' + this.target.platform + '-' + this.target.arch;
return this.getRuntimeAbi() + "-" + this.target.platform + "-" + this.target.arch;
}
public getTargetId(): TargetId {
@@ -76,15 +70,19 @@ export default class HakEnv {
}
public isWin(): boolean {
return this.target.platform === 'win32';
return this.target.platform === "win32";
}
public isMac(): boolean {
return this.target.platform === 'darwin';
return this.target.platform === "darwin";
}
public isLinux(): boolean {
return this.target.platform === 'linux';
return this.target.platform === "linux";
}
public isFreeBSD(): boolean {
return this.target.platform === "freebsd";
}
public getTargetArch(): Arch {
@@ -95,11 +93,11 @@ export default class HakEnv {
return isHostId(this.target.id);
}
public makeGypEnv(): Record<string, string> {
public makeGypEnv(): Record<string, string | undefined> {
return Object.assign({}, process.env, {
npm_config_arch: this.target.arch,
npm_config_target_arch: this.target.arch,
npm_config_disturl: 'https://electronjs.org/headers',
npm_config_disturl: "https://electronjs.org/headers",
npm_config_runtime: this.runtime,
npm_config_target: this.runtimeVersion,
npm_config_build_from_source: true,
@@ -107,15 +105,7 @@ export default class HakEnv {
});
}
public getNodeModuleBin(name: string): string {
return path.join(this.projectRoot, 'node_modules', '.bin', name);
}
public wantsStaticSqlCipherUnix(): boolean {
return this.isMac() || process.env.SQLCIPHER_STATIC == '1';
}
public wantsStaticSqlCipher(): boolean {
return this.isWin() || this.wantsStaticSqlCipherUnix();
return !(this.isLinux() || this.isFreeBSD()) || process.env.SQLCIPHER_BUNDLED == "1";
}
}

View File

@@ -14,44 +14,29 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import path from 'path';
import findNpmPrefix from 'find-npm-prefix';
import path from "path";
import findNpmPrefix from "find-npm-prefix";
import HakEnv from './hakEnv';
import { TargetId } from './target';
import { DependencyInfo } from './dep';
import HakEnv from "./hakEnv";
import { TargetId } from "./target";
import { DependencyInfo } from "./dep";
const GENERALCOMMANDS = [
'target',
];
const GENERALCOMMANDS = ["target"];
// These can only be run on specific modules
const MODULECOMMANDS = [
'check',
'fetch',
'link',
'fetchDeps',
'build',
'copy',
'clean',
];
const MODULECOMMANDS = ["check", "fetch", "link", "build", "copy", "clean"];
// Shortcuts for multiple commands at once (useful for building universal binaries
// because you can run the fetch/fetchDeps/build for each arch and then copy/link once)
const METACOMMANDS = {
'fetchandbuild': ['check', 'fetch', 'fetchDeps', 'build'],
'copyandlink': ['copy', 'link'],
const METACOMMANDS: Record<string, string[]> = {
fetchandbuild: ["check", "fetch", "build"],
copyandlink: ["copy", "link"],
};
// Scripts valid in a hak.json 'scripts' section
const HAKSCRIPTS = [
'check',
'fetch',
'fetchDeps',
'build',
];
const HAKSCRIPTS = ["check", "fetch", "build"];
async function main() {
async function main(): Promise<void> {
const prefix = await findNpmPrefix(process.cwd());
let packageJson;
try {
@@ -65,11 +50,12 @@ async function main() {
// Apply `--target <target>` option if specified
// Can be specified multiple times for the copy command to bundle
// multiple archs into a single universal output module)
while (true) { // eslint-disable-line no-constant-condition
const targetIndex = process.argv.indexOf('--target');
for (;;) {
// eslint-disable-line no-constant-condition
const targetIndex = process.argv.indexOf("--target");
if (targetIndex === -1) break;
if ((targetIndex + 1) >= process.argv.length) {
if (targetIndex + 1 >= process.argv.length) {
console.error("--target option specified without a target");
process.exit(1);
}
@@ -77,7 +63,7 @@ async function main() {
targetIds.push(process.argv.splice(targetIndex, 2)[1] as TargetId);
}
const hakEnvs = targetIds.map(tid => new HakEnv(prefix, tid));
const hakEnvs = targetIds.map((tid) => new HakEnv(prefix, tid));
if (hakEnvs.length == 0) hakEnvs.push(new HakEnv(prefix, null));
for (const h of hakEnvs) {
await h.init();
@@ -89,7 +75,7 @@ async function main() {
const hakDepsCfg = packageJson.hakDependencies || {};
for (const dep of Object.keys(hakDepsCfg)) {
const hakJsonPath = path.join(prefix, 'hak', dep, 'hak.json');
const hakJsonPath = path.join(prefix, "hak", dep, "hak.json");
let hakJson: Record<string, any>;
try {
hakJson = await require(hakJsonPath);
@@ -102,20 +88,20 @@ async function main() {
name: dep,
version: hakDepsCfg[dep],
cfg: hakJson,
moduleHakDir: path.join(prefix, 'hak', dep),
moduleHakDir: path.join(prefix, "hak", dep),
moduleDotHakDir: path.join(hakEnv.dotHakDir, dep),
moduleTargetDotHakDir: path.join(hakEnv.dotHakDir, dep, hakEnv.getTargetId()),
moduleBuildDir: path.join(hakEnv.dotHakDir, dep, hakEnv.getTargetId(), 'build'),
moduleBuildDirs: hakEnvs.map(h => path.join(h.dotHakDir, dep, h.getTargetId(), 'build')),
moduleOutDir: path.join(hakEnv.dotHakDir, 'hakModules', dep),
nodeModuleBinDir: path.join(hakEnv.dotHakDir, dep, hakEnv.getTargetId(), 'build', 'node_modules', '.bin'),
depPrefix: path.join(hakEnv.dotHakDir, dep, hakEnv.getTargetId(), 'opt'),
moduleBuildDir: path.join(hakEnv.dotHakDir, dep, hakEnv.getTargetId(), "build"),
moduleBuildDirs: hakEnvs.map((h) => path.join(h.dotHakDir, dep, h.getTargetId(), "build")),
moduleOutDir: path.join(hakEnv.dotHakDir, "hakModules", dep),
nodeModuleBinDir: path.join(hakEnv.dotHakDir, dep, hakEnv.getTargetId(), "build", "node_modules", ".bin"),
depPrefix: path.join(hakEnv.dotHakDir, dep, hakEnv.getTargetId(), "opt"),
scripts: {},
};
for (const s of HAKSCRIPTS) {
if (hakJson.scripts && hakJson.scripts[s]) {
const scriptModule = await import(path.join(prefix, 'hak', dep, hakJson.scripts[s]));
const scriptModule = await import(path.join(prefix, "hak", dep, hakJson.scripts[s]));
if (scriptModule.__esModule) {
deps[dep].scripts[s] = scriptModule.default;
} else {
@@ -127,14 +113,14 @@ async function main() {
let cmds: string[];
if (process.argv.length < 3) {
cmds = ['check', 'fetch', 'fetchDeps', 'build', 'copy', 'link'];
cmds = ["check", "fetch", "build", "copy", "link"];
} else if (METACOMMANDS[process.argv[2]]) {
cmds = METACOMMANDS[process.argv[2]];
} else {
cmds = [process.argv[2]];
}
if (hakEnvs.length > 1 && cmds.some(c => !['copy', 'link'].includes(c))) {
if (hakEnvs.length > 1 && cmds.some((c) => !["copy", "link"].includes(c))) {
// We allow link here too for convenience because it's completely arch independent
console.error("Multiple targets only supported with the copy command");
return;
@@ -145,7 +131,7 @@ async function main() {
for (const cmd of cmds) {
if (GENERALCOMMANDS.includes(cmd)) {
if (cmd === 'target') {
if (cmd === "target") {
console.log(hakEnv.getNodeTriple());
}
return;
@@ -160,15 +146,12 @@ async function main() {
process.exit(1);
}
const cmdFunc = (await import('./' + cmd)).default;
const cmdFunc = (await import("./" + cmd)).default;
for (const mod of modules) {
const depInfo = deps[mod];
if (depInfo === undefined) {
console.log(
"Module " + mod + " not found - is it in hakDependencies " +
"in your package.json?",
);
console.log("Module " + mod + " not found - is it in hakDependencies " + "in your package.json?");
process.exit(1);
}
console.log("hak " + cmd + ": " + mod);
@@ -177,7 +160,7 @@ async function main() {
}
}
main().catch(err => {
main().catch((err) => {
console.error(err);
process.exit(1);
});

View File

@@ -14,16 +14,16 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import path from 'path';
import os from 'os';
import fsProm from 'fs/promises';
import childProcess from 'child_process';
import path from "path";
import os from "os";
import fsProm from "fs/promises";
import childProcess from "child_process";
import HakEnv from './hakEnv';
import { DependencyInfo } from './dep';
import HakEnv from "./hakEnv";
import { DependencyInfo } from "./dep";
export default async function link(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
const yarnrc = path.join(hakEnv.projectRoot, '.yarnrc');
const yarnrc = path.join(hakEnv.projectRoot, ".yarnrc");
// this is fairly terrible but it's reasonably clunky to either parse a yarnrc
// properly or get yarn to do it, so this will probably suffice for now.
// We just check to see if there is a local .yarnrc at all, and assume that
@@ -43,28 +43,28 @@ export default async function link(hakEnv: HakEnv, moduleInfo: DependencyInfo):
// (ie. Windows absolute paths) but strings in quotes get parsed as
// JSON so need to be valid JSON encoded strings (ie. have the
// backslashes escaped). JSON.stringify will add quotes and escape.
'--link-folder ' + JSON.stringify(path.join(hakEnv.dotHakDir, 'links')) + os.EOL,
"--link-folder " + JSON.stringify(path.join(hakEnv.dotHakDir, "links")) + os.EOL,
);
}
const yarnCmd = 'yarn' + (hakEnv.isWin() ? '.cmd' : '');
const yarnCmd = "yarn" + (hakEnv.isWin() ? ".cmd" : "");
await new Promise<void>((resolve, reject) => {
const proc = childProcess.spawn(yarnCmd, ['link'], {
const proc = childProcess.spawn(yarnCmd, ["link"], {
cwd: moduleInfo.moduleOutDir,
stdio: 'inherit',
stdio: "inherit",
});
proc.on('exit', code => {
proc.on("exit", (code) => {
code ? reject(code) : resolve();
});
});
await new Promise<void>((resolve, reject) => {
const proc = childProcess.spawn(yarnCmd, ['link', moduleInfo.name], {
const proc = childProcess.spawn(yarnCmd, ["link", moduleInfo.name], {
cwd: hakEnv.projectRoot,
stdio: 'inherit',
stdio: "inherit",
});
proc.on('exit', code => {
proc.on("exit", (code) => {
code ? reject(code) : resolve();
});
});

View File

@@ -20,29 +20,33 @@ import { GLIBC, MUSL, family as processLibC } from "detect-libc";
// details in a single string.
// See https://doc.rust-lang.org/rustc/platform-support.html.
export type TargetId =
'aarch64-apple-darwin' |
'x86_64-apple-darwin' |
'universal-apple-darwin' |
'i686-pc-windows-msvc' |
'x86_64-pc-windows-msvc' |
'i686-unknown-linux-musl' |
'i686-unknown-linux-gnu' |
'x86_64-unknown-linux-musl' |
'x86_64-unknown-linux-gnu' |
'aarch64-unknown-linux-musl' |
'aarch64-unknown-linux-gnu' |
'powerpc64le-unknown-linux-musl' |
'powerpc64le-unknown-linux-gnu';
| "aarch64-apple-darwin"
| "x86_64-apple-darwin"
| "universal-apple-darwin"
| "i686-pc-windows-msvc"
| "x86_64-pc-windows-msvc"
| "aarch64-pc-windows-msvc"
| "i686-unknown-freebsd"
| "x86_64-unknown-freebsd"
| "aarch64-unknown-freebsd"
| "i686-unknown-linux-musl"
| "i686-unknown-linux-gnu"
| "x86_64-unknown-linux-musl"
| "x86_64-unknown-linux-gnu"
| "aarch64-unknown-linux-musl"
| "aarch64-unknown-linux-gnu"
| "powerpc64le-unknown-linux-musl"
| "powerpc64le-unknown-linux-gnu";
// Values are expected to match those used in `process.platform`.
export type Platform = 'darwin' | 'linux' | 'win32';
export type Platform = "darwin" | "freebsd" | "linux" | "win32";
// Values are expected to match those used in `process.arch`.
export type Arch = 'arm64' | 'ia32' | 'x64' | 'ppc64' | 'universal';
export type Arch = "arm64" | "ia32" | "x64" | "ppc64" | "universal";
// Values are expected to match those used by Visual Studio's `vcvarsall.bat`.
// See https://docs.microsoft.com/cpp/build/building-on-the-command-line?view=msvc-160#vcvarsall-syntax
export type VcVarsArch = 'amd64' | 'arm64' | 'x86';
export type VcVarsArch = "amd64" | "arm64" | "x86";
export type Target = {
id: TargetId;
@@ -51,140 +55,165 @@ export type Target = {
};
export type WindowsTarget = Target & {
platform: 'win32';
platform: "win32";
vcVarsArch: VcVarsArch;
};
export type LinuxTarget = Target & {
platform: 'linux';
platform: "linux";
libC: typeof processLibC;
};
export type UniversalTarget = Target & {
arch: 'universal';
arch: "universal";
subtargets: Target[];
};
const aarch64AppleDarwin: Target = {
id: 'aarch64-apple-darwin',
platform: 'darwin',
arch: 'arm64',
id: "aarch64-apple-darwin",
platform: "darwin",
arch: "arm64",
};
const x8664AppleDarwin: Target = {
id: 'x86_64-apple-darwin',
platform: 'darwin',
arch: 'x64',
id: "x86_64-apple-darwin",
platform: "darwin",
arch: "x64",
};
const universalAppleDarwin: UniversalTarget = {
id: 'universal-apple-darwin',
platform: 'darwin',
arch: 'universal',
subtargets: [
aarch64AppleDarwin,
x8664AppleDarwin,
],
id: "universal-apple-darwin",
platform: "darwin",
arch: "universal",
subtargets: [aarch64AppleDarwin, x8664AppleDarwin],
};
const i686PcWindowsMsvc: WindowsTarget = {
id: 'i686-pc-windows-msvc',
platform: 'win32',
arch: 'ia32',
vcVarsArch: 'x86',
id: "i686-pc-windows-msvc",
platform: "win32",
arch: "ia32",
vcVarsArch: "x86",
};
const x8664PcWindowsMsvc: WindowsTarget = {
id: 'x86_64-pc-windows-msvc',
platform: 'win32',
arch: 'x64',
vcVarsArch: 'amd64',
id: "x86_64-pc-windows-msvc",
platform: "win32",
arch: "x64",
vcVarsArch: "amd64",
};
const aarch64WindowsMsvc: WindowsTarget = {
id: "aarch64-pc-windows-msvc",
platform: "win32",
arch: "arm64",
vcVarsArch: "arm64",
};
const i686UnknownFreebsd: Target = {
id: "i686-unknown-freebsd",
platform: "freebsd",
arch: "ia32",
};
const x8664UnknownFreebsd: Target = {
id: "x86_64-unknown-freebsd",
platform: "freebsd",
arch: "x64",
};
const aarch64UnknownFreebsd: Target = {
id: "aarch64-unknown-freebsd",
platform: "freebsd",
arch: "arm64",
};
const x8664UnknownLinuxGnu: LinuxTarget = {
id: 'x86_64-unknown-linux-gnu',
platform: 'linux',
arch: 'x64',
id: "x86_64-unknown-linux-gnu",
platform: "linux",
arch: "x64",
libC: GLIBC,
};
const x8664UnknownLinuxMusl: LinuxTarget = {
id: 'x86_64-unknown-linux-musl',
platform: 'linux',
arch: 'x64',
id: "x86_64-unknown-linux-musl",
platform: "linux",
arch: "x64",
libC: MUSL,
};
const i686UnknownLinuxGnu: LinuxTarget = {
id: 'i686-unknown-linux-gnu',
platform: 'linux',
arch: 'ia32',
id: "i686-unknown-linux-gnu",
platform: "linux",
arch: "ia32",
libC: GLIBC,
};
const i686UnknownLinuxMusl: LinuxTarget = {
id: 'i686-unknown-linux-musl',
platform: 'linux',
arch: 'ia32',
id: "i686-unknown-linux-musl",
platform: "linux",
arch: "ia32",
libC: MUSL,
};
const aarch64UnknownLinuxGnu: LinuxTarget = {
id: 'aarch64-unknown-linux-gnu',
platform: 'linux',
arch: 'arm64',
id: "aarch64-unknown-linux-gnu",
platform: "linux",
arch: "arm64",
libC: GLIBC,
};
const aarch64UnknownLinuxMusl: LinuxTarget = {
id: 'aarch64-unknown-linux-musl',
platform: 'linux',
arch: 'arm64',
id: "aarch64-unknown-linux-musl",
platform: "linux",
arch: "arm64",
libC: MUSL,
};
const powerpc64leUnknownLinuxGnu: LinuxTarget = {
id: 'powerpc64le-unknown-linux-gnu',
platform: 'linux',
arch: 'ppc64',
id: "powerpc64le-unknown-linux-gnu",
platform: "linux",
arch: "ppc64",
libC: GLIBC,
};
const powerpc64leUnknownLinuxMusl: LinuxTarget = {
id: 'powerpc64le-unknown-linux-musl',
platform: 'linux',
arch: 'ppc64',
id: "powerpc64le-unknown-linux-musl",
platform: "linux",
arch: "ppc64",
libC: MUSL,
};
export const TARGETS: Record<TargetId, Target> = {
// macOS
'aarch64-apple-darwin': aarch64AppleDarwin,
'x86_64-apple-darwin': x8664AppleDarwin,
'universal-apple-darwin': universalAppleDarwin,
"aarch64-apple-darwin": aarch64AppleDarwin,
"x86_64-apple-darwin": x8664AppleDarwin,
"universal-apple-darwin": universalAppleDarwin,
// Windows
'i686-pc-windows-msvc': i686PcWindowsMsvc,
'x86_64-pc-windows-msvc': x8664PcWindowsMsvc,
"i686-pc-windows-msvc": i686PcWindowsMsvc,
"x86_64-pc-windows-msvc": x8664PcWindowsMsvc,
"aarch64-pc-windows-msvc": aarch64WindowsMsvc,
// FreeBSD
"i686-unknown-freebsd": i686UnknownFreebsd,
"x86_64-unknown-freebsd": x8664UnknownFreebsd,
"aarch64-unknown-freebsd": aarch64UnknownFreebsd,
// Linux
'i686-unknown-linux-musl': i686UnknownLinuxMusl,
'i686-unknown-linux-gnu': i686UnknownLinuxGnu,
'x86_64-unknown-linux-musl': x8664UnknownLinuxMusl,
'x86_64-unknown-linux-gnu': x8664UnknownLinuxGnu,
'aarch64-unknown-linux-musl': aarch64UnknownLinuxMusl,
'aarch64-unknown-linux-gnu': aarch64UnknownLinuxGnu,
'powerpc64le-unknown-linux-musl': powerpc64leUnknownLinuxMusl,
'powerpc64le-unknown-linux-gnu': powerpc64leUnknownLinuxGnu,
"i686-unknown-linux-musl": i686UnknownLinuxMusl,
"i686-unknown-linux-gnu": i686UnknownLinuxGnu,
"x86_64-unknown-linux-musl": x8664UnknownLinuxMusl,
"x86_64-unknown-linux-gnu": x8664UnknownLinuxGnu,
"aarch64-unknown-linux-musl": aarch64UnknownLinuxMusl,
"aarch64-unknown-linux-gnu": aarch64UnknownLinuxGnu,
"powerpc64le-unknown-linux-musl": powerpc64leUnknownLinuxMusl,
"powerpc64le-unknown-linux-gnu": powerpc64leUnknownLinuxGnu,
};
export function getHost(): Target | undefined {
return Object.values(TARGETS).find(target => (
target.platform === process.platform &&
target.arch === process.arch &&
(
process.platform !== 'linux' ||
(target as LinuxTarget).libC === processLibC
)
));
return Object.values(TARGETS).find(
(target) =>
target.platform === process.platform &&
target.arch === process.arch &&
(process.platform !== "linux" || (target as LinuxTarget).libC === processLibC),
);
}
export function isHostId(id: TargetId): boolean {

View File

@@ -1,18 +0,0 @@
{
"compilerOptions": {
"moduleResolution": "node",
"esModuleInterop": true,
"target": "es2017",
"module": "commonjs",
"sourceMap": false,
"lib": [
"es2019",
]
},
"include": [
"./**/*.ts"
],
"ts-node": {
"transpileOnly": true
}
}

View File

@@ -1,32 +0,0 @@
#!/bin/sh
# Take the deb and bundle it into a apt repository
if [[ $# -lt 1 ]]
then
echo "Usage $0 <config dir>"
exit
fi
confdir=$1
set -ex
ver=`jq -r .version package.json`
distdir=$PWD/dist
confdir=$PWD/$confdir
repodir=`mktemp -d -t repo`
mkdir $repodir/conf
cp $confdir/conf_distributions $repodir/conf/distributions
pushd $repodir
for i in `cat conf/distributions | grep Codename | cut -d ' ' -f 2`
do
reprepro includedeb $i $distdir/element-desktop_${ver}_amd64.deb
done
tar cvzf $distdir/element-desktop_repo_$ver.tar.gz .
popd
rm -r $repodir

View File

@@ -1,55 +0,0 @@
#!/usr/bin/env node
/*
* Checks for the presence of a webapp, inspects its version and sets the
* version metadata of the package to match.
*/
const fs = require('fs').promises;
const asar = require('asar');
const childProcess = require('child_process');
async function versionFromAsar() {
try {
await fs.stat('webapp.asar');
} catch (e) {
console.log("No 'webapp.asar' found. Run 'yarn run fetch'");
return 1;
}
return asar.extractFile('webapp.asar', 'version').toString().trim();
}
async function setPackageVersion(ver) {
// set version in package.json: electron-builder will use this to populate
// all the various version fields
await new Promise((resolve, reject) => {
childProcess.execFile(process.platform === 'win32' ? 'yarn.cmd' : 'yarn', [
'version',
'-s',
'--no-git-tag-version', // This also means "don't commit to git" as it turns out
'--new-version',
ver,
], (err) => {
if (err) {
reject(err);
} else {
resolve();
}
});
});
}
async function main(args) {
let version = args[0];
if (version === undefined) version = await versionFromAsar();
await setPackageVersion(version);
}
if (require.main === module) {
main(process.argv.slice(2)).then((ret) => process.exit(ret));
}
module.exports = { versionFromAsar, setPackageVersion };

64
scripts/set-version.ts Executable file
View File

@@ -0,0 +1,64 @@
#!/usr/bin/env -S npx ts-node
/*
* Checks for the presence of a webapp, inspects its version and sets the
* version metadata of the package to match.
*/
import { promises as fs } from "fs";
import * as asar from "@electron/asar";
import * as childProcess from "child_process";
export async function versionFromAsar(): Promise<string> {
try {
await fs.stat("webapp.asar");
} catch (e) {
throw new Error("No 'webapp.asar' found. Run 'yarn run fetch'");
}
return asar.extractFile("webapp.asar", "version").toString().trim();
}
export async function setPackageVersion(ver: string): Promise<void> {
// set version in package.json: electron-builder will use this to populate
// all the various version fields
await new Promise<void>((resolve, reject) => {
childProcess.execFile(
process.platform === "win32" ? "yarn.cmd" : "yarn",
[
"version",
"-s",
"--no-git-tag-version", // This also means "don't commit to git" as it turns out
"--new-version",
ver,
],
(err) => {
if (err) {
reject(err);
} else {
resolve();
}
},
);
});
}
async function main(args: string[]): Promise<number> {
let version = args[0];
if (version === undefined) version = await versionFromAsar();
await setPackageVersion(version);
return 0;
}
if (require.main === module) {
main(process.argv.slice(2))
.then((ret) => {
process.exit(ret);
})
.catch((e) => {
console.error(e);
process.exit(1);
});
}

16
scripts/tsconfig.json Normal file
View File

@@ -0,0 +1,16 @@
{
"compilerOptions": {
"resolveJsonModule": true,
"moduleResolution": "node",
"esModuleInterop": true,
"target": "es2017",
"module": "commonjs",
"sourceMap": false,
"strict": true,
"lib": ["es2020", "dom"]
},
"include": ["../src/@types", "./**/*.ts"],
"ts-node": {
"transpileOnly": true
}
}

6
src/@types/glob.d.ts vendored Normal file
View File

@@ -0,0 +1,6 @@
import { GlobOptions } from "glob";
declare module "glob" {
// Workaround for @electron/asar importing IOptions instead of GlobOptions
export type IOptions = GlobOptions;
}

View File

@@ -20,27 +20,26 @@ import AutoLaunch from "auto-launch";
import { AppLocalization } from "../language-helper";
// global type extensions need to use var for whatever reason
/* eslint-disable no-var */
declare global {
namespace NodeJS {
interface Global {
mainWindow: BrowserWindow;
appQuitting: boolean;
appLocalization: AppLocalization;
launcher: AutoLaunch;
vectorConfig: Record<string, any>;
trayConfig: {
// eslint-disable-next-line camelcase
icon_path: string;
brand: string;
};
store: Store<{
warnBeforeExit?: boolean;
minimizeToTray?: boolean;
spellCheckerEnabled?: boolean;
autoHideMenuBar?: boolean;
locale?: string | string[];
disableHardwareAcceleration?: boolean;
}>;
}
}
var mainWindow: BrowserWindow | null;
var appQuitting: boolean;
var appLocalization: AppLocalization;
var launcher: AutoLaunch;
var vectorConfig: Record<string, any>;
var trayConfig: {
// eslint-disable-next-line camelcase
icon_path: string;
brand: string;
};
var store: Store<{
warnBeforeExit?: boolean;
minimizeToTray?: boolean;
spellCheckerEnabled?: boolean;
autoHideMenuBar?: boolean;
locale?: string | string[];
disableHardwareAcceleration?: boolean;
}>;
}
/* eslint-enable no-var */

View File

@@ -50,5 +50,5 @@ declare module "keytar" {
*
* @returns A promise for the array of found credentials.
*/
export function findCredentials(service: string): Promise<Array<{ account: string, password: string}>>;
export function findCredentials(service: string): Promise<Array<{ account: string; password: string }>>;
}

View File

@@ -86,7 +86,7 @@ declare module "matrix-seshat" {
}
export class Seshat {
constructor(path: string, config?: IConfig);
public constructor(path: string, config?: IConfig);
public addEvent(matrixEvent: IMatrixEvent, profile?: IMatrixProfile): void;
public deleteEvent(eventId: string): Promise<boolean>;
public commit(force?: boolean): Promise<number>;
@@ -132,7 +132,7 @@ declare module "matrix-seshat" {
}
export class SeshatRecovery {
constructor(path: string, config?: IConfig);
public constructor(path: string, config?: IConfig);
public info(): IRecoveryInfo;
public getUserVersion(): Promise<number>;
public shutdown(): Promise<void>;
@@ -140,6 +140,6 @@ declare module "matrix-seshat" {
}
export class ReindexError extends Error {
constructor(message?: string);
public constructor(message?: string);
}
}

View File

@@ -0,0 +1,29 @@
/*
Copyright 2023 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { Streams } from "electron";
type DisplayMediaCallback = (streams: Streams) => void;
let displayMediaCallback: DisplayMediaCallback | null;
export const getDisplayMediaCallback = (): DisplayMediaCallback | null => {
return displayMediaCallback;
};
export const setDisplayMediaCallback = (callback: DisplayMediaCallback | null): void => {
displayMediaCallback = callback;
};

View File

@@ -19,18 +19,12 @@ limitations under the License.
// Squirrel on windows starts the app with various flags as hooks to tell us when we've been installed/uninstalled etc.
import "./squirrelhooks";
import {
app,
BrowserWindow,
Menu,
autoUpdater,
protocol,
dialog,
} from "electron";
import { app, BrowserWindow, Menu, autoUpdater, protocol, dialog, Input, Event, session } from "electron";
import * as Sentry from "@sentry/electron/main";
import AutoLaunch from "auto-launch";
import path from "path";
import windowStateKeeper from 'electron-window-state';
import Store from 'electron-store';
import windowStateKeeper from "electron-window-state";
import Store from "electron-store";
import fs, { promises as afs } from "fs";
import { URL } from "url";
import minimist from "minimist";
@@ -40,23 +34,18 @@ import "./keytar";
import "./seshat";
import "./settings";
import * as tray from "./tray";
import { buildMenuTemplate } from './vectormenu';
import webContentsHandler from './webcontents-handler';
import * as updater from './updater';
import { getProfileFromDeeplink, protocolInit } from './protocol';
import { _t, AppLocalization } from './language-helper';
import Input = Electron.Input;
import { buildMenuTemplate } from "./vectormenu";
import webContentsHandler from "./webcontents-handler";
import * as updater from "./updater";
import { getProfileFromDeeplink, protocolInit } from "./protocol";
import { _t, AppLocalization } from "./language-helper";
import { setDisplayMediaCallback } from "./displayMediaCallback";
import { setupMacosTitleBar } from "./macos-titlebar";
const argv = minimist(process.argv, {
alias: { help: "h" },
});
// Things we need throughout the file but need to be created
// async to are initialised in setupGlobals()
let asarPath: string;
let resPath: string;
let iconPath: string;
if (argv["help"]) {
console.log("Options:");
console.log(" --profile-dir {path}: Path to where to store the profile.");
@@ -65,8 +54,7 @@ if (argv["help"]) {
console.log(" --no-update: Disable automatic updating.");
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/command-line-switches");
console.log("And more such as --proxy, see:" + "https://electronjs.org/docs/api/command-line-switches");
app.exit();
}
@@ -74,7 +62,7 @@ if (argv["help"]) {
// as soon as the app path is set, so pick a random path in it that must exist if it's a
// real user data directory.
function isRealUserDataDir(d: string): boolean {
return fs.existsSync(path.join(d, 'IndexedDB'));
return fs.existsSync(path.join(d, "IndexedDB"));
}
// check if we are passed a profile in the SSO callback url
@@ -83,22 +71,22 @@ let userDataPath: string;
const userDataPathInProtocol = getProfileFromDeeplink(argv["_"]);
if (userDataPathInProtocol) {
userDataPath = userDataPathInProtocol;
} else if (argv['profile-dir']) {
userDataPath = argv['profile-dir'];
} else if (argv["profile-dir"]) {
userDataPath = argv["profile-dir"];
} else {
let newUserDataPath = app.getPath('userData');
if (argv['profile']) {
newUserDataPath += '-' + argv['profile'];
let newUserDataPath = app.getPath("userData");
if (argv["profile"]) {
newUserDataPath += "-" + argv["profile"];
}
const newUserDataPathExists = isRealUserDataDir(newUserDataPath);
let oldUserDataPath = path.join(app.getPath('appData'), app.getName().replace('Element', 'Riot'));
if (argv['profile']) {
oldUserDataPath += '-' + argv['profile'];
let oldUserDataPath = path.join(app.getPath("appData"), app.getName().replace("Element", "Riot"));
if (argv["profile"]) {
oldUserDataPath += "-" + argv["profile"];
}
const oldUserDataPathExists = isRealUserDataDir(oldUserDataPath);
console.log(newUserDataPath + " exists: " + (newUserDataPathExists ? 'yes' : 'no'));
console.log(oldUserDataPath + " exists: " + (oldUserDataPathExists ? 'yes' : 'no'));
console.log(newUserDataPath + " exists: " + (newUserDataPathExists ? "yes" : "no"));
console.log(oldUserDataPath + " exists: " + (oldUserDataPathExists ? "yes" : "no"));
if (!newUserDataPathExists && oldUserDataPathExists) {
console.log("Using legacy user data path: " + oldUserDataPath);
userDataPath = oldUserDataPath;
@@ -106,52 +94,57 @@ if (userDataPathInProtocol) {
userDataPath = newUserDataPath;
}
}
app.setPath('userData', userDataPath);
app.setPath("userData", userDataPath);
async function tryPaths(name: string, root: string, rawPaths: string[]): Promise<string> {
// Make everything relative to root
const paths = rawPaths.map(p => path.join(root, p));
const paths = rawPaths.map((p) => path.join(root, p));
for (const p of paths) {
try {
await afs.stat(p);
return p + '/';
} catch (e) {
}
return p + "/";
} catch (e) {}
}
console.log(`Couldn't find ${name} files in any of: `);
for (const p of paths) {
console.log("\t"+path.resolve(p));
console.log("\t" + path.resolve(p));
}
throw new Error(`Failed to find ${name} files`);
}
// Find the webapp resources and set up things that require them
async function setupGlobals(): Promise<void> {
// find the webapp asar.
asarPath = await tryPaths("webapp", __dirname, [
// If run from the source checkout, this will be in the directory above
'../webapp.asar',
// but if run from a packaged application, electron-main.js will be in
// a different asar file so it will be two levels above
'../../webapp.asar',
// also try without the 'asar' suffix to allow symlinking in a directory
'../webapp',
// from a packaged application
'../../webapp',
]);
const homeserverProps = ["default_is_url", "default_hs_url", "default_server_name", "default_server_config"] as const;
// we assume the resources path is in the same place as the asar
resPath = await tryPaths("res", path.dirname(asarPath), [
// If run from the source checkout
'res',
// if run from packaged application
'',
]);
let asarPathPromise: Promise<string> | undefined;
// Get the webapp resource file path, memoizes result
function getAsarPath(): Promise<string> {
if (!asarPathPromise) {
asarPathPromise = tryPaths("webapp", __dirname, [
// If run from the source checkout, this will be in the directory above
"../webapp.asar",
// but if run from a packaged application, electron-main.js will be in
// a different asar file, so it will be two levels above
"../../webapp.asar",
// also try without the 'asar' suffix to allow symlinking in a directory
"../webapp",
// from a packaged application
"../../webapp",
]);
}
return asarPathPromise;
}
// Loads the config from asar, and applies a config.json from userData atop if one exists
// Writes config to `global.vectorConfig`. Does nothing if `global.vectorConfig` is already set.
async function loadConfig(): Promise<void> {
if (global.vectorConfig) return;
const asarPath = await getAsarPath();
try {
// eslint-disable-next-line @typescript-eslint/no-var-requires
global.vectorConfig = require(asarPath + 'config.json');
global.vectorConfig = require(asarPath + "config.json");
} catch (e) {
// it would be nice to check the error code here and bail if the config
// is unparsable, but we get MODULE_NOT_FOUND in the case of a missing
@@ -163,17 +156,19 @@ async function setupGlobals(): Promise<void> {
try {
// Load local config and use it to override values from the one baked with the build
// eslint-disable-next-line @typescript-eslint/no-var-requires
const localConfig = require(path.join(app.getPath('userData'), 'config.json'));
const localConfig = require(path.join(app.getPath("userData"), "config.json"));
// If the local config has a homeserver defined, don't use the homeserver from the build
// config. This is to avoid a problem where Riot thinks there are multiple homeservers
// defined, and panics as a result.
const homeserverProps = ['default_is_url', 'default_hs_url', 'default_server_name', 'default_server_config'];
if (Object.keys(localConfig).find(k => homeserverProps.includes(k))) {
if (Object.keys(localConfig).find((k) => homeserverProps.includes(<any>k))) {
// Rip out all the homeserver options from the vector config
global.vectorConfig = Object.keys(global.vectorConfig)
.filter(k => !homeserverProps.includes(k))
.reduce((obj, key) => {obj[key] = global.vectorConfig[key]; return obj;}, {});
.filter((k) => !homeserverProps.includes(<any>k))
.reduce((obj, key) => {
obj[key] = global.vectorConfig[key];
return obj;
}, {} as Omit<Partial<(typeof global)["vectorConfig"]>, keyof typeof homeserverProps>);
}
global.vectorConfig = Object.assign(global.vectorConfig, localConfig);
@@ -181,28 +176,57 @@ async function setupGlobals(): Promise<void> {
if (e instanceof SyntaxError) {
dialog.showMessageBox({
type: "error",
title: `Your ${global.vectorConfig.brand || 'Element'} is misconfigured`,
message: `Your custom ${global.vectorConfig.brand || 'Element'} configuration contains invalid JSON. ` +
`Please correct the problem and reopen ${global.vectorConfig.brand || 'Element'}.`,
title: `Your ${global.vectorConfig.brand || "Element"} is misconfigured`,
message:
`Your custom ${global.vectorConfig.brand || "Element"} configuration contains invalid JSON. ` +
`Please correct the problem and reopen ${global.vectorConfig.brand || "Element"}.`,
detail: e.message || "",
});
}
// Could not load local config, this is expected in most cases.
}
}
// Configure Electron Sentry and crashReporter using sentry.dsn in config.json if one is present.
async function configureSentry(): Promise<void> {
await loadConfig();
const { dsn, environment } = global.vectorConfig.sentry || {};
if (dsn) {
console.log(`Enabling Sentry with dsn=${dsn} environment=${environment}`);
Sentry.init({
dsn,
environment,
// We don't actually use this IPC, but we do not want Sentry injecting preloads
ipcMode: Sentry.IPCMode.Classic,
});
}
}
// Set up globals for Tray and AutoLaunch
async function setupGlobals(): Promise<void> {
const asarPath = await getAsarPath();
await loadConfig();
// we assume the resources path is in the same place as the asar
const resPath = await tryPaths("res", path.dirname(asarPath), [
// If run from the source checkout
"res",
// if run from packaged application
"",
]);
// The tray icon
// It's important to call `path.join` so we don't end up with the packaged asar in the final path.
const iconFile = `element.${process.platform === 'win32' ? 'ico' : 'png'}`;
iconPath = path.join(resPath, "img", iconFile);
const iconFile = `element.${process.platform === "win32" ? "ico" : "png"}`;
global.trayConfig = {
icon_path: iconPath,
brand: global.vectorConfig.brand || 'Element',
icon_path: path.join(resPath, "img", iconFile),
brand: global.vectorConfig.brand || "Element",
};
// launcher
global.launcher = new AutoLaunch({
name: global.vectorConfig.brand || 'Element',
name: global.vectorConfig.brand || "Element",
isHidden: true,
mac: {
useLaunchAgent: true,
@@ -210,12 +234,12 @@ async function setupGlobals(): Promise<void> {
});
}
// Look for an auto-launcher under 'Riot' and if we find one,
// port its enabled/disabled-ness over to the new 'Element' launcher
async function moveAutoLauncher(): Promise<void> {
// Look for an auto-launcher under 'Riot' and if we find one, port it's
// enabled/disabled-ness over to the new 'Element' launcher
if (!global.vectorConfig.brand || global.vectorConfig.brand === 'Element') {
if (!global.vectorConfig.brand || global.vectorConfig.brand === "Element") {
const oldLauncher = new AutoLaunch({
name: 'Riot',
name: "Riot",
isHidden: true,
mac: {
useLaunchAgent: true,
@@ -234,24 +258,31 @@ global.store = new Store({ name: "electron-config" });
global.appQuitting = false;
const exitShortcuts: Array<(input: Input, platform: string) => boolean> = [
(input, platform) => platform !== 'darwin' && input.alt && input.key.toUpperCase() === 'F4',
(input, platform) => platform !== 'darwin' && input.control && input.key.toUpperCase() === 'Q',
(input, platform) => platform === 'darwin' && input.meta && input.key.toUpperCase() === 'Q',
(input, platform): boolean => platform !== "darwin" && input.alt && input.key.toUpperCase() === "F4",
(input, platform): boolean => platform !== "darwin" && input.control && input.key.toUpperCase() === "Q",
(input, platform): boolean =>
platform === "darwin" && input.meta && !input.control && input.key.toUpperCase() === "Q",
];
const warnBeforeExit = (event: Event, input: Input): void => {
const shouldWarnBeforeExit = global.store.get('warnBeforeExit', true);
const shouldWarnBeforeExit = global.store.get("warnBeforeExit", true);
const exitShortcutPressed =
input.type === 'keyDown' && exitShortcuts.some(shortcutFn => shortcutFn(input, process.platform));
input.type === "keyDown" && exitShortcuts.some((shortcutFn) => shortcutFn(input, process.platform));
if (shouldWarnBeforeExit && exitShortcutPressed) {
const shouldCancelCloseRequest = dialog.showMessageBoxSync(global.mainWindow, {
type: "question",
buttons: [_t("Cancel"), _t("Close Element")],
message: _t("Are you sure you want to quit?"),
defaultId: 1,
cancelId: 0,
}) === 0;
if (shouldWarnBeforeExit && exitShortcutPressed && global.mainWindow) {
const shouldCancelCloseRequest =
dialog.showMessageBoxSync(global.mainWindow, {
type: "question",
buttons: [
_t("action|cancel"),
_t("action|close_brand", {
brand: global.vectorConfig.brand || "Element",
}),
],
message: _t("confirm_quit"),
defaultId: 1,
cancelId: 0,
}) === 0;
if (shouldCancelCloseRequest) {
event.preventDefault();
@@ -259,24 +290,26 @@ const warnBeforeExit = (event: Event, input: Input): void => {
}
};
configureSentry();
// handle uncaught errors otherwise it displays
// stack traces in popup dialogs, which is terrible (which
// it will do any time the auto update poke fails, and there's
// no other way to catch this error).
// Assuming we generally run from the console when developing,
// this is far preferable.
process.on('uncaughtException', function(error: Error): void {
console.log('Unhandled exception', error);
process.on("uncaughtException", function (error: Error): void {
console.log("Unhandled exception", error);
});
app.commandLine.appendSwitch('--enable-usermedia-screen-capturing');
if (!app.commandLine.hasSwitch('enable-features')) {
app.commandLine.appendSwitch('enable-features', 'WebRTCPipeWireCapturer');
app.commandLine.appendSwitch("--enable-usermedia-screen-capturing");
if (!app.commandLine.hasSwitch("enable-features")) {
app.commandLine.appendSwitch("enable-features", "WebRTCPipeWireCapturer");
}
const gotLock = app.requestSingleInstanceLock();
if (!gotLock) {
console.log('Other instance detected: exiting');
console.log("Other instance detected: exiting");
app.exit();
}
@@ -288,14 +321,16 @@ protocolInit();
// work.
// Also mark it as secure (ie. accessing resources from this
// protocol and HTTPS won't trigger mixed content warnings).
protocol.registerSchemesAsPrivileged([{
scheme: 'vector',
privileges: {
standard: true,
secure: true,
supportFetchAPI: true,
protocol.registerSchemesAsPrivileged([
{
scheme: "vector",
privileges: {
standard: true,
secure: true,
supportFetchAPI: true,
},
},
}]);
]);
// 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.
@@ -309,16 +344,19 @@ protocol.registerSchemesAsPrivileged([{
app.enableSandbox();
// We disable media controls here. We do this because calls use audio and video elements and they sometimes capture the media keys. See https://github.com/vector-im/element-web/issues/15704
app.commandLine.appendSwitch('disable-features', 'HardwareMediaKeyHandling,MediaSessionService');
app.commandLine.appendSwitch("disable-features", "HardwareMediaKeyHandling,MediaSessionService");
// Disable hardware acceleration if the setting has been set.
if (global.store.get('disableHardwareAcceleration', false) === true) {
if (global.store.get("disableHardwareAcceleration", false) === true) {
console.log("Disabling hardware acceleration.");
app.disableHardwareAcceleration();
}
app.on('ready', async () => {
app.on("ready", async () => {
let asarPath: string;
try {
asarPath = await getAsarPath();
await setupGlobals();
await moveAutoLauncher();
} catch (e) {
@@ -331,51 +369,51 @@ app.on('ready', async () => {
return;
}
if (argv['devtools']) {
if (argv["devtools"]) {
try {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { default: installExt, REACT_DEVELOPER_TOOLS, REACT_PERF } = require('electron-devtools-installer');
const { default: installExt, REACT_DEVELOPER_TOOLS, REACT_PERF } = require("electron-devtools-installer");
installExt(REACT_DEVELOPER_TOOLS)
.then((name) => console.log(`Added Extension: ${name}`))
.catch((err) => console.log('An error occurred: ', err));
.then((name: string) => console.log(`Added Extension: ${name}`))
.catch((err: unknown) => console.log("An error occurred: ", err));
installExt(REACT_PERF)
.then((name) => console.log(`Added Extension: ${name}`))
.catch((err) => console.log('An error occurred: ', err));
.then((name: string) => console.log(`Added Extension: ${name}`))
.catch((err: unknown) => console.log("An error occurred: ", err));
} catch (e) {
console.log(e);
}
}
protocol.registerFileProtocol('vector', (request, callback) => {
if (request.method !== 'GET') {
protocol.registerFileProtocol("vector", (request, callback) => {
if (request.method !== "GET") {
callback({ error: -322 }); // METHOD_NOT_SUPPORTED from chromium/src/net/base/net_error_list.h
return null;
}
const parsedUrl = new URL(request.url);
if (parsedUrl.protocol !== 'vector:') {
if (parsedUrl.protocol !== "vector:") {
callback({ error: -302 }); // UNKNOWN_URL_SCHEME
return;
}
if (parsedUrl.host !== 'vector') {
if (parsedUrl.host !== "vector") {
callback({ error: -105 }); // NAME_NOT_RESOLVED
return;
}
const target = parsedUrl.pathname.split('/');
const target = parsedUrl.pathname.split("/");
// path starts with a '/'
if (target[0] !== '') {
if (target[0] !== "") {
callback({ error: -6 }); // FILE_NOT_FOUND
return;
}
if (target[target.length - 1] == '') {
target[target.length - 1] = 'index.html';
if (target[target.length - 1] == "") {
target[target.length - 1] = "index.html";
}
let baseDir: string;
if (target[1] === 'webapp') {
if (target[1] === "webapp") {
baseDir = asarPath;
} else {
callback({ error: -6 }); // FILE_NOT_FOUND
@@ -387,7 +425,7 @@ app.on('ready', async () => {
baseDir = path.normalize(baseDir);
const relTarget = path.normalize(path.join(...target.slice(2)));
if (relTarget.startsWith('..')) {
if (relTarget.startsWith("..")) {
callback({ error: -6 }); // FILE_NOT_FOUND
return;
}
@@ -398,13 +436,13 @@ app.on('ready', async () => {
});
});
if (argv['no-update']) {
if (argv["no-update"]) {
console.log('Auto update disabled via command line flag "--no-update"');
} else if (global.vectorConfig['update_base_url']) {
console.log(`Starting auto update with base URL: ${global.vectorConfig['update_base_url']}`);
updater.start(global.vectorConfig['update_base_url']);
} else if (global.vectorConfig["update_base_url"]) {
console.log(`Starting auto update with base URL: ${global.vectorConfig["update_base_url"]}`);
updater.start(global.vectorConfig["update_base_url"]);
} else {
console.log('No update_base_url is defined: auto update is disabled');
console.log("No update_base_url is defined: auto update is disabled");
}
// Load the previous window state with fallback to defaults
@@ -416,11 +454,14 @@ app.on('ready', async () => {
const preloadScript = path.normalize(`${__dirname}/preload.js`);
global.mainWindow = new BrowserWindow({
// https://www.electronjs.org/docs/faq#the-font-looks-blurry-what-is-this-and-what-can-i-do
backgroundColor: '#fff',
backgroundColor: "#fff",
icon: iconPath,
titleBarStyle: process.platform === "darwin" ? "hidden" : "default",
trafficLightPosition: { x: 9, y: 8 },
icon: global.trayConfig.icon_path,
show: false,
autoHideMenuBar: global.store.get('autoHideMenuBar', true),
autoHideMenuBar: global.store.get("autoHideMenuBar", true),
x: mainWindowState.x,
y: mainWindowState.y,
@@ -434,19 +475,24 @@ app.on('ready', async () => {
webgl: true,
},
});
global.mainWindow.loadURL('vector://vector/webapp/');
global.mainWindow.loadURL("vector://vector/webapp/");
if (process.platform === "darwin") {
setupMacosTitleBar(global.mainWindow);
}
// Handle spellchecker
// For some reason spellCheckerEnabled isn't persisted, so we have to use the store here
global.mainWindow.webContents.session.setSpellCheckerEnabled(global.store.get("spellCheckerEnabled", true));
// Create trayIcon icon
if (global.store.get('minimizeToTray', true)) tray.create(global.trayConfig);
if (global.store.get("minimizeToTray", true)) tray.create(global.trayConfig);
global.mainWindow.once('ready-to-show', () => {
global.mainWindow.once("ready-to-show", () => {
if (!global.mainWindow) return;
mainWindowState.manage(global.mainWindow);
if (!argv['hidden']) {
if (!argv["hidden"]) {
global.mainWindow.show();
} else {
// hide here explicitly because window manage above sometimes shows it
@@ -454,37 +500,37 @@ app.on('ready', async () => {
}
});
global.mainWindow.webContents.on('before-input-event', warnBeforeExit);
global.mainWindow.webContents.on("before-input-event", warnBeforeExit);
global.mainWindow.on('closed', () => {
global.mainWindow.on("closed", () => {
global.mainWindow = null;
});
global.mainWindow.on('close', async (e) => {
global.mainWindow.on("close", async (e) => {
// If we are not quitting and have a tray icon then minimize to tray
if (!global.appQuitting && (tray.hasTray() || process.platform === 'darwin')) {
if (!global.appQuitting && (tray.hasTray() || process.platform === "darwin")) {
// On Mac, closing the window just hides it
// (this is generally how single-window Mac apps
// behave, eg. Mail.app)
e.preventDefault();
if (global.mainWindow.isFullScreen()) {
global.mainWindow.once('leave-full-screen', () => global.mainWindow.hide());
if (global.mainWindow?.isFullScreen()) {
global.mainWindow.once("leave-full-screen", () => global.mainWindow?.hide());
global.mainWindow.setFullScreen(false);
} else {
global.mainWindow.hide();
global.mainWindow?.hide();
}
return false;
}
});
if (process.platform === 'win32') {
if (process.platform === "win32") {
// Handle forward/backward mouse buttons in Windows
global.mainWindow.on('app-command', (e, cmd) => {
if (cmd === 'browser-backward' && global.mainWindow.webContents.canGoBack()) {
global.mainWindow.on("app-command", (e, cmd) => {
if (cmd === "browser-backward" && global.mainWindow?.webContents.canGoBack()) {
global.mainWindow.webContents.goBack();
} else if (cmd === 'browser-forward' && global.mainWindow.webContents.canGoForward()) {
} else if (cmd === "browser-forward" && global.mainWindow?.webContents.canGoForward()) {
global.mainWindow.webContents.goForward();
}
});
@@ -494,32 +540,34 @@ app.on('ready', async () => {
global.appLocalization = new AppLocalization({
store: global.store,
components: [
() => tray.initApplicationMenu(),
() => Menu.setApplicationMenu(buildMenuTemplate()),
],
components: [(): void => tray.initApplicationMenu(), (): void => Menu.setApplicationMenu(buildMenuTemplate())],
});
session.defaultSession.setDisplayMediaRequestHandler((_, callback) => {
global.mainWindow?.webContents.send("openDesktopCapturerSourcePicker");
setDisplayMediaCallback(callback);
});
});
app.on('window-all-closed', () => {
app.on("window-all-closed", () => {
app.quit();
});
app.on('activate', () => {
global.mainWindow.show();
app.on("activate", () => {
global.mainWindow?.show();
});
function beforeQuit(): void {
global.appQuitting = true;
global.mainWindow?.webContents.send('before-quit');
global.mainWindow?.webContents.send("before-quit");
}
app.on('before-quit', beforeQuit);
autoUpdater.on('before-quit-for-update', beforeQuit);
app.on("before-quit", beforeQuit);
autoUpdater.on("before-quit-for-update", beforeQuit);
app.on('second-instance', (ev, commandLine, workingDirectory) => {
app.on("second-instance", (ev, commandLine, workingDirectory) => {
// If other instance launched with --hidden then skip showing window
if (commandLine.includes('--hidden')) return;
if (commandLine.includes("--hidden")) return;
// Someone tried to run a second instance, we should focus our window.
if (global.mainWindow) {
@@ -533,4 +581,4 @@ app.on('second-instance', (ev, commandLine, workingDirectory) => {
// installer uses for the shortcut icon.
// This makes notifications work on windows 8.1 (and is
// a noop on other platforms).
app.setAppUserModelId('com.squirrel.element-desktop.Element');
app.setAppUserModelId("com.squirrel.element-desktop.Element");

View File

@@ -1,46 +0,0 @@
{
"File": "ملف",
"Close": "أغلِق",
"Actual Size": "المقاس الفعلي",
"View": "منظور",
"Select All": "حدّد الكل",
"Delete": "احذف",
"Copy": "انسخ",
"Edit": "تحرير",
"Close Element": "أغلِق Element",
"Cancel": "ألغِ",
"Bring All to Front": "ضَع الكل في المقدّمة",
"Speech": "نطق",
"Add to dictionary": "أضِف إلى القاموس",
"The image failed to save": "فشل حفظ الصورة",
"Failed to save image": "فشل حفظ الصورة",
"Save image as...": "احفظ الصورة كَ‍...",
"Copy link address": "انسخ عنوان الرابط",
"Copy email address": "انسخ عنوان البريد الإلكتروني",
"Copy image": "انسخ الصورة",
"Zoom": "تقريب",
"Stop Speaking": "أوقِف النطق",
"Start Speaking": "ابدأ النطق",
"Unhide": "اعرض",
"Hide Others": "أخفِ البقية",
"Hide": "أخفِ",
"Services": "الخدمات",
"About": "عن",
"Element Help": "مساعدة Element",
"Help": "مساعدة",
"Minimize": "صغّر",
"Window": "نافذة",
"Toggle Developer Tools": "فعّل/عطّل أدوات المطوّرين",
"Toggle Full Screen": "فعّل/عطّل ملء الشاشة",
"Preferences": "التفضيلات",
"Zoom In": "قرّب",
"Zoom Out": "بعّد",
"Paste and Match Style": "ألصِق وطابِق النمط",
"Paste": "ألصِق",
"Cut": "قصّ",
"Redo": "أعِد",
"Undo": "تراجَع",
"Quit": "غادِر",
"Show/Hide": "اعرض/أخفِ",
"Are you sure you want to quit?": "أمتأكّد من الإغلاق؟"
}

View File

@@ -1 +0,0 @@
{}

View File

@@ -1,46 +0,0 @@
{
"Add to dictionary": "Дадаць у слоўнік",
"The image failed to save": "Не атрымалася захаваць малюнак",
"Failed to save image": "Не атрымалася захаваць малюнак",
"Save image as...": "Захаваць малюнак як...",
"Copy link address": "Скапіраваць спасылку",
"Copy email address": "Скапіраваць адрас пошты",
"Copy image": "Скапіраваць малюнак",
"File": "Файл",
"Bring All to Front": "Вынесці ўсё наперад",
"Zoom": "Маштаб",
"Stop Speaking": "Перастаць гаварыць",
"Start Speaking": "Гаварыць",
"Speech": "Голас",
"Unhide": "Паказаць",
"Hide Others": "Схаваць іншыя",
"Hide": "Схаваць",
"Services": "Сервісы",
"About": "Аб праграме",
"Element Help": "Даведка Element",
"Help": "Даведка",
"Close": "Зачыніць",
"Minimize": "Згарнуць",
"Window": "Акно",
"Toggle Developer Tools": "Пераключэнне інструментаў распрацоўніка",
"Toggle Full Screen": "Пераключэнне на ўвесь экран",
"Preferences": "Параметры",
"Zoom Out": "Паменшыць",
"Zoom In": "Павялічыць",
"Actual Size": "Фактычны Памер",
"View": "Прагляд",
"Select All": "Выбраць усё",
"Delete": "Выдаліць",
"Paste and Match Style": "Уставіць і супаставіць стыль",
"Paste": "Уставіць",
"Copy": "Капіяваць",
"Cut": "Выразаць",
"Redo": "Паўтарыць",
"Undo": "Адмяніць",
"Edit": "Змяніць",
"Quit": "Выйсці",
"Show/Hide": "Паказаць / схаваць",
"Are you sure you want to quit?": "Вы ўпэўненыя, што хочаце выйсці?",
"Close Element": "Зачыніць Element",
"Cancel": "Адмена"
}

View File

@@ -1,47 +0,0 @@
{
"Add to dictionary": "Добави към речника",
"The image failed to save": "Изображението не успя да се запази",
"Failed to save image": "Неуспешно запазване на изображението",
"Save image as...": "Запази изображението като...",
"Copy link address": "Копирай линка",
"Copy image address": "Копирай адреса на изображението",
"Copy email address": "Копирай имейл адрес",
"Copy image": "Копирай изображение",
"File": "Файл",
"Bring All to Front": "Покажи всички най-отгоре",
"Zoom": "Мащабирай",
"Stop Speaking": "Спри да говориш",
"Start Speaking": "Започни да говориш",
"Speech": "Говор",
"Unhide": "Покажи",
"Hide Others": "Скрий Останалите",
"Hide": "Скрий",
"Services": "Услуги",
"About": "Относно",
"Element Help": "Помощ за Елемент",
"Help": "Помощ",
"Close": "Затвори",
"Minimize": "Минимизирай",
"Window": "Прозорец",
"Toggle Developer Tools": "Превключи инструментите за разработчици",
"Toggle Full Screen": "Превключи на Цял екран",
"Preferences": "Предпочитания",
"Zoom Out": "Намали",
"Zoom In": "Увеличи",
"Actual Size": "Действителен Размер",
"View": "Преглед",
"Select All": "Избери Всичко",
"Delete": "Изтрий",
"Paste and Match Style": "Постави и Използвай текущия стил",
"Paste": "Постави",
"Copy": "Копирай",
"Cut": "Изрежи",
"Redo": "Върни",
"Undo": "Отмени",
"Edit": "Редактирай",
"Quit": "Напусни",
"Show/Hide": "Покажи/Скрий",
"Are you sure you want to quit?": "Сигурен ли си че искаш да напуснеш?",
"Close Element": "Затвори Елемент",
"Cancel": "Отказ"
}

View File

@@ -1,47 +0,0 @@
{
"Are you sure you want to quit?": "তুমি কি আসলেই বের হতে চাও?",
"Close Element": "এলিমেন্ট বন্ধ করো",
"Cancel": "বাতিল",
"Save image as...": "ছবি সংরক্ষণের ধরন...",
"Failed to save image": "ছবি সংরক্ষণ ব্যর্থ",
"The image failed to save": "ছবি সংরক্ষণ ব্যর্থ",
"Add to dictionary": "অভিধানে যোগ করি",
"Copy link address": "সংযোগের ঠিকানা অনুলিপি করো",
"Copy image address": "ছবির ঠিকানা অনুলিপি করো",
"Copy email address": "ইমেইল ঠিকানা অনুলিপি করো",
"Copy image": "ছবি অনুলিপি করো",
"File": "নথি",
"Bring All to Front": "সবকিছু সামনে আনো",
"Zoom": "বড় করা",
"Stop Speaking": "কথা বন্ধ করো",
"Start Speaking": "কথা শুরু করো",
"Speech": "বাচন",
"Unhide": "দেখাও",
"Hide Others": "অন্যগুলো লুকাও",
"Hide": "লুকাও",
"Services": "সেবা",
"About": "আমাদের সম্পর্কে",
"Element Help": "এলিমেন্ট সাহায্য",
"Help": "সাহায্য",
"Close": "বন্ধ",
"Minimize": "সংকোচন",
"Window": "জানালা",
"Toggle Developer Tools": "ডেভেলপার সরঞ্জামাদি",
"Toggle Full Screen": "পূর্ণ পর্দা করো/বের হও",
"Preferences": "পছন্দসমূহ",
"Zoom Out": "ছোট করো",
"Zoom In": "বড়ো করো",
"Actual Size": "আসল আকার",
"View": "দেখো",
"Select All": "সব নির্বাচন",
"Delete": "অপসারণ",
"Paste and Match Style": "লেপন ও একই ধরনে",
"Paste": "লেপন",
"Copy": "অনুলিপি",
"Cut": "কাটো",
"Redo": "পুন",
"Undo": "ফিরত",
"Edit": "সম্পাদনা",
"Quit": "প্রস্থান",
"Show/Hide": "দেখাও/লুকাও"
}

View File

@@ -1,46 +0,0 @@
{
"Add to dictionary": "Afegeix al diccionari",
"The image failed to save": "S'ha fallat en desar la imatge",
"Failed to save image": "S'ha fallat en desar la imatge",
"Save image as...": "Anomena i desa la imatge...",
"Copy link address": "Copia l'adreça de l'enllaç",
"Copy email address": "Copia l'adreça de correu electrònic",
"Copy image": "Copia la imatge",
"File": "Fitxer",
"Bring All to Front": "Porta-ho tot al davant",
"Zoom": "Escala",
"Stop Speaking": "Para la veu",
"Start Speaking": "Comença la veu",
"Speech": "Veu",
"Unhide": "Deixa d'amagar",
"Hide Others": "Amaga les altres",
"Hide": "Amaga",
"Services": "Serveis",
"About": "Quant a",
"Element Help": "Ajuda sobre l'Element",
"Help": "Ajuda",
"Close": "Tanca",
"Minimize": "Minimitza",
"Window": "Finestra",
"Toggle Developer Tools": "Commuta les eines per a desenvolupadors",
"Toggle Full Screen": "Commuta la pantalla completa",
"Preferences": "Preferències",
"Zoom Out": "Allunya",
"Zoom In": "Apropia",
"Actual Size": "Mida real",
"View": "Visualitza",
"Select All": "Selecciona-ho tot",
"Delete": "Suprimeix",
"Paste and Match Style": "Enganxa i fes coincidir l'estil",
"Paste": "Enganxa",
"Copy": "Copia",
"Cut": "Retalla",
"Redo": "Refés",
"Undo": "Desfés",
"Edit": "Edita",
"Quit": "Surt",
"Show/Hide": "Mostra/Amaga",
"Are you sure you want to quit?": "Esteu segur que voleu sortir?",
"Close Element": "Tanca l'Element",
"Cancel": "Cancel·la"
}

63
src/i18n/strings/cs.json Normal file
View File

@@ -0,0 +1,63 @@
{
"action": {
"cancel": "Storno",
"close": "Zavřít",
"close_brand": "Zavřít %(brand)s",
"copy": "Zkopírovat",
"cut": "Vyjmout",
"delete": "Smazat",
"edit": "Upravit",
"minimise": "Minimalizovat",
"paste": "Vložit",
"paste_match_style": "Vložit a přizpůsobit styl",
"quit": "Ukončit",
"redo": "Znovu",
"select_all": "Vybrat vše",
"show_hide": "Zobrazit/Skrýt",
"undo": "Zpět",
"zoom_in": "Přiblížit",
"zoom_out": "Oddálit"
},
"common": {
"about": "O",
"brand_help": "%(brand)s nápověda",
"help": "Nápověda",
"preferences": "Předvolby"
},
"confirm_quit": "Opravdu chcete ukončit aplikaci?",
"edit_menu": {
"speech": "Řeč",
"speech_start_speaking": "Spustit nahrávání hlasu",
"speech_stop_speaking": "Zastavit nahrávání hlasu"
},
"file_menu": {
"label": "Soubor"
},
"menu": {
"hide": "Skrýt",
"hide_others": "Skrýt ostatní",
"services": "Služby",
"unhide": "Zrušit skrytí"
},
"right_click_menu": {
"add_to_dictionary": "Přidat do slovníku",
"copy_email": "Kopírovat e-mailovou adresu",
"copy_image": "Kopírovat obrázek",
"copy_image_url": "Kopírovat adresu obrázku",
"copy_link_url": "Kopírovat adresu odkazu",
"save_image_as": "Uložit obrázek jako...",
"save_image_as_error_description": "Obrázek se nepodařilo uložit",
"save_image_as_error_title": "Chyba při ukládání obrázku"
},
"view_menu": {
"actual_size": "Aktuální velikost",
"toggle_developer_tools": "Přepnout zobrazení nástrojů pro vývojáře",
"toggle_full_screen": "Přepnout zobrazení celé obrazovky",
"view": "Zobrazit"
},
"window_menu": {
"bring_all_to_front": "Přenést vše do popředí",
"label": "Okno",
"zoom": "Lupa"
}
}

View File

@@ -1,47 +0,0 @@
{
"Speech": "Sprache",
"Paste and Match Style": "Einfügen und Formatierung beibehalten",
"Stop Speaking": "Aufnahme beenden",
"Start Speaking": "Aufnahme starten",
"Services": "Dienste",
"Are you sure you want to quit?": "Wirklich beenden?",
"Add to dictionary": "Wörterbuch hinzufügen",
"The image failed to save": "Das Bild konnte nicht gespeichert werden",
"Failed to save image": "Bild kann nicht gespeichert werden",
"Save image as...": "Bild speichern unter...",
"Copy link address": "Link-Adresse kopieren",
"Copy email address": "Email-Adresse kopieren",
"Copy image": "Bild kopieren",
"File": "Datei",
"Bring All to Front": "Alles in den Vordergrund",
"Zoom": "Zoom",
"Unhide": "Wieder anzeigen",
"Hide Others": "Andere verstecken",
"Hide": "Verstecken",
"About": "Über",
"Element Help": "Hilfe zu Element",
"Help": "Hilfe",
"Close": "Schließen",
"Minimize": "Minimieren",
"Window": "Fenster",
"Toggle Developer Tools": "Developer-Tools an/aus",
"Toggle Full Screen": "Vollbildschirm an/aus",
"Preferences": "Einstellungen",
"Zoom Out": "Verkleinern",
"Zoom In": "Vergrößern",
"Actual Size": "Tatsächliche Größe",
"View": "Ansicht",
"Select All": "Alles auswählen",
"Delete": "Löschen",
"Paste": "Einfügen",
"Copy": "Kopieren",
"Cut": "Ausschneiden",
"Redo": "Wiederherstellen",
"Undo": "Rückgängig",
"Edit": "Bearbeiten",
"Quit": "Beenden",
"Show/Hide": "Anzeigen/Ausblenden",
"Close Element": "Element schließen",
"Cancel": "Abbrechen",
"Copy image address": "Bild-Adresse kopieren"
}

View File

@@ -0,0 +1,63 @@
{
"action": {
"cancel": "Abbrechen",
"close": "Schließen",
"close_brand": "%(brand)s schließen",
"copy": "Kopieren",
"cut": "Ausschneiden",
"delete": "Löschen",
"edit": "Bearbeiten",
"minimise": "Minimieren",
"paste": "Einfügen",
"paste_match_style": "Einfügen und Formatierung beibehalten",
"quit": "Beenden",
"redo": "Wiederherstellen",
"select_all": "Alles auswählen",
"show_hide": "Anzeigen/Ausblenden",
"undo": "Rückgängig",
"zoom_in": "Vergrößern",
"zoom_out": "Verkleinern"
},
"common": {
"about": "Über",
"brand_help": "%(brand)s Hilfe",
"help": "Hilfe",
"preferences": "Einstellungen"
},
"confirm_quit": "Wirklich beenden?",
"edit_menu": {
"speech": "Sprache",
"speech_start_speaking": "Aufnahme starten",
"speech_stop_speaking": "Aufnahme beenden"
},
"file_menu": {
"label": "Datei"
},
"menu": {
"hide": "Verstecken",
"hide_others": "Andere verstecken",
"services": "Dienste",
"unhide": "Wieder anzeigen"
},
"right_click_menu": {
"add_to_dictionary": "Wörterbuch hinzufügen",
"copy_email": "Email-Adresse kopieren",
"copy_image": "Bild kopieren",
"copy_image_url": "Bild-Adresse kopieren",
"copy_link_url": "Link-Adresse kopieren",
"save_image_as": "Bild speichern unter...",
"save_image_as_error_description": "Das Bild konnte nicht gespeichert werden",
"save_image_as_error_title": "Bild kann nicht gespeichert werden"
},
"view_menu": {
"actual_size": "Tatsächliche Größe",
"toggle_developer_tools": "Developer-Tools an/aus",
"toggle_full_screen": "Vollbildschirm an/aus",
"view": "Ansicht"
},
"window_menu": {
"bring_all_to_front": "Alles in den Vordergrund",
"label": "Fenster",
"zoom": "Zoomen"
}
}

View File

@@ -1,47 +1,63 @@
{
"Are you sure you want to quit?": "Είστε βέβαιος ότι θέλετε να εγκαταλείψετε;",
"Zoom": "Ζουμ",
"Unhide": "Εμφάνιση",
"Window": "Παράθυρο",
"Toggle Developer Tools": "Άνοιγμα Εργαλείων Προγραμματιστή",
"Toggle Full Screen": "Εναλλαγή σε Πλήρη Οθόνη",
"Copy email address": "Αντιγραφή διεύθυνσης email",
"File": "Αρχείο",
"Bring All to Front": "Μεταφορά Όλων στο Προσκήνιο",
"Stop Speaking": "Τερματίστε να μιλάτε",
"Start Speaking": "Ξεκινήστε να μιλάτε",
"Speech": "Ομιλία",
"Hide Others": "Απόκρυψη Άλλων",
"Hide": "Απόκρυψη",
"Services": "Υπηρεσίες",
"About": "Σχετικά με",
"Element Help": "Βοήθεια για το Element",
"Help": "Βοήθεια",
"Close": "Κλείσιμο",
"Minimize": "Ελαχιστοποίηση",
"Preferences": "Προτιμήσεις",
"Zoom Out": "Σμίκρυνση",
"Zoom In": "Μεγέθυνση",
"Actual Size": "Πραγματικό Μέγεθος",
"View": "Προβολή",
"Select All": "Επιλογή Όλων",
"Delete": "Διαγραφή",
"Paste and Match Style": "Επικόλληση και Ταίριασμα Στυλ",
"Paste": "Επικόλληση",
"Copy": "Αντιγραφή",
"Cut": "Αποκοπή",
"Redo": "Επανάληψη",
"Undo": "Αναίρεση",
"Edit": "Επεξεργασία",
"Quit": "Κλείσιμο",
"Show/Hide": "Eμφάνιση/Απόκρυψη",
"Close Element": "Κλείστε το Element",
"Cancel": "Ακύρωση",
"Add to dictionary": "Προσθήκη στο λεξικό",
"The image failed to save": "Η αποθήκευση της εικόνας απέτυχε",
"Failed to save image": "Αποτυχία αποθήκευσης εικόνας",
"Save image as...": "Αποθήκευση εικόνας ως...",
"Copy link address": "Αντιγραφή διεύθυνσης συνδέσμου",
"Copy image address": "Αντιγραφή διεύθυνσης εικόνας",
"Copy image": "Αντιγραφή εικόνας"
"action": {
"cancel": "Ακύρωση",
"close": "Κλείσιμο",
"close_brand": "Κλείσιμο %(brand)s",
"copy": "Αντιγραφή",
"cut": "Αποκοπή",
"delete": "Διαγραφή",
"edit": "Επεξεργασία",
"minimise": "Ελαχιστοποίηση",
"paste": "Επικόλληση",
"paste_match_style": "Επικόλληση και Ταίριασμα Στυλ",
"quit": "Κλείσιμο",
"redo": "Επανάληψη",
"select_all": "Επιλογή Όλων",
"show_hide": "Eμφάνιση/Απόκρυψη",
"undo": "Αναίρεση",
"zoom_in": "Μεγέθυνση",
"zoom_out": "Σμίκρυνση"
},
"common": {
"about": "Σχετικά με",
"brand_help": "%(brand)s Υποστήριξη",
"help": "Βοήθεια",
"preferences": "Προτιμήσεις"
},
"confirm_quit": "Είστε βέβαιος ότι θέλετε να εγκαταλείψετε;",
"edit_menu": {
"speech": "Ομιλία",
"speech_start_speaking": "Ξεκινήστε να μιλάτε",
"speech_stop_speaking": "Τερματίστε να μιλάτε"
},
"file_menu": {
"label": "Αρχείο"
},
"menu": {
"hide": "Απόκρυψη",
"hide_others": "Απόκρυψη Άλλων",
"services": "Υπηρεσίες",
"unhide": "Εμφάνιση"
},
"right_click_menu": {
"add_to_dictionary": "Προσθήκη στο λεξικό",
"copy_email": "Αντιγραφή διεύθυνσης email",
"copy_image": "Αντιγραφή εικόνας",
"copy_image_url": "Αντιγραφή διεύθυνσης εικόνας",
"copy_link_url": "Αντιγραφή διεύθυνσης συνδέσμου",
"save_image_as": "Αποθήκευση εικόνας ως...",
"save_image_as_error_description": "Η αποθήκευση της εικόνας απέτυχε",
"save_image_as_error_title": "Αποτυχία αποθήκευσης εικόνας"
},
"view_menu": {
"actual_size": "Πραγματικό Μέγεθος",
"toggle_developer_tools": "Άνοιγμα Εργαλείων Προγραμματιστή",
"toggle_full_screen": "Εναλλαγή σε Πλήρη Οθόνη",
"view": "Προβολή"
},
"window_menu": {
"bring_all_to_front": "Μεταφορά Όλων στο Προσκήνιο",
"label": "Παράθυρο",
"zoom": "Ζουμ"
}
}

Some files were not shown because too many files have changed in this diff Show More