Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rosendolu opened this issue Nov 3, 2023 · 2 comments

Comments

@rosendolu
Copy link

Reproduce Steps

Clone this repo https://github.com/rosendolu/electron-app-debug

git clone https://github.com/rosendolu/electron-app-debug
npm i 
npm run make
// 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'),
      },
    },
// package.json
...,
  "name": "electron-app",
  "productName":"electron中文",

You will got this error

img_v2_1cb741c3-2fbe-45da-b866-e32145406c6g

But if you remove the chinese characters of productName in package.json

// package.json
...,
  "name": "electron-app",
  "productName":"electron",

Or just remove the custom setupIcon conf

// 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.

@anaisbetts
Copy link
Contributor

anaisbetts commented Nov 3, 2023

This is a still-open bug in Squirrel.Windows at the moment, I'm not sure that there is any way to fix it at the moment other than by using Roman characters in the name, sorry :(

@siadou
Copy link

siadou commented Oct 30, 2024

enable utf-8 on windows can solve this issue. follow the page below.
https://exploratory.io/note/exploratory/Enabling-UTF-8-on-Windows-hYc3yWL0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants