HomePhabricator
Diffusion Comm bb86d015a124

[desktop] Base windows config

Description

[desktop] Base windows config

Summary:
This is the basic config for building an electron windows app.
It uses the Squirrel framework, which is the recommended installer by electron. It doesn't require administrator privileges, is faster and enables auto updating.

Squirrel works roughly like this:

  1. During packaging it creates an .exe that contains our app, Update.exe and installation logic
  2. When a user runs this executable, it unpacks everything
  3. It then runs our app with --squirrel-install flag. When we detect it we should do whatever setup we need (in our case, create shortcuts) and quit
  4. Then it runs our app with --squirrel-firstrun and we should run the app normally

It behaves similarly when updating/ uninstalling the app.

This diff doesn't handle:

  • easy building of the app on windows - this will be put in a later diff, the workaround for now is included in the Test Plan (I would prefer to get code review already started)
  • code signing (we don't have the certs yet)

Test Plan:
Can only be built on a Windows machine. You first have to remove the desktop from workspaces in the root package.json. Then just call yarn install and yarn make to make an installer.

Checked:

  • installing, uninstalling, trying to install when the app was already installed
  • check if the shortcuts on the desktop and in the windows menu were created/ removed correctly
  • check if the app worked correctly, double clicking the top-bar, window buttons etc.

Reviewers: tomek, atul, ashoat

Reviewed By: tomek, atul, ashoat

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D5882

Details

Provenance
Michal Gniadek <michal.gniadek@swmansion.com>Authored on Dec 15 2022, 5:56 AM
Reviewer
tomek
Differential Revision
D5882: [desktop] Base windows config
Parents
rCOMMf34c27d12aa5: [Nix Docs] Update macOS support status
Branches
Unknown
Tags
Unknown

Event Timeline

Michal Gniadek <michal.gniadek@swmansion.com> committed rCOMMbb86d015a124: [desktop] Base windows config (authored by Michal Gniadek <michal.gniadek@swmansion.com>).Dec 29 2022, 9:57 AM