mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-04 02:39:30 +08:00
Rapply -o suffix handling
This commit is contained in:
parent
47916216de
commit
61b9e50b8e
@ -9,6 +9,7 @@ import (
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/leaanthony/mewn"
|
||||
@ -221,6 +222,17 @@ func BuildNative(binaryName string, forceRebuild bool, buildMode string, project
|
||||
}
|
||||
|
||||
if binaryName != "" {
|
||||
// Alter binary name based on OS
|
||||
switch projectOptions.Platform {
|
||||
case "windows":
|
||||
if !strings.HasSuffix(binaryName, ".exe") {
|
||||
binaryName += ".exe"
|
||||
}
|
||||
default:
|
||||
if strings.HasSuffix(binaryName, ".exe") {
|
||||
binaryName = strings.TrimSuffix(binaryName, ".exe")
|
||||
}
|
||||
}
|
||||
buildCommand.Add("-o", filepath.Join("build", binaryName))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user