Commit graph

100 commits

Author SHA1 Message Date
ivk
cd5461d727 [build, desktop] Fix bundling simple-windows-notifications
Mark it as explicitly allowed since it's our fork.

Co-authored-by: hrb-hub <hrb-hub@users.noreply.github.com>
2025-07-21 13:41:05 +02:00
hrb-hub
dad5a892c2 Drop existing offline search index to fix broken state
See #9295

Close #9314

Co-authored-by: ivk <ivk@tutao.de>
2025-07-18 12:54:20 +02:00
ivk
dd68f39800 [desktop] Notification fixes
Fixed notification click on Windows after the notification is put into
Action Center. We used @indutny/simple-windows-notifications to
re-implement notifications on Windows.

Fixed dismissing mail & alarm notifications on window focus. Grouped
notifications now use actual user ids.

Fixed awaiting config in createComponents.

Close #6946

Co-authored-by: paw <paw-hub@users.noreply.github.com>
2025-07-18 11:35:51 +02:00
ivk
fba2b284ec [desktop] Use @signalapp/sqlcipher fork for db
Co-authored-by: paw <paw-hub@users.noreply.github.com>
2025-06-04 10:37:52 +02:00
Kinan
edbf281b88
switch to typeIds and attrIds, add SystemMV126, TutanotaMV86, BaseMV2
Refactor our instance deserialization/serialization pipeline, both on
TypeScript and on Rust [sdk] to use typeId and attributeIds instead of
typeNames and attributeNames. We furthermore ignore cardinalities
on associations until the instance layer and always
store associations as arrays. This commit introduces **eventual
consistency** on the client, i.e. we are from now on always storing data
in the newest schema format (activeApplicationVersionsForWritingSum)
which ensures that all data is already available on the client after
updating the client to a newer version. This removes the need for
offline migrations on the client and also removes backward migrations
on the server. Furthermore, the server model types are now available
on the client, retrievable through the ApplicationTypesFacade. This is
our first step towards FastSync.

Co-authored-by: nig <nig@tutao.de>
Co-authored-by: abp <abp@tutao.de>
Co-authored-by: jomapp <17314077+jomapp@users.noreply.github.com>
Co-authored-by: map <mpfau@users.noreply.github.com>
Co-authored-by: sug <sug@tutao.de>
Co-authored-by: Kinan <104761667+kibibytium@users.noreply.github.com>
2025-04-28 12:44:35 +02:00
ivk
2ed48135a8
Replace esbuild with Rolldown
- switch desktop build to esm
 - convert mithril to esm
 - run worker as esm module
 - fix dependency from DesktopAlarmScheduler to calendar app
 - switch napi-rs cli to 3.0
 - fix mimimi imports
 - remove hacky method on generated dispatcher
 - refactor native rollup plugins

 Co-authored-by: bir <bir@tutao.de>
2025-01-13 10:05:18 +01:00
Kinan
bbf81a95b4 build node-mimimi and sdk for the desktop client
Co-authored-by: map <mpfau@users.noreply.github.com>
Co-authored-by: nig <nig@tutao.de>
Co-authored-by: kitsugo <hayashi.jiro@kitsugo.com>
2025-01-02 16:52:08 +01:00
ivk
a42907e55a [build] Add type checking to buildSrc
It isn't invoked automatically anywhere but the editors should pick it
up and it can also be run manually.

It also fixes few little issues, e.g. getPrebuiltNativeModuleForWindows
was getting called with the right arguments.
2024-08-06 16:00:04 +02:00
mup
ced9c1acf0 Fixes desktop files path 2024-07-30 17:10:01 +02:00
wrd
8ab3b14edd Move files to new folder structure
Co-authored-by: @rih-tutao
2024-07-26 16:42:13 +02:00
nig
e17221c23d add commonjs plugin for desktop build
rollup started rejecting libs/stream.js in the desktop build after the
upgrade to 4.9.4
2024-01-18 16:03:54 +01:00
nig
212ce6720f remove keytar 2024-01-18 14:23:01 +01:00
tutao
d79c542eda Fix non-universal libraries being included when building universal 2023-11-27 13:37:36 +00:00
jat
8096e3ed6b Add support for universal architecture on macOS
`electron-builder` has undocumented support for building universal
binaries with `electron/universal`.
It's mentioned in `electron-builder`'s change logs & in
/packages/app-builder-lib/src/macPackager.ts#L109 inside
`electron-builder`'s repo.
2023-11-27 13:37:36 +00:00
jat
38a70be346 Fix desktop script building both x86_64 and arm64 at the same time
Added a new flag `-a` which allows the developer to set the architecture
of the built client. It causes an error when an unsupported combination
of platform & architecture is used. By default, it uses the architecture
the installed node binary uses.
2023-11-27 13:37:36 +00:00
nig
4e6cf85640 [build] cleanup build for desktop client
re-create the artifacts folder before starting to use it
2023-10-19 17:14:11 +02:00
nig
487e4431a0 [build] move desktop artifacts out of /build
the desktop build builds two clients
with one call (for prod and test)

this caused the second client to include
the first one because we built it into
the build dir.

now there's a separate dir where all
the things we want to publish are stashed.
2023-10-19 11:21:31 +02:00
nig
3dfff9913b [android] remove dist buildType
we now put the dist and the dev build just in
tutanota-3/build

#5637
2023-10-18 12:12:10 +02:00
nig
e60e78c9c4 move dist build to just ./build 2023-10-18 12:12:10 +02:00
nig
09cbcdb4e6 enable credentials migration from the old to the new domain
two ways this can happen:
* starting on old domain
* starting on new domain

in each case, the starting tab opens the other domain in a new
tab to then use window.postMessage to transfer the credentials.
2023-10-18 12:12:10 +02:00
ivk
58721df61a Introduce domain configs to support 2FA across domains
#5638
2023-10-18 10:16:11 +02:00
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