Commit graph

79 commits

Author SHA1 Message Date
nig
fe210ff0a0 reorder some files to make sqlworker.ts loadable in dev and prod build
#5112
2023-09-22 12:09:18 +02:00
nig
e57b9c7ff2 threaded sqlcipher
#5112
2023-09-22 12:09:18 +02:00
nig
1adc36e08e [build] vendor electron-updater
* according to rollups type definitions, the output option property is
 ignored by rollup.rollup, so it moved to bundle.write
* we don't use commonjs deps in the desktop bundle anymore, so the
  commonjs plugin can go away from DesktopBuilder

[build] remove some unnecessary rollup plugins

[build] unify the native plugins

[build] vendor keytar

[build] vendor better-sqlite3 deps and restrict module resolution

it's now checked in and can be updated with buildSrc/updateLibs.js

close #4213
2023-08-30 16:38:00 +02:00
nig
978d9780c2 fix linter errors for missing node: protocol
close #4367
2023-05-05 11:29:09 +02:00
nig
3bac5eca53 fix malformed import 2023-03-28 13:56:07 +00:00
nig
f35e0d63cb upgrade rollup + plugins, fix illegal import
DatabaseKeyFactory, used from worker and main, was
in a bundle that also includes code calling
assertMainOrNode()

removed rollup visualizer plugin dependency
because it requires rollup 2

fix db90ac26ab
fix #5065
2023-03-28 12:25:21 +00:00
nig
7cba629cb6 [desktop] use a nonbroken electron-updater version on each platform
5.3.0 couldn't handle windows machines with a restricted powershell.
6.0.0 fixed that, but the alpha that's currently available does not
work on linux because it's opening the child process wrong.
2023-01-30 10:20:44 +01:00
ivk
50b23ebd1b Run prettier on the whole project 2022-12-27 16:08:23 +01:00
paw
d25a4854f7 Use .ico for Windows again
We previously used a .png because of rendering issues, but this new
icon file should not have these problems.

This means Windows won't need to use nearest scaling, making the
application icon look better on the desktop.

Fixes #4235
2022-08-19 10:01:49 +02:00
nig
e1d48c4f6c [android/ci] build and use android-database-sqlcipher
* add new jenkinsfile for building loadable sqlcipher aar
* use it as a dependency if it's in the app-android/libs dir

close #4294
2022-08-04 10:38:22 +02:00
nig
89bb97bcd9 v3.98.10 2022-07-14 13:32:38 +02:00
nig
85452378b5 [desktop] explicitly mark "url" as an external module
rollup was including some transitive dependency of octokit into the
bundle which didn't support some of the node "url" functionality.
2022-07-08 12:58:33 +02:00
ivk
12a46cb3b2 [build] Add more logging for mapirs again 2022-06-27 09:50:51 +02:00
ivk
2292f27e20 [build] Add more logging for mapirs 2022-06-27 09:50:51 +02:00
ivk
6980c847cb
[build] Changes after review 2022-05-10 17:56:48 +02:00
jom
86ee7e54a5 [build] fix desktop build 2022-05-06 09:10:45 +02:00
jom
1c3b1ae936 [build] fix mac desktop build 2022-05-06 08:57:50 +02:00
ivk
b0066f98ef
[build, desktop] Fix building better-sqlite3 on Windows, fix #4089
- Fix unpacking .node file form .asar
 - Update to correct build of better_sqlite3
 - Fix passing correct path to better_sqlite3
2022-05-05 18:00:59 +02:00
jom
9009a57f8e Encrypt offline database using sqlcipher, #3816
The database key is stored and encrypted alongside the user's stored credentials

we depend on our own fork of Signal's fork of better-sqlite3 which replaces sqlite3 with sqlcipher. Our fork was necessary in order to obtain the newest version of better-sqlite-3. This fork also has a modification that makes it not try to resolve the nativeBindingPath into an absolute path, because otherwise it was not possible to make it load the native module from within the bundled app

In Desktop, we don't know what kind of storage to use until the use is logging in, so we want to delay initialisation until then by using a proxy storage implementation. The loginfacade may not use the cache in this case.
2022-03-17 14:44:14 +01:00
jom
591554aa51 [build] Build better-sqlite3 on windows during Jenkins CI
This commit not only sets up the build for windows on jenkins,
it also consolidates how we get prebuilt binaries for native modules i.e. keytar and better-sqlite3
and generally has some refactorings
2022-03-07 10:26:06 +01:00
ivk
30d040b851 Fix WebAuthn webDialog for desktop, fix #3914 2022-02-23 14:02:08 +01:00
ivk
d54be5a7c2 [build] Change keytar to be compiled on demand
Compiling keytar in postinstall is problematic because we need node-gyp
to successfully finish installation. Because of that it is hard to
depend on tutanota-3 (e.g. in admin client).

Doing this on demand avoids the issue.
2022-02-22 14:31:28 +01:00
jom
4c274e5ee1 [build] fix desktop dist build
The dist build was refactored in commit:

916ee1ed1d

The format of the desktop options was changed from a raw object to a map,
but the usages in DesktopBuilder weren't adapted. This change adapts them
and also tidies it up a bit.

reviewed with sas
2022-02-21 15:31:03 +01:00
sas
7cb4828c56 Introduce persistent cache for desktop, close #3823 2022-02-15 09:54:54 +01:00
ivk
80abdf03c9 [build] Remove all Babel dependencies 2022-01-13 15:52:16 +01:00
ivk
e7461a1ee4 [build] Fix desktop build 2022-01-07 16:52:02 +01:00
ivk
caebd6fea7 Update electron-updater, electron-builder & friends, close #3415 2021-12-01 09:16:35 +01:00
ivk
b9da6d72b5 [build] Make creating env more explicit 2021-10-15 15:42:12 +02:00
nig
dba36e02ab add documentation for mapirs retrival functions 2021-10-12 11:08:16 +02:00
nig
01aff61211 don't delete the tmp dir when there may be important info in there 2021-10-12 11:08:16 +02:00
nig
8def944a53 use extra registry key to locate the tutanota desktop log directory 2021-10-12 11:08:16 +02:00
nig
5f4e77f093 use extra registry key to locate the tutanota executable
previously, the exe was located via its GUID/AppID.
this ID is different for test/snapshot/release.
now, the exe registers itself next to the dll path

#2968
2021-10-12 11:08:16 +02:00
nig
99b650f3ec [desktop] include mapirs.dll in the windows build 2021-10-12 11:08:16 +02:00
nig
e6cb16098b update keytar to v7.7.0
the keytar build doesn't depend on runtime or
version anymore since it switched
from node headers to N-API.

close #3467
2021-09-09 09:27:29 +02:00
John Morris
ba3d1b55d5 [desktop] install dmg-license manually when building mac client 2021-08-12 10:56:27 +02:00
ivk
dd976592d9 Replace fromCallback, remove the rest of Bluebird, close #2725 2021-08-11 11:23:35 +02:00
nig
19b5588c67 [desktop] fix cross-platform build failures
- pin electron-builder to v22.11.4 because of incompatibilities with node 16
- use fs.rm instead of fs.rmdir because of deprecation
- fetch prebuild keytar if cross-platform build is detected

close #3196
2021-06-22 14:08:22 +02:00
nig
f90e3f80ab add possibility to use self-signed cert for desktop update signatures
to create these signatures, run the dist script with the environment
variable DEBUG_SIGN set to a directory containing a self-signed code
signing cert file test.p12

close #2918
2021-05-25 14:11:47 +02:00
thp
0ed36f2cd4 Fix error in import 2021-05-25 13:47:06 +02:00
thp
27e4c41c23 Review stuff 2021-05-25 13:47:06 +02:00
thp
ff2ca4a340 Build keytar on our own. Fix #2582 2021-05-25 13:47:06 +02:00
John
fc03364d3d
fix DesktopSseClient and DesktopIntegrator tests (#3066)
fix DesktopSseClient and DesktopIntegrator tests

Also refactor DesktopIntegrator and DesktopMain to improve understandability
2021-05-19 13:53:01 +02:00
ivk
f47cf1e399
[build] Fix unpacked installer 2021-04-06 14:43:41 +02:00
thp
ff01596a23 Changes from review 2021-03-31 16:35:38 +02:00
nig
7713acba0d [desktop] review build and electron config 2021-03-31 16:35:38 +02:00
ivk
7c55e411de
[build] Fix file naming. Roll back nameCache changes for terser 2021-01-29 13:56:41 +01:00
ivk
241bb62595
[build] Use nameCache for terser 2021-01-29 10:27:46 +01:00
ivk
4c596312c4
[build] Fix signing desktop builds 2021-01-28 14:03:56 +01:00
ivk
f1b24a3a35
[build] Fix desktop builder 2021-01-22 14:55:40 +01:00
ivk
79f3fff51a
Use Rollup & Nollup for build 2021-01-22 12:23:22 +01:00