mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 08:10:56 +08:00
Fix icon issues with windows when project name contains spaces (#3400)
* fix icon issues with windows when project name contains spaces * add comment * add to change log --------- Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
This commit is contained in:
parent
9a039b1dc9
commit
b8dae7a6e2
@ -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())
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import (
|
||||
"image"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/leaanthony/winicon"
|
||||
"github.com/tc-hib/winres"
|
||||
@ -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
|
||||
|
@ -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)
|
||||
|
||||
### Changed
|
||||
|
||||
## v2.8.1 - 2024-04-11
|
||||
|
||||
### Added
|
||||
|
Loading…
Reference in New Issue
Block a user