[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:
- During packaging it creates an .exe that contains our app, Update.exe and installation logic
- When a user runs this executable, it unpacks everything
- 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
- 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