vue-cli-plugin-electron-builder icon indicating copy to clipboard operation
vue-cli-plugin-electron-builder copied to clipboard

Adding icon.png in build/icons crashes the build

Open chrisbakr opened this issue 2 years ago • 5 comments

goroutine 1 [running]: github.com/develar/app-builder/pkg/icons.doConvertIcon(0xc000145340, 0x4, 0x4, 0xc000147a60, 0x2, 0x2, 0x7ffeefbfe979, 0x3, 0x7ffeefbfea03, 0x4d, ...) /Volumes/data/Documents/app-builder/pkg/icons/icon-converter.go:220 +0x10e5 github.com/develar/app-builder/pkg/icons.ConvertIcon(0xc000145240, 0xc000145300, 0xc00021fc08, 0x97) /Volumes/data/Documents/app-builder/pkg/icons/icon-converter.go:56 +0xd6 github.com/develar/app-builder/pkg/icons.ConfigureCommand.func1(0xc0002b83f0, 0x100cee5, 0x181ee80) /Volumes/data/Documents/app-builder/pkg/icons/icon-converter.go:33 +0x7f github.com/alecthomas/kingpin.(*actionMixin).applyActions(0xc000196e58, 0xc0002b83f0, 0x0, 0x0) /Volumes/data/go/pkg/mod/github.com/alecthomas/[email protected]+incompatible/actions.go:28 +0x6d github.com/alecthomas/kingpin.(*Application).applyActions(0xc000166780, 0xc0002b83f0, 0x0, 0x0) /Volumes/data/go/pkg/mod/github.com/alecthomas/[email protected]+incompatible/app.go:557 +0xdf github.com/alecthomas/kingpin.(*Application).execute(0xc000166780, 0xc0002b83f0, 0xc000279220, 0x1, 0x1, 0x0, 0x0, 0x0, 0xc0002d7260) /Volumes/data/go/pkg/mod/github.com/alecthomas/[email protected]+incompatible/app.go:390 +0x95 github.com/alecthomas/kingpin.(*Application).Parse(0xc000166780, 0xc000134010, 0x9, 0x9, 0xc000166780, 0xc000108058, 0x10014b0, 0x0) /Volumes/data/go/pkg/mod/github.com/alecthomas/[email protected]+incompatible/app.go:222 +0x228 main.main() /Volumes/data/Documents/app-builder/main.go:90 +0x2c7

..exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE

chrisbakr avatar Jul 09 '21 09:07 chrisbakr

if icon.png is added in build folder and not build/icons it works

chrisbakr avatar Jul 09 '21 11:07 chrisbakr

Yes. Just like you.

hustfyb avatar Jul 29 '21 06:07 hustfyb

if icon.png is added in build folder and not build/icons it works

This works for me to a custom icon.

Edit: Seem working by following here https://www.electron.build/icons.html#windows-nsis

nakorndev avatar Oct 26 '21 08:10 nakorndev

Got this compilation bug also. Moving it to build/icon.png fixes the compilation and I see the icon for the .exe but when launching the production executable it doesn't show in the taskbar.

Am I meant to add icon: something to my BrowserWindow config too?

Jazcash avatar Nov 01 '21 17:11 Jazcash

Got this compilation bug also. Moving it to build/icon.png fixes the compilation and I see the icon for the .exe but when launching the production executable it doesn't show in the taskbar.

Am I meant to add icon: something to my BrowserWindow config too?

Yes

import path from 'path'
new BrowserWindow({
  icon: path.resolve(__static, 'icon.png')
})

klren0312 avatar Nov 02 '21 01:11 klren0312