diff --git a/mkdocs-website/docs/en/changelog.md b/mkdocs-website/docs/en/changelog.md index 8d91cec6062..c91b1d0f6ba 100644 --- a/mkdocs-website/docs/en/changelog.md +++ b/mkdocs-website/docs/en/changelog.md @@ -41,6 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Consolidated dev config into `config.yml` by [leaanthony](https://github.com/leaanthony) ### Fixed +- Fixed build assets update by @ansxuman in [#3900](https://github.com/wailsapp/wails/pull/3900) - Fixed Linux systray `OnClick` and `OnRightClick` implementation by @atterpac in [#3886](https://github.com/wailsapp/wails/pull/3886) - Fixed `AlwaysOnTop` not working on Mac by [leaanthony](https://github.com/leaanthony) in [#3841](https://github.com/wailsapp/wails/pull/3841) - [darwin] Fixed `application.NewEditMenu` including a duplicate `PasteAndMatchStyle` role in the edit menu on Darwin by [johnmccabe](https://github.com/johnmccabe) in [#3839](https://github.com/wailsapp/wails/pull/3839) diff --git a/v3/internal/commands/build-assets.go b/v3/internal/commands/build-assets.go index c5e0946fecf..19105f6cf39 100644 --- a/v3/internal/commands/build-assets.go +++ b/v3/internal/commands/build-assets.go @@ -122,6 +122,19 @@ type UpdateConfig struct { FileAssociations []FileAssociation `yaml:"fileAssociations"` } +type WailsConfig struct { + Info struct { + CompanyName string `yaml:"companyName"` + ProductName string `yaml:"productName"` + ProductIdentifier string `yaml:"productIdentifier"` + Description string `yaml:"description"` + Copyright string `yaml:"copyright"` + Comments string `yaml:"comments"` + Version string `yaml:"version"` + } `yaml:"info"` + FileAssociations []FileAssociation `yaml:"fileAssociations"` +} + func UpdateBuildAssets(options *UpdateBuildAssetsOptions) error { DisableFooter = true @@ -132,18 +145,29 @@ func UpdateBuildAssets(options *UpdateBuildAssetsOptions) error { } var config UpdateConfig - if options.Config != "" { + var wailsConfig WailsConfig bytes, err := os.ReadFile(options.Config) if err != nil { return err } - err = yaml.Unmarshal(bytes, &config) + err = yaml.Unmarshal(bytes, &wailsConfig) if err != nil { return err } + + options.ProductCompany = wailsConfig.Info.CompanyName + options.ProductName = wailsConfig.Info.ProductName + options.ProductIdentifier = wailsConfig.Info.ProductIdentifier + options.ProductDescription = wailsConfig.Info.Description + options.ProductCopyright = wailsConfig.Info.Copyright + options.ProductComments = wailsConfig.Info.Comments + options.ProductVersion = wailsConfig.Info.Version + config.FileAssociations = wailsConfig.FileAssociations } + config.UpdateBuildAssetsOptions = *options + // If directory doesn't exist, create it if _, err := os.Stat(options.Dir); os.IsNotExist(err) { err = os.MkdirAll(options.Dir, 0755) @@ -157,8 +181,6 @@ func UpdateBuildAssets(options *UpdateBuildAssetsOptions) error { return err } - config.UpdateBuildAssetsOptions = *options - err = gosod.New(tfs).Extract(options.Dir, config) if err != nil { return err