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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix icon issues with windows when project name contains spaces #3400

Merged
merged 5 commits into from Apr 29, 2024

Conversation

APshenkin
Copy link
Contributor

@APshenkin APshenkin commented Apr 17, 2024

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.

  • 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

  • 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.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

  • 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.

Copy link
Contributor

coderabbitai bot commented Apr 17, 2024

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

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?

Share
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 @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 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 pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to 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.yaml file 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.

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

Comment on lines +19 to +20
### Fixed
- Fixed an issue with missing icon for Windows. Fixed by [@APshenkin](https://github.com/wailsapp/wails/pull/3400)
Copy link
Contributor

Choose a reason for hiding this comment

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

Ensure the link to the GitHub user @APshenkin is correctly formatted. It currently appears to be a link to a pull request rather than a user profile.

@leaanthony
Copy link
Member

Thanks for opening this. What a curious issue!

@APshenkin
Copy link
Contributor Author

@leaanthony curious when this will be merged?

@tmclane tmclane merged commit b8dae7a into wailsapp:master Apr 29, 2024
4 checks passed
@tmclane
Copy link
Member

tmclane commented Apr 29, 2024

Done!

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.

None yet

3 participants