I've the following configuration in my package.json
:
"config": {
"forge": {
"makers": [
{
"name": "@electron-forge/maker-dmg"
},
{
"name": "@electron-forge/maker-squirrel"
},
{
"name": "@electron-forge/maker-zip"
}
],
"packagerConfig": {
"icon": "./assets/icons/api-2#016ed84e/img/128x128"
}
}
},
where the assets
folder looks like below:
% ls -lh assets/icons/api-2\#016ed84e/img/128x128.*
-rw-r--r-- 1 7.3K assets/icons/api-2#016ed84e/img/128x128.icns
-rw-r--r-- 1 66K assets/icons/api-2#016ed84e/img/128x128.ico
-rw-r--r-- 1 6.2K assets/icons/api-2#016ed84e/img/128x128.png
I'm somehow under the impression, than when I run now npm run make
under MacOS, then the .icns
file suffix gets auto-magically appended to the value of icon
, which is then used by the @electron-forge/maker-dmg
maker.
However, I'm simply unable to have the default value of electron.icns
for CFBundleIconFile
changed to my assets/.../128x128.icns
in the resulting Info.plist
, which is listed below:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>18E226</string>
<key>CFBundleDisplayName</key>
<string>API Explorer</string>
<key>CFBundleExecutable</key>
<string>API Explorer</string>
<key>CFBundleIconFile</key>
<string>electron.icns</string>
<key>CFBundleIdentifier</key>
<string>com.electron.api-explorer</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>API Explorer</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.1</string>
<key>CFBundleVersion</key>
<string>1.0.1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTSDKBuild</key>
<string>10.15</string>
<key>DTSDKName</key>
<string>macosx10.15</string>
<key>DTXcode</key>
<string>1110</string>
<key>DTXcodeBuild</key>
<string>11A1027</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.developer-tools</string>
<key>LSMinimumSystemVersion</key>
<string>10.10.0</string>
<key>NSCameraUsageDescription</key>
<string>This app needs access to the camera</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app needs access to the microphone</string>
<key>NSPrincipalClass</key>
<string>AtomApplication</string>
<key>NSQuitAlwaysKeepsWindows</key>
<false/>
<key>NSRequiresAquaSystemAppearance</key>
<false/>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
</dict>
</plist>
Even, when I provide the full icon name like below it does not work:
"packagerConfig": {
"icon": "./assets/icons/api-2#016ed84e/img/128x128.icns"
}
Is this is bug, or am I operating under wrong assumptions? I also tried the following approach without any success:
"config": {
"forge": {
"makers": [
{
"config": {
"icon": "./assets/icons/api-2#016eaa4f7069c01b91bd21b68170d84e/img/128x128.icns"
},
"name": "@electron-forge/maker-dmg"
},
{
"name": "@electron-forge/maker-squirrel"
},
{
"name": "@electron-forge/maker-zip"
}
],
"packagerConfig": {
"icon": "./assets/icons/api-2#016eaa4f7069c01b91bd21b68170d84e/img/128x128"
}
}
},