Commit graph

203 commits

Author SHA1 Message Date
Manav Rathi
18ac361688
Remove unused IPC method 2024-04-14 20:11:25 +05:30
Manav Rathi
f5a4830a5a
Remove unnecessary check
e.g. macOS node shell

    > await fs.rename("/tmp/foo/bar/quxx.txt", "/tmp/foo/a.txt")
    [Error: ENOENT: no such file or directory, rename '/tmp/foo/bar/quxx.txt' -> '/tmp/foo/a.txt']
2024-04-14 18:28:10 +05:30
Manav Rathi
eb64a00ed2
Remove unnecessary checks
It is simpler for us to parallel the rm command than our bespoke variant.
2024-04-14 18:22:46 +05:30
Manav Rathi
59b9e3e586
Move into fs 2024-04-14 18:12:19 +05:30
Manav Rathi
0f1c2fa1cd
Remove unnecessary check
Mentioned in rmdir docs

Tested on macOS with a node shell

    > await fs.rmdir("/tmp/foo/bar/baz")
    Uncaught [Error: ENOTEMPTY: directory not empty, rmdir '/tmp/foo/bar/baz']
2024-04-14 18:06:49 +05:30
Manav Rathi
fb5ae3a2ac
Remove unnecessary check
rmdir docs already mention it'll only work on folders

Also tested on macOS with a node shell

    > await fs.rmdir("/tmp/foo/bar/baz/quxx.txt")
    Uncaught [Error: ENOTDIR: not a directory, rmdir '/tmp/foo/bar/baz/quxx.txt'] {
2024-04-14 17:55:40 +05:30
Manav Rathi
7438c3301e
Move mkdirIfNeeded into fs 2024-04-14 10:25:28 +05:30
Manav Rathi
72dd47fa7b
Audit rename 2024-04-14 09:27:52 +05:30
Manav Rathi
41472eb87d
Document and structure more 2024-04-12 20:24:48 +05:30
Manav Rathi
02763e3be4
Kill the renderer when we quit the app 2024-04-12 14:05:10 +05:30
Manav Rathi
8045bd1e5a
Rename and prune 2024-04-12 14:01:53 +05:30
Manav Rathi
d1d9cd9518
Document 2024-04-12 13:48:16 +05:30
Manav Rathi
39912d9b35
Remove unused code 2024-04-12 13:25:48 +05:30
Manav Rathi
cfec6ca52e
Enable the Chromium sandbox 2024-04-12 10:39:00 +05:30
Manav Rathi
98c3e43b70
Inline 2024-04-12 10:28:23 +05:30
Manav Rathi
87905a39f8
Dedup 2024-04-12 10:22:04 +05:30
Manav Rathi
a71ca93696
Inline 2024-04-12 10:15:08 +05:30
Manav Rathi
e651e9d9c7
Inline 2024-04-12 10:11:38 +05:30
Manav Rathi
664cf2157b
Reword 2024-04-12 10:07:03 +05:30
Manav Rathi
aace18aba0
Inline and rename 2024-04-12 09:51:08 +05:30
Manav Rathi
4d867898f7
Remove the sharedarraybuffer flag
From my understanding, this was needed for the wasm FFMPEG, which we are no
longer using when running as the desktop app.
2024-04-12 09:43:52 +05:30
Manav Rathi
9c786da73b
Tweak 2024-04-12 09:38:38 +05:30
Manav Rathi
61143c9c62
Cleanup 2024-04-11 16:36:56 +05:30
Manav Rathi
f5bf776848
lint 2024-04-11 15:06:03 +05:30
Manav Rathi
52727f2255
Also move the embedding 2024-04-11 15:04:18 +05:30
Manav Rathi
9ff4989d81
Cleanup 2024-04-11 14:44:00 +05:30
Manav Rathi
a1d6ef43b4
Roundtrip 2024-04-11 14:37:44 +05:30
Manav Rathi
41f7b30ca0
Wire together 2024-04-11 14:22:52 +05:30
Manav Rathi
a88f551b6a
WIP IPC API 2024-04-11 13:58:52 +05:30
Manav Rathi
7bf8912dbc
Duplicate for now 2024-04-11 13:45:02 +05:30
Manav Rathi
2b6047a979
Split 2024-04-11 13:40:35 +05:30
Manav Rathi
d3eb85be8d
Split 2024-04-11 13:17:56 +05:30
Manav Rathi
500022d4b9
Import onnxruntime with TypeScript types
Refs:
- https://github.com/microsoft/onnxruntime/issues/17979
2024-04-10 21:01:30 +05:30
Manav Rathi
2da9565dcb
Rearrange files 2024-04-10 20:44:52 +05:30
Manav Rathi
8f8d93d11e
Use standard import for jpeg-js 2024-04-10 20:36:46 +05:30
Manav Rathi
008b6d5186
Spruce dependencies docs 2024-04-10 20:36:46 +05:30
Manav Rathi
d913cbeae5
Remove unnecessary require 2024-04-10 20:32:32 +05:30
Manav Rathi
11451efffd
Restore macOS icon
git checkout 42679bc9daa4108681683079f4cb1f2832f4578c~ -- build/icon.icns
2024-04-10 20:32:32 +05:30
Manav Rathi
ecf40a70cf
[desktop] Build ARM64 variant of Windows
Fixes https://github.com/ente-io/ente/issues/1374

A customer reported that the app fails to run on Windows ARM. The error is
coming when trying to load ONNX.

ONNX runtime supports Windows ARM, e.g. see
- https://www.jsdelivr.com/package/npm/onnxruntime-node?tab=files&path=bin%2Fnapi-v3%2Fwin32
- https://github.com/microsoft/onnxruntime/issues/18078

The issue then seems to be that we're not actually building for Windows ARM. I'm
not sure about this (don't have a Windows ARM machine at hand), but my theory is
that since we don't ask Electron Builder to build for win arm64, it doesn't copy
the corresponding ONNX binary into the generated bundle.

Other refs:
- https://www.electron.build/cli.html
2024-04-10 19:33:37 +05:30
Manav Rathi
c73c674ee4
Update to the new product name where possible
(without breaking auto-updates)
2024-04-10 16:07:25 +05:30
Manav Rathi
e57e6845a5
Product name 2024-04-10 16:06:04 +05:30
Manav Rathi
3123caea92
Document the tray icon 2024-04-10 16:05:52 +05:30
Manav Rathi
4e3cce51de
Inline 2024-04-10 15:59:57 +05:30
Manav Rathi
127bb9988f
Remove top level wrapper 2024-04-10 15:55:58 +05:30
Manav Rathi
6ec4cc7c89
Log unhandled errors and promise rejections in the desktop app
Test code:

    setTimeout(() => testFunctionSync(), 5000);
    setTimeout(
        () => testFunction().then(() => console.log("done testFunction")),
        10000,
    );

    const testFunctionSync = () => {
        console.log("sleeping not");
        throw new Error("Handle me");
    };

    const testFunction = async () => {
        console.log("sleeping");
        await fs.mkdir("/tmp/foo", { recursive: true });
        console.log("woke up");
        throw new Error("Handle me");
    };
2024-04-10 13:35:04 +05:30
Manav Rathi
af79f4f0c9
Audit app update functions 2024-04-10 12:32:43 +05:30
Manav Rathi
3c7277a0b1
onMainWindowFocus 2024-04-10 11:16:21 +05:30
Manav Rathi
170aef9b30
Rename 2024-04-10 11:06:18 +05:30
Manav Rathi
8bcf77b7f7
IPC keys 2024-04-10 11:03:36 +05:30
Manav Rathi
18606b2358
IPC cleanup 2024-04-10 10:18:06 +05:30