From 017ce1e33ed555b78de5c35d30dd0498f857deb5 Mon Sep 17 00:00:00 2001 From: Gwyn Date: Fri, 24 Feb 2023 12:13:27 -0700 Subject: [PATCH] =?UTF-8?q?The=20outputFile=20was=20only=20being=20set=20f?= =?UTF-8?q?or=20darwin=20universal=20builds.=20I=20move=E2=80=A6=20(#2358)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * The outputFile was only being set for darwin universal builds. I moved the variable assignment to a location where it will take place for all builds. The ProjectData entries are used in generating the .app plist file, so setting them here ensures that the app will run with the custom binary name. * Increases the reach of the output flag. * Updates the changelog with a record of this fix. --- v2/pkg/commands/build/build.go | 5 ++++- website/src/pages/changelog.mdx | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/v2/pkg/commands/build/build.go b/v2/pkg/commands/build/build.go index fe8f926f5..1af7e99f4 100644 --- a/v2/pkg/commands/build/build.go +++ b/v2/pkg/commands/build/build.go @@ -262,9 +262,12 @@ func execBuildApplication(builder Builder, options *Options) (string, error) { // Compile the application printBulletPoint("Compiling application: ") + outputFile := builder.OutputFilename(options) + options.ProjectData.OutputFilename = outputFile + options.ProjectData.Name = outputFile + options.ProjectData.Info.ProductName = outputFile if options.Platform == "darwin" && options.Arch == "universal" { - outputFile := builder.OutputFilename(options) amd64Filename := outputFile + "-amd64" arm64Filename := outputFile + "-arm64" diff --git a/website/src/pages/changelog.mdx b/website/src/pages/changelog.mdx index ab4356532..ac0b20f55 100644 --- a/website/src/pages/changelog.mdx +++ b/website/src/pages/changelog.mdx @@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed the sometimes lagging drag experience with `--wails-draggable` on Windows. Fixed by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2302) - Fixed applying the default arch to platform flag in wails cli. If only a `GOOS` has been supplied as platform flag e.g. `wails build --platform windows` the current architecture wasn't applied and the build failed. Fixed by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2309) - Fixed a segfault on opening the inspector on older macOS versions. Fixed by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2397) +- Fixed the macos single architecture builds not respecting an output file name specified with the '-o' flag. Fixed by @gwynforthewyn in [PR](https://github.com/wailsapp/wails/pull/2358) ## v2.3.0 - 2022-12-29