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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v3] allow build with garble #3192

Merged
merged 6 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion mkdocs-website/docs/en/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- 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)
- [linux] Fixed aarch64 compilation [#3840](https://github.com/wailsapp/wails/issues/3840) in [#3854](https://github.com/wailsapp/wails/pull/3854) by [kodflow](https://github.com/kodflow)

- Fixed garble build by @5aaee9 in [#3192](https://github.com/wailsapp/wails/pull/3192)
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Enhance the changelog entry with more context about Garble integration.

The current entry "Fixed garble build" is too brief. Consider expanding it to provide more context about the Garble integration and known limitations:

-Fixed garble build by @5aaee9 in [#3192](https://github.com/wailsapp/wails/pull/3192)
+Added support for building with Garble (Go binary obfuscator) by @5aaee9 in [#3192](https://github.com/wailsapp/wails/pull/3192). Note: Method invocation through `Call.ByID` and `Call.ByName` may be affected by obfuscation.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- Fixed garble build by @5aaee9 in [#3192](https://github.com/wailsapp/wails/pull/3192)
Added support for building with Garble (Go binary obfuscator) by @5aaee9 in [#3192](https://github.com/wailsapp/wails/pull/3192). Note: Method invocation through `Call.ByID` and `Call.ByName` may be affected by obfuscation.

-
## v3.0.0-alpha.7 - 2024-09-18

### Added
Expand Down Expand Up @@ -136,6 +137,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix systemTray.setIcon crashing on Linux by [@windom](https://github.com/windom/) in [#3636](https://github.com/wailsapp/wails/pull/3636).
- Fix Ensure Window Frame is Applied on First Call in `setFrameless` Function on Windows by [@bruxaodev](https://github.com/bruxaodev/) in [#3691](https://github.com/wailsapp/wails/pull/3691).


### Changed

- Renamed `AbsolutePosition()` to `Position()` by [mmghv](https://github.com/mmghv) in [#3611](https://github.com/wailsapp/wails/pull/3611)
Expand Down
4 changes: 4 additions & 0 deletions v3/internal/go-common-file-dialog/cfd/DialogConfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package cfd

import (
"reflect"
"fmt"
"os"
)
Expand All @@ -14,6 +15,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
Expand Down
5 changes: 5 additions & 0 deletions v3/pkg/application/application_debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
})
Expand Down
Loading