Squirrel.Windows
Squirrel.Windows copied to clipboard
Squirrel Startup Exe Icon missing
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:
const path = require('path');
const package = require('./package.json');
module.exports = {
packagerConfig: {
asar: true,
icon: path.resolve(__dirname, 'src', 'assets', 'images', 'icon.ico')
},
makers: [
{
name: '@electron-forge/maker-squirrel',
platforms: ['win32'],
config: (arch) => {
return {
name: 'RestaurantCompanion',
authors: 'Brogli Informatik GmbH',
exe: 'Restaurant Companion.exe',
noMsi: true,
remoteReleases: '',
loadingGif: path.resolve(__dirname, 'src', 'assets', 'images', 'setup-animation.gif'),
setupExe: `RestaurantCompanion-${package.version}-setup-${arch}.exe`,
setupIcon: path.resolve(__dirname, 'src', 'assets', 'images', 'icon.ico'),
iconUrl: "https://REMOVED/restaurant-companion/icon.ico",
signWithParams: process.env['WINDOWS_CODESIGN_ARGS']
}
}
},
{
name: '@electron-forge/maker-zip',
platforms: ['darwin', 'win32']
},
{
name: '@electron-forge/maker-deb',
platforms: ['linux']
},
{
name: '@electron-forge/maker-rpm',
platforms: ['linux']
}
]
};
@AzonInc have you figured out what was going on yourself? I've been looking into it and may have some insight. What does your package.json
look like? Specifically the productName
and name
fields.
Hi, @easternmotors . I was not able to get it working yet.
Here the relevant package json part:
"name": "restaurant-companion",
"productName": "Restaurant Companion",
"version": "1.6.0-beta.5",
"description": "Restaurant CMS - Companion App",
"main": "src/main.js",
"scripts": {
"install": "electron-rebuild",
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make --platform win32",
"publish": "electron-forge publish",
"version": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md"
},
"keywords": [],
"author": {
"name": "BIT GmbH",
"email": "[email protected]"
},
"license": "MIT",
"config": {
"forge": "./forge.config.js"
},```
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 packageJSON.name
is overwritten (like productName
in the example from @AzonInc above -- if not set it defaults to packageJSON.name
). If I had to guess, the issue is that somewhere it is pulling the variable from packageJSON.name
for a path instead of the custom name being set, causing a failed lookup -- but this is just a guess. I haven't had time in a while to dive into the root cause.
@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 packagerConfig.name
in my forge.config.js
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 DEBUG=*
causes rcedit to output logs which may help trace when this happens.
Not sure if this is therefore independent of the reported issues with spaces and other non-alphabetical characters.