Electron App Name & Icon single source of truth / documentation
- Dominant language
- TypeScript
- Stars
- 7.1k
- Forks
- 641
- Avg merge
- 3d 17m
- Merged PRs (30d)
- 32
Description
### Pre-flight checklist
- [X] I have read the [contribution documentation](https://github.com/electron/forge/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [code of conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project uses.
- [X] I have searched the issue tracker for a bug that matches the one I want to file, without success.
### Electron Forge version
7.4.0
### Electron version
v31.2.1
### Operating system
MacOS 14.2.1 (23C71) / Macbook Air M1 Apple Silicon
### Last known working Electron Forge version
_No response_
### Expected behavior
**Forge Config** file should be the **single source of truth** to configure Electron Forge apps in **dev** and **staging** especially for App Name and Icons
### Actual behavior
My team and I are part of a commercial project, soon to be open sourced, that created Multi Platform apps out of a single JS Codebase. We use Electron under the hood and shifting from `electron-builder` to `forge`.
#### Changing `package.json`, `name` and `productName` fields as well as the `name` field in `packagerConfig` in `forge.config.ts` to the following values:
## In Dev Mode
Running `npm run start`
### App Name
The App name as seen on the mac is still "Electron"

### Electron Menu
As you can see here the Oval is still "Electron" while the default menu in rectangles is picking up the name from `productName` from `package.json`.

## After MAKE
Running `npm run make`
### App Name
The App Name is packaged correctly like so
The Binary is also correct like so
So is the App name in the Mac OS Dock
The App Name in the Mac Menubar is right but again the default menu picks up from `package.json`
## The Problem
1. Can we have consistent behaviour across Dev and Make?
2. Can we have a single source of truth ie the *Forge Config* that sets the App Icon and Name across Menus, Binaries and other OS Level places?
3. If not, can we update the documentation to reflect _when & where_ the App name is set, in the Forge website itself?
4. There is a very similar issue with the App Icon as well. Based on the feedback on this issue, I will post a detailed Issue for that as well.
My Team & I can definitely contribute here, but if someone can just point us in the right direction in terms of the codebase, that would be great!
## Is this a [Core Electron](https://github.com/electron/electron) Issue?
Yes it might be, however one of the reasons why we chose forge over something like *electron-builder* is as per what's given [here, in the Forge Website](https://www.electronforge.io/core-concepts/why-electron-forge#forge-vs.-builder)
>
Hence, our team understood that there's a strong communication channel in both Core Electron and Forge, maybe even shared maintainers?
### Apologies
Apologies if I've posted this in the wrong Repo, maybe one of the shared core maintainers can guide me on where to post this / how to fix this in the core Electron Repo?
### Steps to reproduce
Run the Forge Init in an empty folder as given in the documentation
Make no Changes to Code.
Run to start dev
```asm
npm run start
```
Run to build the binary
```asm
npm run make
```
Then run the binary
Contributor guide
Assessment
This issue has not been assessed yet.