electron-builder
electron-builder copied to clipboard
Unexcept directory created when icon needs transformat
- Electron-Builder Version: 23.5.0
- Node Version: v16.13.2 and v18
- Electron Version: 20.0.3
- Electron Type (current, beta, nightly): current
- Target: Windows (Unexcept behavior), macOS (Build successfully)
I started build after added a .png
icon and received a build error, shows cannot find icon files in ${target directory}/.icon-ico\icon.ico
.
I check the code in node_modules and source code on github, finally located error is in file packages/app-builder-lib/src/platformPackager.ts#L684. The variable config.directories.output
is not expanded, my configuration is release/${version}
, and I got a directory named ${version}
.
Something is weird on my mac, electron-builder also created ${version}
directory, but app can be built successfully with icon.
My temporary solution is saving different format of icon to my buildResources
directory.
The variable
config.directories.output
is not expanded
This functionality was never supported. Happy to accept a PR if you'd like to contribute! Setting up a local dev environment is fairly straight forward too https://github.com/electron-userland/electron-builder/blob/master/CONTRIBUTING.md#to-setup-a-local-dev-environment
ok, I will do it in few days, I need test on different platforms and CI
I forked the repo and create a branch to commit code, and I need some help.
Q: How to test modified electron-builder
with custom configuration (specified arch and os) or for an existed electron project? I ran pnpm test
but it took too long.
Use TEST_FILES=UPDATE_SNAPSHOT=true
for updating snapshots.
For custom configuration, can you elaborate more? What arch are you trying to run for?
Use TEST_FILES= to specify the exact tests you're looking to run.
UPDATE_SNAPSHOT=true
for updating snapshots. For custom configuration, can you elaborate more? What arch are you trying to run for?
I want to test on x64-windows portable exe
, the issue is only found on this platform. I also want to figure out why ( I'm noob, sorry).
My project:
MaaAssistantArknights/MaaAsstElectronUI
I defined the buildResource
directory where icon.png
placed.
Do I need to set TEST_FILES=$project_directory
and start pnpm test
?
CI is running when I am writing this comment.
It's the name of the test file(s) comma-separated :)
Example: TEST_FILES=masTest pnpm test-all