5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 06:20:48 +08:00

Fix output filename for windows builds

This commit is contained in:
Lea Anthony 2022-02-10 21:11:32 +11:00
parent c2fa4b6103
commit 28e31c46c6
2 changed files with 6 additions and 3 deletions

View File

@ -274,11 +274,14 @@ func AddBuildSubcommand(app *clir.Cli, w io.Writer) {
// target filename // target filename
switch buildOptions.Platform { switch buildOptions.Platform {
case "windows": case "windows":
desiredFilename = fmt.Sprintf("%s-%s.exe", desiredFilename, buildOptions.Arch) desiredFilename = fmt.Sprintf("%s-%s", desiredFilename, buildOptions.Arch)
default: default:
desiredFilename = fmt.Sprintf("%s-%s-%s", desiredFilename, buildOptions.Platform, buildOptions.Arch) desiredFilename = fmt.Sprintf("%s-%s-%s", desiredFilename, buildOptions.Platform, buildOptions.Arch)
} }
} }
if buildOptions.Platform == "windows" {
desiredFilename += ".exe"
}
buildOptions.OutputFile = desiredFilename buildOptions.OutputFile = desiredFilename
// Start Time // Start Time

View File

@ -545,7 +545,7 @@ func (b *BaseBuilder) BuildFrontend(outputLogger *clilogger.CLILogger) error {
// Check there is an 'InstallCommand' provided in wails.json // Check there is an 'InstallCommand' provided in wails.json
if b.projectData.InstallCommand == "" { if b.projectData.InstallCommand == "" {
// No - don't install // No - don't install
outputLogger.Println("No Install command. Skipping.") outputLogger.Println(" - No Install command. Skipping.")
} else { } else {
// Do install if needed // Do install if needed
outputLogger.Print(" - Installing frontend dependencies: ") outputLogger.Print(" - Installing frontend dependencies: ")
@ -571,7 +571,7 @@ func (b *BaseBuilder) BuildFrontend(outputLogger *clilogger.CLILogger) error {
buildCommand = b.projectData.BuildCommand buildCommand = b.projectData.BuildCommand
} }
if buildCommand == "" { if buildCommand == "" {
outputLogger.Println("No Build command. Skipping.") outputLogger.Println(" - No Build command. Skipping.")
// No - ignore // No - ignore
return nil return nil
} }