Commit Graph

15 Commits

Author SHA1 Message Date
Manav Rathi
c0d26e80b3 Windows code signing 2025-06-16 14:30:35 +05:30
Manav Rathi
6e5e28d2bd [desktop] Attempt to fix macOS universal build after electron builder update
CI failures since updating Electron building (and Electron):

 • packaging       platform=darwin arch=arm64 electron=34.0.0 appOutDir=dist/mac-universal-arm64-temp
  • packaging       platform=darwin arch=universal electron=34.0.0 appOutDir=dist/mac-universal
  ⨯ pattern is too long  failedTask=build stackTrace=TypeError: pattern is too long
2025-01-22 13:16:30 +05:30
Manav Rathi
b1c62f6c93 [desktop] IM 7 - Handle CI rebuilds, and add windows extension
- CI builds both arch binaries in one go, so the singular yarn install hook is not enough
- Without the extension windows doesn't run it
2025-01-22 07:49:18 +05:30
Manav Rathi
9de5f01727 Add protocol 2024-06-11 11:33:48 +05:30
Manav Rathi
e4bc206d6a [desktop] Revert to 1.6.63 Linux icon behaviour
https://github.com/ente-io/ente/issues/1909
2024-06-04 12:30:05 +05:30
Manav Rathi
c090300175 Remove electron-builder-notarize
The environment variables we are passing get picked by the built in notarization
code in electron-builder which signs successfully.

    notarization successful

But thereafter electron-builder-notarize starts throwing some errors:

    Error: The appleIdPassword property is required when using notarization with password credentials
        at validateNotaryToolAuthorizationArgs (/Users/runner/work/photos-desktop/photos-desktop/desktop/node_modules/electron-notarize/src/validate-args.ts:107:13)
    Skipping notarization: The appleIdPassword property is required when using notarization with appleId
        at module.exports (/Users/runner/work/photos-desktop/photos-desktop/desktop/node_modules/electron-builder-notarize/validate.js:42:18)

Since the notarization has already happened, we don't need this
2024-05-07 14:25:22 +05:30
Manav Rathi
a8d3a8bfe8 Remove duplicate notarization attempt
From build logs:

     • notarization successful
    Error: The appleIdPassword property is required when using notarization with password credentials
        at validateNotaryToolAuthorizationArgs (/Users/runner/work/photos-desktop/photos-desktop/desktop/node_modules/electron-notarize/src/validate-args.ts:107:13)

Not sure, but at the face of it (since this was not enabled earlier too), our
notarization process kicks in during signing because of the presence of env
vars, and specifying it again here starts a separate process we haven't
configured.
2024-05-06 16:08:23 +05:30
Manav Rathi
b24d80a267 Move to new notarization mechanism
Refs:
- https://www.electron.build/configuration/mac.html#NotarizeLegacyOptions
- https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/src/macPackager.ts
- https://github.com/samuelmeuli/action-electron-builder/issues/101
2024-05-03 13:02:19 +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
e8d224c511 Remove stale ggml reference 2024-04-09 21:29:15 +05:30
Manav Rathi
42679bc9da Remove duplicated icon
Per https://www.electron.build/icons, a single 512x512 icon.png placed in the
buildResources directory (default `build`) is enough to generate icons for all
three - macOS, Windows and Linux.
2024-03-27 15:00:25 +05:30
Manav Rathi
cd1d22cdfb Shorten 2024-03-21 10:45:48 +05:30
Manav Rathi
cc623e5010 Remove unnecessary steps
I'm not sure how it is happening, but both ffmpeg-static and onnx get to their
correct path without this configuration. the paths it gets to is also slightly
different, so it seems that this snippet does not have any effect (at best):

    ente.app/Contents/Resources/app.asar.unpacked/node_modules
2024-03-21 10:43:33 +05:30
Manav Rathi
bb865a7b15 Add documentation about ffmpeg
https://alexandercleasby.dev/blog/use-ffmpeg-electron
2024-03-21 10:16:21 +05:30
Manav Rathi
e4684b22df Move out the electron-builder config to separate file 2024-03-19 19:17:01 +05:30