You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When quasar build -m electron is issued, the src-electron/icons folder is not copied to the dist/electron/unpackaged folder and therefore will not be packaged into the final electron build.
Additional context
I tried to find the code in @quasar/app that should do the copying but have not located it yet. I did set a breakpoint in vs code to stop the build. I manually copied the icons folder to unpackaged. I then let the build continue. When running the output on Ubuntu, the icon now shows up for the running app. On windows, the executable and setup both have embedded icons, and running the app shows the icon on the dock bar.
Also, for the icons to work, I added the following code in electron-main.js (note: this also works for dev):
* fix(app): Electron - missing icons folder in build (#11087)
* fix(app) - additional changes to electron-main.js
The fixes include:
1. 'process.platform' is undefined if `nodeIntegration` is not true. Fall back to using `os.platform()`
2. Resolve which icon to use based on platform Electron is running on
3. Inject icon path into BrowserWindow (with previous commit this now works with both dev and build)
* revert(app): fse.copySync for electron icons
* feat(app): use CopyWebpackPlugin to copy electron icons
* chore(app): modified a comment
* Update create-chain.js
Co-authored-by: Razvan Stoenescu <razvan.stoenescu@gmail.com>
Describe the bug
When
quasar build -m electron
is issued, thesrc-electron/icons
folder is not copied to thedist/electron/unpackaged
folder and therefore will not be packaged into the final electron build.Codepen/jsFiddle/Codesandbox (required)
Fork a Codepen (https://codepen.quasar.dev) or a jsFiddle (https://jsfiddle.quasar.dev) or a Codesandbox (https://codesandbox.quasar.dev) and hit save then copy-paste link here.
To Reproduce
Steps to reproduce the behavior:
quasar build -m electron
dist/electron/unpackaged
foldericons
folderExpected behavior
You'd expect the icons folder to be copied over
Screenshots
I have verified this for both Linux and Windows, but have not for Mac (but, assume it's the same)
Platform (please complete the following information):
Quasar Version:
@quasar/app Version:
Build mode........ electron
Pkg quasar........ v2.1.9
Pkg @quasar/app... v3.1.5
Quasar mode:
Tested on:
OS: windows 11/ubuntu 20.04.3
Node: 14.18.1
NPM: 6.14.15
Yarn: 1.22.15
Browsers:
iOS:
Android:
Electron:
"electron": "^15.3.0",
"electron-builder": "^22.4.0",
"electron-packager": "^15.2.0",
Additional context
I tried to find the code in
@quasar/app
that should do the copying but have not located it yet. I did set a breakpoint in vs code to stop the build. I manually copied the icons folder to unpackaged. I then let the build continue. When running the output on Ubuntu, the icon now shows up for the running app. On windows, the executable and setup both have embedded icons, and running the app shows the icon on the dock bar.Also, for the icons to work, I added the following code in
electron-main.js
(note: this also works fordev
):If I can figure this out, I will create a PR.
The text was updated successfully, but these errors were encountered: