chore(desktop): brand dev-time app name as ShengxinPush
setName pins the runtime app name (menu bar, task switcher) and setAboutPanelOptions overrides the macOS About panel which is sourced separately from Info.plist when running unpackaged. Packaged builds are unaffected: electron-builder productName "省心推" still drives the .app bundle and NSIS installer metadata. The macOS Dock label in dev still shows "Electron" because that comes from the unpacked Electron.app bundle's CFBundleName, which is outside Electron's API surface. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -63,6 +63,24 @@ import { initTray, showTrayBalloon } from './tray'
|
||||
import { STANDARD_USER_AGENT } from './user-agent'
|
||||
import { startHotViewReaper } from './view-pool'
|
||||
|
||||
// In dev (no packaged Info.plist / NSIS metadata) Electron falls back to the
|
||||
// generic "Electron" name, so the macOS menu bar and Windows task switcher
|
||||
// show "Electron". Pin the dev-time app name to the product brand. Packaged
|
||||
// builds ignore this because Info.plist `CFBundleName` (driven by
|
||||
// electron-builder `productName`) takes precedence.
|
||||
app.setName('ShengxinPush')
|
||||
|
||||
// The macOS "About" panel pulls from a separate options bag — `setName` alone
|
||||
// leaves it as "Electron 41.x". Set explicit copy here so the dev About dialog
|
||||
// matches the brand. Packaged macOS again wins via Info.plist.
|
||||
app.setAboutPanelOptions({
|
||||
applicationName: 'ShengxinPush',
|
||||
applicationVersion: app.getVersion(),
|
||||
version: app.getVersion(),
|
||||
copyright: 'Copyright © 2026 shengxintui.com',
|
||||
website: 'https://shengxintui.com',
|
||||
})
|
||||
|
||||
app.commandLine.appendSwitch(
|
||||
'disable-features',
|
||||
'PostQuantumKyber,EncryptedClientHello,UseDnsHttpsSvcb,UseDnsHttpsSvcbAlpn',
|
||||
|
||||
Reference in New Issue
Block a user