electron / electron/windows-installer

`setupIcon` config failed when `productName` contains chinese character ;`Fatal error: Unable to load file`

Open
#490 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.6k
Forks
267
Avg merge
5h 38m
Merged PRs (30d)
1

Description

## Reproduce Steps
Clone this repo `https://github.com/rosendolu/electron-app-debug`

```sh
git clone https://github.com/rosendolu/electron-app-debug
npm i
npm run make
```
```js
// forge.config.js
...,
{
name: '@electron-forge/maker-squirrel',
config: {
// The ICO file to use as the icon for the generated Setup.exe
setupIcon: path.resolve(__dirname, './icon/app.ico'),
},
},
```
```json
// package.json
...,
"name": "electron-app",
"productName":"electron中文",
```

You will got this error

![img_v2_1cb741c3-2fbe-45da-b866-e32145406c6g](https://github.com/electron/windows-installer/assets/42633099/51ed3eae-4769-4be4-8d90-eb935b9aef62)

But if you remove the chinese characters of `productName` in `package.json`
```json
// package.json
...,
"name": "electron-app",
"productName":"electron",
```
Or just remove the custom setupIcon conf
```js
// forge.config.js
...,
{
name: '@electron-forge/maker-squirrel',
config: {
// The ICO file to use as the icon for the generated Setup.exe
// setupIcon: path.resolve(__dirname, './icon/app.ico'),
},
},
```
Every works well !

As above pic shows , `spawn` process exit with `code 1`,but I can`t figure out how to solve it ,any advice would be grateful.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.