wails
wails copied to clipboard
Fix icon issues with windows when project name contains spaces
Description
Recently I discovered weird issue related to .syso files. To add icons to binary wails creates syso file that then used by go compiler to build the app. There is weird issue with a case when you have space symbol at syso filename at 15 position (0 first element). In that case for some reasons syso file is not taken. I know, this sounds weird, and I even don't know where to report this 😅
So I replaced spaces in syso file name to underscores. This solves the issue
Type of change
Please delete options that are not relevant.
- [x] 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?
Create wails template project and put aaaaaaaaaaaaaaa a as name property in wails.json
Build windows app
- [x] Windows
- [ ] macOS
- [ ] Linux
Test Configuration
Please paste the output of wails doctor. If you are unable to run this command, please describe your environment in as much detail as possible.
Checklist:
- [ ] I have updated
website/src/pages/changelog.mdxwith details of this PR - [x] My code follows the general coding style of this project
- [x] 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
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
Summary by CodeRabbit
- Bug Fixes
- Improved file path handling in the build process to ensure compatibility with filenames containing spaces.
- Fixed an issue with a missing icon for Windows in the changelog documentation.
Walkthrough
The changes involve updating file paths in build.go and packager.go to replace spaces with underscores, enhancing compatibility with go build and addressing issues related to file naming conventions.
Changes
| File | Change Summary |
|---|---|
v2/pkg/commands/build/build.go, v2/pkg/commands/build/packager.go |
Updated file paths to replace spaces with underscores in project names and filenames for compatibility with go build. |
Possibly related issues
- wailsapp/wails#3163: The changes could potentially address the issue where specifying the output filename using
-ois ignored, as it relates to file naming and build process enhancements.
Poem
🐰 Hop, hop, hop!
In the code, we make a swap,
Spaces to underscores, a simple flip,
Ensuring no build path will trip.
🚀 Now build and watch it zip!
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
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>.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
@coderabbitaiin 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
@coderabbitaiin 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 generate interesting stats about this repository and render them as a table.@coderabbitai show all the console.log statements in this repository.@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.
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 as PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger a review. This is useful when automatic reviews are disabled for the repository.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai helpto get help.
Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
CodeRabbit Configration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
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.
Thanks for opening this. What a curious issue!
@leaanthony curious when this will be merged?
Done!