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
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion v2/pkg/commands/build/build.go
Expand Up @@ -258,7 +258,7 @@ func execBuildApplication(builder Builder, options *Options) (string, error) {

// When we finish, we will want to remove the syso file
defer func() {
err := os.Remove(filepath.Join(options.ProjectData.Path, options.ProjectData.Name+"-res.syso"))
err := os.Remove(filepath.Join(options.ProjectData.Path, strings.ReplaceAll(options.ProjectData.Name, " ", "_")+"-res.syso"))
if err != nil {
fatal(err.Error())
}
Expand Down
4 changes: 3 additions & 1 deletion v2/pkg/commands/build/packager.go
Expand Up @@ -6,6 +6,7 @@ import (
"image"
"os"
"path/filepath"
"strings"

"github.com/leaanthony/winicon"
"github.com/tc-hib/winres"
Expand Down Expand Up @@ -274,7 +275,8 @@ func compileResources(options *Options) error {
rs.SetVersionInfo(v)
}

targetFile := filepath.Join(options.ProjectData.Path, options.ProjectData.Name+"-res.syso")
// replace spaces with underscores as go build behaves weirdly with spaces in syso filename
targetFile := filepath.Join(options.ProjectData.Path, strings.ReplaceAll(options.ProjectData.Name, " ", "_")+"-res.syso")
fout, err := os.Create(targetFile)
if err != nil {
return err
Expand Down
7 changes: 7 additions & 0 deletions website/src/pages/changelog.mdx
Expand Up @@ -14,6 +14,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

### Fixed
- Fixed an issue with missing icon for Windows. Fixed by [@APshenkin](https://github.com/wailsapp/wails/pull/3400)
Comment on lines +19 to +20
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.


### Changed

## v2.8.1 - 2024-04-11

### Added
Expand Down