Page MenuHomePhabricator

[desktop] Embed windows runtime installer
ClosedPublic

Authored by michal on Mar 30 2023, 7:05 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 16, 11:47 PM
Unknown Object (File)
Wed, Dec 4, 3:31 AM
Unknown Object (File)
Wed, Dec 4, 3:31 AM
Unknown Object (File)
Wed, Dec 4, 3:31 AM
Unknown Object (File)
Wed, Dec 4, 3:31 AM
Unknown Object (File)
Nov 10 2024, 8:36 PM
Unknown Object (File)
Nov 10 2024, 8:36 PM
Unknown Object (File)
Nov 10 2024, 8:34 PM
Subscribers

Details

Summary

ummary:
We need to run the Windows runtime installer in case the user doesn't have the correct windows api dependencies (in the "packaged" apps this is specified in the app manifest but we distribute just an .exe so we can't use that). This diff downloads an installer from microsoft and embeds it inside our app. Then during installation the squirrel framework run our app in case we need to do some initialization (only on windows). Currently we just setup some shortcuts but now we will also run the runtime installer.
I've included gaxios dependency to make the https requests easier, we already use it in some scripts.

Test Plan
  • yarn make to create an installer
  • Run get-appxpackage *appruntime* to check that the dependiecies aren't already installed (this command was taken from this Microsoft tutorial)
  • Install the app and check that it works
  • Run get-appxpackage command again and check if the components were installed

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

michal edited the test plan for this revision. (Show Details)
ashoat added inline comments.
desktop/package.json
48 ↗(On Diff #24389)

Ideally we'd use fetch API. Once our Nix environment is updated to Node 17.5 or higher, we can use an "experimental" (probably fine) version of fetch that is bundled into Node.js. Until then, I'd rather we use node-fetch than this, but I guess we already have some usages of gaxios in the codebase, and fetch might be more complicated to make pipe into a Node.js stream

This revision is now accepted and ready to land.Mar 30 2023, 8:25 AM