From 2fa2f82aed6e5bb36815004a4b819a224796148c Mon Sep 17 00:00:00 2001 From: 5aaee9 <7685264+5aaee9@users.noreply.github.com> Date: Wed, 10 Jan 2024 20:29:59 +0800 Subject: [PATCH 1/2] feat: allow build with garble --- v3/internal/go-common-file-dialog/cfd/DialogConfig.go | 7 +++++++ v3/pkg/application/application_debug.go | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/v3/internal/go-common-file-dialog/cfd/DialogConfig.go b/v3/internal/go-common-file-dialog/cfd/DialogConfig.go index 221dbef2721..e32c3ebd087 100644 --- a/v3/internal/go-common-file-dialog/cfd/DialogConfig.go +++ b/v3/internal/go-common-file-dialog/cfd/DialogConfig.go @@ -2,6 +2,10 @@ package cfd +import ( + "reflect" +) + type FileFilter struct { // The display name of the filter (That is shown to the user) DisplayName string @@ -9,6 +13,9 @@ type FileFilter struct { Pattern string } +// Never obfuscate the FileFilter type. +var _ = reflect.TypeOf(FileFilter{}) + type DialogConfig struct { // The title of the dialog Title string diff --git a/v3/pkg/application/application_debug.go b/v3/pkg/application/application_debug.go index 52e2b185dc9..a3e8aa17cf1 100644 --- a/v3/pkg/application/application_debug.go +++ b/v3/pkg/application/application_debug.go @@ -40,6 +40,11 @@ func newApplication(options Options) *App { func (a *App) logStartup() { var args []any + // BuildInfo is nil when build with garble + if BuildInfo == nil { + return + } + wailsPackage, _ := lo.Find(BuildInfo.Deps, func(dep *debug.Module) bool { return dep.Path == "github.com/wailsapp/wails/v3" }) From 4a197f7c23317c7797c8151b094dccb8f2012d87 Mon Sep 17 00:00:00 2001 From: 5aaee9 <7685264+5aaee9@users.noreply.github.com> Date: Wed, 10 Jan 2024 22:24:45 +0800 Subject: [PATCH 2/2] docs: update --- mkdocs-website/docs/en/changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/mkdocs-website/docs/en/changelog.md b/mkdocs-website/docs/en/changelog.md index 8aea8c2bb8f..f59156a6d62 100644 --- a/mkdocs-website/docs/en/changelog.md +++ b/mkdocs-website/docs/en/changelog.md @@ -37,6 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed bug for linux in doctor in the event user doesn't have proper drivers installed. Added by [@pylotlight](https://github.com/pylotlight) in [PR](https://github.com/wailsapp/wails/pull/3032) - Fix dpi scaling on start up (windows). Changed by @almas1992 in [PR](https://github.com/wailsapp/wails/pull/3145) - Fix replace line in `go.mod` to use relative paths. Fixes Windows paths with spaces - @leaanthony. +- Fixed garble build by @5aaee9 in [#3192](https://github.com/wailsapp/wails/pull/3192) ### Changed