From 28e31c46c6f97e70f52158be7ede9c99b2762698 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Thu, 10 Feb 2022 21:11:32 +1100 Subject: [PATCH] Fix output filename for windows builds --- v2/cmd/wails/internal/commands/build/build.go | 5 ++++- v2/pkg/commands/build/base.go | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/v2/cmd/wails/internal/commands/build/build.go b/v2/cmd/wails/internal/commands/build/build.go index 6d0404733..8601307eb 100644 --- a/v2/cmd/wails/internal/commands/build/build.go +++ b/v2/cmd/wails/internal/commands/build/build.go @@ -274,11 +274,14 @@ func AddBuildSubcommand(app *clir.Cli, w io.Writer) { // target filename switch buildOptions.Platform { case "windows": - desiredFilename = fmt.Sprintf("%s-%s.exe", desiredFilename, buildOptions.Arch) + desiredFilename = fmt.Sprintf("%s-%s", desiredFilename, buildOptions.Arch) default: desiredFilename = fmt.Sprintf("%s-%s-%s", desiredFilename, buildOptions.Platform, buildOptions.Arch) } } + if buildOptions.Platform == "windows" { + desiredFilename += ".exe" + } buildOptions.OutputFile = desiredFilename // Start Time diff --git a/v2/pkg/commands/build/base.go b/v2/pkg/commands/build/base.go index 7fd5db408..a978b14b5 100644 --- a/v2/pkg/commands/build/base.go +++ b/v2/pkg/commands/build/base.go @@ -545,7 +545,7 @@ func (b *BaseBuilder) BuildFrontend(outputLogger *clilogger.CLILogger) error { // Check there is an 'InstallCommand' provided in wails.json if b.projectData.InstallCommand == "" { // No - don't install - outputLogger.Println("No Install command. Skipping.") + outputLogger.Println(" - No Install command. Skipping.") } else { // Do install if needed outputLogger.Print(" - Installing frontend dependencies: ") @@ -571,7 +571,7 @@ func (b *BaseBuilder) BuildFrontend(outputLogger *clilogger.CLILogger) error { buildCommand = b.projectData.BuildCommand } if buildCommand == "" { - outputLogger.Println("No Build command. Skipping.") + outputLogger.Println(" - No Build command. Skipping.") // No - ignore return nil }