Electron-builder: Change macOS "Standard Menu Item Actions" app name

Created on 13 Jan 2018  Â·  5Comments  Â·  Source: electron-userland/electron-builder

  • Electron version: 1.7.10
  • Electron builder: 19.52.1
  • Target: macOS

Given package.json

{
    "name": "barcode-to-pc-server",
    ...
    "build": {
        "productName": "Barcode to PC server",
        ...
    }
    ...
}

Expected behavior

I expected to see the package.json>build>productName in the application menu>About/Hide/Quit
Is there another property for that?

Actual behavior

I see the package.json>name in the application menu
image

docs: https://electronjs.org/docs/api/menu#standard-menu-item-actions

backlog

Most helpful comment

In your main.js (Main Electron file) towards the top have
app.setName("Your New Name");

https://electronjs.org/docs/api/app#appsetnamename

If that doesn't work I set productName at the top of my package.json also. Outside of build

All 5 comments

In your main.js (Main Electron file) towards the top have
app.setName("Your New Name");

https://electronjs.org/docs/api/app#appsetnamename

If that doesn't work I set productName at the top of my package.json also. Outside of build

app.setName("Your New Name"); worked, thanks

Apologies for bumping a slightly unrelated issue, but is there a way to completely remove the "About ..." menu item? I looked through the configuration documentation but didn't see anything that stood out.

@alexlyp
•1 You can set a new Menu by following this example found in the doc here. You can custom this Menu by adding/removing what you need.

•2 Below the condition specific for Mac OS X which is if (process.platform === 'darwin') you can remove the object {role: 'about'} and you won't see the About xxx label anymore.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings