Skip to content
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

fix(app-builder-lib): macOS packager uses static icon name #6308

Merged
merged 3 commits into from
Oct 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/dirty-walls-burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-builder-lib": patch
---

The filename of the app icon in macOS is now always 'icon.icns' instead of a derivate of the product name. The reason for this change is that macOS doesn't display icons with non-ASCII characters in their names, which is quite possible in languages other than English.
2 changes: 1 addition & 1 deletion packages/app-builder-lib/src/macPackager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ export default class MacPackager extends PlatformPackager<MacConfiguration> {
if (oldIcon != null) {
await unlinkIfExists(path.join(resourcesPath, oldIcon))
}
const iconFileName = `${appFilename}.icns`
const iconFileName = "icon.icns"
appPlist.CFBundleIconFile = iconFileName
await copyFile(icon, path.join(resourcesPath, iconFileName))
}
Expand Down
6 changes: 3 additions & 3 deletions test/snapshots/PublishManagerTest.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ exports[`generic, github and spaces 2`] = `
Object {
"CFBundleDisplayName": "Test App ßW",
"CFBundleExecutable": "Test App ßW",
"CFBundleIconFile": "Test App ßW.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "Test App ßW",
Expand Down Expand Up @@ -289,7 +289,7 @@ exports[`mac artifactName 2`] = `
Object {
"CFBundleDisplayName": "Test App ßW",
"CFBundleExecutable": "Test App ßW",
"CFBundleIconFile": "Test App ßW.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "Test App ßW",
Expand Down Expand Up @@ -366,7 +366,7 @@ exports[`os macro 2`] = `
Object {
"CFBundleDisplayName": "Test App ßW",
"CFBundleExecutable": "Test App ßW",
"CFBundleIconFile": "Test App ßW.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "Test App ßW",
Expand Down
28 changes: 14 additions & 14 deletions test/snapshots/mac/dmgTest.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ exports[`background color 3`] = `
Object {
"CFBundleDisplayName": "BackgroundColor",
"CFBundleExecutable": "BackgroundColor",
"CFBundleIconFile": "BackgroundColor.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "BackgroundColor",
Expand Down Expand Up @@ -94,7 +94,7 @@ exports[`bundleShortVersion 2`] = `
Object {
"CFBundleDisplayName": "BundleShortVersion",
"CFBundleExecutable": "BundleShortVersion",
"CFBundleIconFile": "BundleShortVersion.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "BundleShortVersion",
Expand Down Expand Up @@ -148,7 +148,7 @@ exports[`custom background - new way 2`] = `
Object {
"CFBundleDisplayName": "Test App ßW",
"CFBundleExecutable": "Test App ßW",
"CFBundleIconFile": "Test App ßW.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "Test App ßW",
Expand Down Expand Up @@ -202,7 +202,7 @@ exports[`disable dmg icon (light), bundleVersion 2`] = `
Object {
"CFBundleDisplayName": "Test App ßW",
"CFBundleExecutable": "Test App ßW",
"CFBundleIconFile": "Test App ßW.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "Test App ßW",
Expand Down Expand Up @@ -261,7 +261,7 @@ exports[`dmg 2`] = `
Object {
"CFBundleDisplayName": "DefaultDmg",
"CFBundleExecutable": "DefaultDmg",
"CFBundleIconFile": "DefaultDmg.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "DefaultDmg",
Expand Down Expand Up @@ -380,7 +380,7 @@ exports[`license buttons config 3`] = `
Object {
"CFBundleDisplayName": "Test App ßW",
"CFBundleExecutable": "Test App ßW",
"CFBundleIconFile": "Test App ßW.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "Test App ßW",
Expand Down Expand Up @@ -441,7 +441,7 @@ exports[`license en 2`] = `
Object {
"CFBundleDisplayName": "Test App ßW",
"CFBundleExecutable": "Test App ßW",
"CFBundleIconFile": "Test App ßW.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "Test App ßW",
Expand Down Expand Up @@ -502,7 +502,7 @@ exports[`license ja 2`] = `
Object {
"CFBundleDisplayName": "Test App ßW",
"CFBundleExecutable": "Test App ßW",
"CFBundleIconFile": "Test App ßW.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "Test App ßW",
Expand Down Expand Up @@ -563,7 +563,7 @@ exports[`license rtf 2`] = `
Object {
"CFBundleDisplayName": "Test App ßW",
"CFBundleExecutable": "Test App ßW",
"CFBundleIconFile": "Test App ßW.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "Test App ßW",
Expand Down Expand Up @@ -624,7 +624,7 @@ exports[`multi language license 2`] = `
Object {
"CFBundleDisplayName": "Test App ßW",
"CFBundleExecutable": "Test App ßW",
"CFBundleIconFile": "Test App ßW.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "Test App ßW",
Expand Down Expand Up @@ -707,7 +707,7 @@ exports[`no Applications link 3`] = `
Object {
"CFBundleDisplayName": "NoApplicationsLink",
"CFBundleExecutable": "NoApplicationsLink",
"CFBundleIconFile": "NoApplicationsLink.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "NoApplicationsLink",
Expand Down Expand Up @@ -766,7 +766,7 @@ exports[`no background 2`] = `
Object {
"CFBundleDisplayName": "NoBackground",
"CFBundleExecutable": "NoBackground",
"CFBundleIconFile": "NoBackground.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "NoBackground",
Expand Down Expand Up @@ -894,7 +894,7 @@ exports[`retina background as 2 png 2`] = `
Object {
"CFBundleDisplayName": "Test App ßW",
"CFBundleExecutable": "Test App ßW",
"CFBundleIconFile": "Test App ßW.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "Test App ßW",
Expand Down Expand Up @@ -955,7 +955,7 @@ exports[`unset dmg icon 2`] = `
Object {
"CFBundleDisplayName": "Test ß No Volume Icon",
"CFBundleExecutable": "Test ß No Volume Icon",
"CFBundleIconFile": "Test ß No Volume Icon.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "Test ß No Volume Icon",
Expand Down
16 changes: 8 additions & 8 deletions test/snapshots/mac/macArchiveTest.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exports[`empty installLocation 2`] = `
Object {
"CFBundleDisplayName": "Test App ßW",
"CFBundleExecutable": "Test App ßW",
"CFBundleIconFile": "Test App ßW.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "Test App ßW",
Expand Down Expand Up @@ -77,7 +77,7 @@ exports[`extraDistFiles 2`] = `
Object {
"CFBundleDisplayName": "Test App ßW",
"CFBundleExecutable": "Test App ßW",
"CFBundleIconFile": "Test App ßW.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "Test App ßW",
Expand Down Expand Up @@ -159,7 +159,7 @@ exports[`only zip 2`] = `
Object {
"CFBundleDisplayName": "Test App ßW",
"CFBundleExecutable": "Test App ßW",
"CFBundleIconFile": "Test App ßW.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "Test App ßW",
Expand Down Expand Up @@ -208,7 +208,7 @@ exports[`pkg 2`] = `
Object {
"CFBundleDisplayName": "Test App ßW",
"CFBundleExecutable": "Test App ßW",
"CFBundleIconFile": "Test App ßW.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "Test App ßW",
Expand Down Expand Up @@ -257,7 +257,7 @@ exports[`pkg extended configuration 2`] = `
Object {
"CFBundleDisplayName": "Test App ßW",
"CFBundleExecutable": "Test App ßW",
"CFBundleIconFile": "Test App ßW.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "Test App ßW",
Expand Down Expand Up @@ -306,7 +306,7 @@ exports[`pkg scripts 2`] = `
Object {
"CFBundleDisplayName": "Test App ßW",
"CFBundleExecutable": "Test App ßW",
"CFBundleIconFile": "Test App ßW.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "Test App ßW",
Expand Down Expand Up @@ -405,7 +405,7 @@ Array [
"Test App ßW.app/Contents/Resources/sw.lproj",
"Test App ßW.app/Contents/Resources/ta.lproj",
"Test App ßW.app/Contents/Resources/te.lproj",
"Test App ßW.app/Contents/Resources/Test App ßW.icns",
"Test App ßW.app/Contents/Resources/icon.icns",
"Test App ßW.app/Contents/Resources/th.lproj",
"Test App ßW.app/Contents/Resources/tr.lproj",
"Test App ßW.app/Contents/Resources/uk.lproj",
Expand Down Expand Up @@ -791,7 +791,7 @@ exports[`tar.gz 2`] = `
Object {
"CFBundleDisplayName": "Test App ßW",
"CFBundleExecutable": "Test App ßW",
"CFBundleIconFile": "Test App ßW.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "Test App ßW",
Expand Down
12 changes: 6 additions & 6 deletions test/snapshots/mac/macPackagerTest.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ exports[`two-package 2`] = `
Object {
"CFBundleDisplayName": "TestApp",
"CFBundleExecutable": "TestApp",
"CFBundleIconFile": "TestApp.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "TestApp",
Expand Down Expand Up @@ -289,7 +289,7 @@ Object {

exports[`two-package 3`] = `
Array [
"TestApp.icns",
"icon.icns",
"app-update.yml",
"app.asar",
"bn.lproj",
Expand All @@ -301,7 +301,7 @@ exports[`two-package 4`] = `
Object {
"CFBundleDisplayName": "TestApp",
"CFBundleExecutable": "TestApp",
"CFBundleIconFile": "TestApp.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "TestApp",
Expand Down Expand Up @@ -336,7 +336,7 @@ Object {

exports[`two-package 5`] = `
Array [
"TestApp.icns",
"icon.icns",
"app-update.yml",
"app.asar",
"bn.lproj",
Expand All @@ -348,7 +348,7 @@ exports[`two-package 6`] = `
Object {
"CFBundleDisplayName": "TestApp",
"CFBundleExecutable": "TestApp",
"CFBundleIconFile": "TestApp.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleInfoDictionaryVersion": "6.0",
"CFBundleName": "TestApp",
Expand Down Expand Up @@ -383,7 +383,7 @@ Object {

exports[`two-package 7`] = `
Array [
"TestApp.icns",
"icon.icns",
"app-update.yml",
"app.asar",
"bn.lproj",
Expand Down
2 changes: 1 addition & 1 deletion test/snapshots/protonTest.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ exports[`mac 2`] = `
Object {
"CFBundleDisplayName": "Test App ßW",
"CFBundleExecutable": "Test App ßW",
"CFBundleIconFile": "Test App ßW.icns",
"CFBundleIconFile": "icon.icns",
"CFBundleIdentifier": "org.electron-builder.testApp",
"CFBundleName": "Test App ßW",
"CFBundleShortVersionString": "1.1.0",
Expand Down
Loading