Skip to content

Detect os platform version x64 vs. ia32 [Linux, Win] #6044

@vojtatranta

Description

@vojtatranta

Hi and thank you,
we were releasing our product just as 32bits version. Now we want to ship x64 too.

We want to notify users with x64 capable computer that they should rather use x64 app.
However, it seems it is really complicated to detect PC architecture in Electron.
Since require('os').arch() cares about node version we have no other way to reliably determine whether user's computer is x64 capable or not, because Electron runs it's own nodejs. So on x64 capable machine I get from require('os').arch() -> //ia32, because Electron runs 32bits nodejs (build is done with 32bits, we would like to notify user that x64 is available).

Is there any way how can I detect it? Something like:
const arch = require('electron').arch()?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions