-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Squirrel Startup Exe Icon missing #1790
Comments
@AzonInc have you figured out what was going on yourself? I've been looking into it and may have some insight. What does your |
Hi, @easternmotors . Here the relevant package json part:
|
Did anyone manage to get to the bottom of this? Best we can tell, there may be a stale icon in some registry entry somewhere. |
@thorsent no, still experiencing this issue. It only seems to be an issue when one of the variable which has a fallback of |
@AzonInc, I had a similar issue with the icon and upon doing some research, I discovered that the ID (name in package.json) should not contain dots or spaces. I had a dot in the name, so I changed it to a dash. However, this did not resolve the issue. Then, I tried removing all non-alphabetical characters, and after making this change, the icon started to work properly. |
I followed @lukasz-mical's advice and removed the spaces from my This fixed the setup.exe icon on Windows for me. |
My support team informs me that some antivirus programs may prevent rcedit from modifying the icon (perceiving it as an attack on an executable). Setting environment variable Not sure if this is therefore independent of the reported issues with spaces and other non-alphabetical characters. |
I've encountered an issue with my Electron app where it appears that a variable, which has a fallback to packageJSON.name, is not being correctly overwritten by productName. This is causing problems with path lookups and potentially stale icon entries in the Windows registry. ContextHere is the relevant part of my package.json: {
"name": "deepfakeinspector",
"productName": "Deepfake Inspector",
"version": "1.0.2-dev",
"description": "Stay ahead of deepfakes",
"main": ".vite/build/index.js",
"scripts": {
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"make:win-arm64": "electron-forge make --arch=arm64",
"publish": "electron-forge publish",
"lint": "eslint --ext .ts,.tsx ."
}
} And here is my forge.config.ts: import type { ForgeConfig } from '@electron-forge/shared-types';
import { MakerSquirrel } from '@electron-forge/maker-squirrel';
import { MakerZIP } from '@electron-forge/maker-zip';
import { MakerDeb } from '@electron-forge/maker-deb';
import { MakerRpm } from '@electron-forge/maker-rpm';
import { VitePlugin } from '@electron-forge/plugin-vite';
import { FusesPlugin } from '@electron-forge/plugin-fuses';
import { FuseV1Options, FuseVersion } from '@electron/fuses';
import { APP_PROTOCOL_NAME } from './src/common/constants';
const config: ForgeConfig = {
packagerConfig: {
icon: 'public/images/icon',
asar: false,
protocols: [
{
name: 'Deepfake Inspector',
schemes: [APP_PROTOCOL_NAME],
},
],
},
rebuildConfig: {},
makers: [
new MakerSquirrel({
setupIcon: 'public/images/icon.ico',
iconUrl: 'https://d30nwnnt92yl6b.cloudfront.net/icon.ico',
loadingGif: 'public/images/loading.gif',
skipUpdateIcon: true,
}),
new MakerZIP({}, ['darwin']),
new MakerRpm({}),
new MakerDeb({}),
],
plugins: [
new VitePlugin({
build: [
{
entry: 'src/main/index.ts',
config: 'vite.main.config.ts',
},
{
entry: 'src/preload/index.ts',
config: 'vite.preload.config.ts',
},
],
renderer: [
{
name: 'main_window',
config: 'vite.renderer.config.ts',
},
],
}),
new FusesPlugin({
version: FuseVersion.V1,
[FuseV1Options.RunAsNode]: false,
[FuseV1Options.EnableCookieEncryption]: true,
[FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false,
[FuseV1Options.EnableNodeCliInspectArguments]: false,
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true,
[FuseV1Options.OnlyLoadAppFromAsar]: false,
}),
],
};
export default config; IssueThe problem seems to arise when the productName variable is set. Despite this, somewhere in the build process, it appears to fall back to using packageJSON.name, causing a failed path lookup. This has led to issues such as stale icons in the registry. Attempts to ResolveI have tried the following solutions without success:
Request for HelpHas anyone else encountered this issue? If so, how did you resolve it? Any insights or solutions would be greatly appreciated. Thank you! |
@panda6412: If it's still helpful for you, I've documented a working setup here: electron-forge/electron-forge-docs#209 |
I'm generating Setup Files witrh the Electron-Forge Squirrel Maker.
However after trying several things and seraching for similar Issues, its not possible to get the App Icon working.
It's still the default Package Icon, which shouldn't be there (see: Restaurant Companion.exe)
The Packaged App has the correct Icon assigned (Restaurant Companion.exe, squirrel.exe):
The Control Panel Icon is also correct:
My Forge Config:
The text was updated successfully, but these errors were encountered: