Detect system architecture; send in update/telemetry

Detect the actual operating system CPU architecture. This is different
than `process.arch` which returns the architecture the binary was
compiled for.

This is just good info to have in the telemetry, but we're also sending
it in the update check so that eventually we can upgrade Windows 32-bit
apps to 64-bit, like Slack does.

Context:
https://github.com/feross/webtorrent-desktop/issues/873#issuecomment-247
722023
This commit is contained in:
Feross Aboukhadijeh
2016-09-16 19:24:21 -07:00
parent e1ba9c89fe
commit 7415d3cee5
3 changed files with 34 additions and 1 deletions

View File

@@ -105,6 +105,7 @@ function getSystemInfo () {
osPlatform: process.platform,
osRelease: os.type() + ' ' + os.release(),
architecture: os.arch(),
systemArchitecture: config.OS_SYSARCH,
totalMemoryMB: roundPow2(os.totalmem() / (1 << 20)),
numCores: os.cpus().length
}