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 icon incorrect in Windows Control Panel #899

Merged
merged 1 commit into from
Oct 13, 2024

Conversation

BlackHole1
Copy link
Contributor

Description

Now:
CleanShot 2024-10-12 at 14 28 26@2x

Before:
图片

Linked Issues

Additional context

Close: https://discord.com/channels/1243823539426033696/1294232031148118088

Copy link

vercel bot commented Oct 12, 2024

@BlackHole1 is attempting to deploy a commit to the RSS3 Team on Vercel.

A member of the Team first needs to authorize it.

@@ -154,6 +154,7 @@ const config: ForgeConfig = {
new MakerSquirrel({
name: "Follow",
setupIcon: "resources/icon.ico",
iconUrl: "https://app.follow.is/favicon.ico",
Copy link
Member

Choose a reason for hiding this comment

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

Can URl use local paths?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

CleanShot 2024-10-12 at 16 37 40@2x

Ref: electron/windows-installer#151

The configuration options for @electron-forge/maker-squirrel can be found at https://github.com/electron/windows-installer.

Previously, the nupkg restricted iconUrl to be an http(s) address. The nupkg team claimed to have fixed this issue in 2019, but according to community reports, it doesn't work on Windows 10.

Testing shows that using: file://${__dirname}/resources/icon.ico can work (the downside might be that it doesn't display correctly on Windows 10).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

According to the latest nupkg documentation, iconUrl has been deprecated. The current recommendation is to use <icon>, and this tag supports local image resources. Unfortunately, the built-in nupkg version in windows-installer is 2.8.5, and this tag is only supported from nupkg@5.3.0. Additionally, windows-installer does not provide any method to specify the path of nupkg.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

BTW. Why not use electron-builder? Forge currently only supports MSI/Squirrel on Windows. However, electron-builder supports NSIS. Using NSIS won't have this issue,

@Innei Innei merged commit 719f1da into RSSNext:dev Oct 13, 2024
3 of 4 checks passed
@BlackHole1 BlackHole1 deleted the fix-win-icon branch October 13, 2024 04:40
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