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

[icons] Use buildResources folder #771

Merged
merged 2 commits into from
Feb 11, 2020

Conversation

nsakaimbo
Copy link
Contributor

Use buildResources Folder for App Icons

This PR updates the application icon folder structure and declarations to be aligned with updated electron-builder documentation. Specifically, we streamline the usage of application icons by:

  • Removing direct icon references for each platform in package.json, and replacing with a buildResources directory instead
  • Removing the linux-specific icon so electron-builder can use icon.icns for both Linux and Mac (per the docs)

Per the docs, icons in buildResources will automatically be detected and used accordingly as follows:

  • icon.icns -- Mac and Linux (installers and applications)
  • background.png and [email protected] (Mac DMG backgrounds)
  • icon.ico -- Windows (installer and application)

I have tested the built artifacts on all platforms and confirmed the icons are used as expected. 🎉 The end-result is we have fewer assets to track and update on an ongoing basis, with the added benefit of allowing electron-builder to do the heavy lifting without explicit references in package.json.

In addition, specifying the icons this way may mitigate the symptom of "icon caching" (ref), where the new application icon is not used until a system restart. (Confirmed this is due to behavior at the system level and not an Electron-specific quirk).

@nsakaimbo nsakaimbo requested a review from loremattei February 11, 2020 19:33
Copy link
Contributor

@loremattei loremattei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This matches the documentation, so :shipit:

@nsakaimbo nsakaimbo merged commit b98ad97 into release/5.0.0 Feb 11, 2020
@nsakaimbo nsakaimbo deleted the use-build-resources-folder branch February 12, 2020 16:45
nsakaimbo added a commit that referenced this pull request Feb 26, 2020
### Changes include:

* [notarization] Revert workaround for buggy after\_sign\_hook (#782)

* [icons] Use buildResources folder (#771)

  Updates the application icon folder structure and declarations to be aligned with updated electron-builder documentation. Specifically, we streamline the usage of application icons by:

  - Removing direct icon references for each platform in package.json, and replacing with a top-level buildResources directory
  - Removing the linux-specific icon so electron-builder can use icon.icns for both Linux and Mac (per the docs)

  Per the docs, icons in buildResources will automatically be detected and used accordingly as follows:

    - icon.icns -- Mac and Linux (installers and applications)
    - background.png and [email protected] (Mac installer backgrounds)
    - icon.ico -- Windows (installer and application)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants