electron-builder icon indicating copy to clipboard operation
electron-builder copied to clipboard

Windows build fail since the icon.ico at wrong position.

Open asika32764 opened this issue 1 year ago • 7 comments

  • Electron-Builder Version: 24.6.3
  • Node Version: v16.20.0
  • Electron Version: 25.3.2
  • Electron Type (current, beta, nightly): current
  • Target: win portable

Windows build will fail because the icon.ico will put to ${version}/.icon-ico/ dir, not x.x.x/.icon-ico/ dir.

p-001-2023-08-04-01-03-28

Error message

Error output: Error while loading icon from "E:...\release\0.0.0.icon-ico\icon.ico": can't open file failedTask=build stackTrace=Error: C:\Users\xxx\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\Bin\makensis.exe process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE

The config file:

appId: xxx
asar: false
directories:
    output: release/${version}

files:
    - dist
    - electron

icon: public/editor-icon.png

win:
    target:
        - target: portable
          arch:
              - x64
    artifactName: "${productName}_${version}.${ext}"

NOTE: Building in MacOS works well, only fail in Windows.

asika32764 avatar Aug 03 '23 17:08 asika32764

I can confirm that I have the same problem.

KaliaJS avatar Aug 11 '23 00:08 KaliaJS

Yep, I'm also having the same problem.

ColtenP avatar Aug 16 '23 18:08 ColtenP

Same issue 🫤 any workarounds?

six-edge avatar Oct 05 '23 17:10 six-edge

I can also reproduce the issue.

image

Seems to be the follow issue with the

image

Changing the output directory to remove the ${version} fixed it for now e.g.

{
  "directories": {
    "output": "release",
  },
}

abarke avatar Oct 05 '23 18:10 abarke

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Dec 16 '23 00:12 github-actions[bot]

Is there a proper solution to this other than hardcoding the version in the file?

mangledbottles avatar Dec 21 '23 23:12 mangledbottles

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Feb 20 '24 00:02 github-actions[bot]

This issue was closed because it has been stalled for 30 days with no activity.

github-actions[bot] avatar Apr 25 '24 00:04 github-actions[bot]