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: correct filename for Windows icon generation in Taskfile #4125

Merged

Conversation

robin-samuel
Copy link

@robin-samuel robin-samuel commented Mar 9, 2025

Description

I noticed that generate:icons generates the windows icon to the path windows/icons.ico but the path used to make the syso and nsis installer is windows/icon.ico. This causes the app to always have the same icon if not updated manually. and there will always be an unused icons.ico file in the windows folder.

Type of change

Please select the option that is relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration using wails doctor.

  • Windows
  • macOS
  • Linux

If you checked Linux, please specify the distro and version.

Test Configuration

Wails (v3.0.0-alpha.9) Wails Doctor

System

Name Windows 10 Pro
Version 2009 (Build: 26100)
ID 24H2
Branding Windows 11 Pro
Platform windows
Architecture amd64
Go WebView2Loader true
WebView2 Version 133.0.3065.92
CPU 12th Gen Intel(R) Core(TM) i9-12900K
GPU 1 Intel(R) UHD Graphics 770 (Intel Corporation) - Driver: 32.0.101.6129
GPU 2 NVIDIA GeForce RTX 3090 (NVIDIA) - Driver: 32.0.15.7216
Memory 32GB

Build Environment

Wails CLI v3.0.0-alpha.9
Go Version go1.24.0
-buildmode exe
-compiler gc
CGO_ENABLED 0
DefaultGODEBUG asynctimerchan=1,gotestjsonbuildtext=1,gotypesalias=0,httpservecontentkeepheaders=1,multipathtcp=0,randseednop=0,rsa1024min=0,tls3des=1,tlsmlkem=0,x509keypairleaf=0,x509negativeserial=1,x509rsacrt=0,x509usepolicies=0
GOAMD64 v1
GOARCH amd64
GOOS windows

Dependencies

NSIS v3.10
npm 10.9.2

Diagnosis

SUCCESS Your system is ready for Wails development!

Checklist:

  • I have updated website/src/pages/changelog.mdx with details of this PR
  • My code follows the general coding style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Summary by CodeRabbit

  • Chores

    • Updated the Windows icon generation process to use a revised naming convention for improved consistency.
    • Modified macOS icon output to include a "darwin/" prefix for clarity.
  • Bug Fixes

    • Added a changelog entry addressing the issue of icon generation paths, contributed by user @robin-samuel.

Copy link
Contributor

coderabbitai bot commented Mar 9, 2025

Walkthrough

The pull request updates the generate:icons task in the Taskfile template. The Windows icon output filename has been changed from icons.ico to icon.ico, and the macOS icon filename has been prefixed with "darwin/". The command executed for generating the icons has been updated accordingly, while the input image remains unchanged.

Changes

File Change Summary
v3/internal/commands/build_assets/Taskfile.tmpl.yml Updated the generate:icons task: changed Windows icon filename from icons.ico to icon.ico, prefixed macOS filename with "darwin/", and updated the command to reflect these changes.
docs/src/content/docs/changelog.mdx Added a new entry in the "Fixed" section of the changelog regarding icon generation paths, contributed by @robin-samuel, linked to PR #4125.

Possibly related PRs

  • Taskfile Refactor #3748: The changes in the main PR regarding the generate:icons task in Taskfile.tmpl.yml are related to the modifications made in the v3/internal/templates/_common/Taskfile.tmpl.yml of the retrieved PR, as both involve updates to the Taskfile structure and functionality.

Suggested reviewers

  • leaanthony

Poem

I'm a rabbit with a coder's delight,
Hopping through Taskfiles both day and night.
Changed an icon name with a tiny tweak,
Bringing order where the code did speak.
With ASCII ears and a playful cheer,
I celebrate changes that now are clear!
🐰 Hop on, and happy coding, my dear!


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bd59b8c and d1be724.

📒 Files selected for processing (1)
  • v3/internal/commands/build_assets/Taskfile.tmpl.yml (1 hunks)
🔇 Additional comments (1)
v3/internal/commands/build_assets/Taskfile.tmpl.yml (1)

72-72: Command Reference Correction Verified

The command now correctly uses the updated filename with the appropriate directory:

-windowsfilename windows/icon.ico

This ensures that the generated Windows icon will match the file referenced by the installer configuration. Once the generates list is fixed for consistency, this command is spot on.

@leaanthony
Copy link
Member

Nice one! This must have been missed after a recent refactor.

Please could you add an entry to the changelog located at docs/src/content/docs/changelog.mdx? Thanks! 🙏

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
docs/src/content/docs/changelog.mdx (1)

111-111: Clarify the Changelog Entry for Icon Generation Fix

The new entry documents the fix by [@robin-samuel] but could be more descriptive. Consider explicitly mentioning that the Windows icon filename was changed from "icons.ico" to "icon.ico" so that readers immediately understand the nature of the fix.

🧰 Tools
🪛 LanguageTool

[grammar] ~111-~111: The auxiliary verb ‘do’ requires the base form of the verb.
Context: ...esn't exist but [request].html does - Fixed icon generation paths by [@robin-samuel...

(DID_BASEFORM)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1a0096c and 1bb14e1.

📒 Files selected for processing (1)
  • docs/src/content/docs/changelog.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/src/content/docs/changelog.mdx

[grammar] ~111-~111: The auxiliary verb ‘do’ requires the base form of the verb.
Context: ...esn't exist but [request].html does - Fixed icon generation paths by [@robin-samuel...

(DID_BASEFORM)

@robin-samuel
Copy link
Author

done

@leaanthony leaanthony enabled auto-merge March 10, 2025 18:51
@leaanthony leaanthony merged commit 3b10170 into wailsapp:v3-alpha Mar 10, 2025
71 of 72 checks passed
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