mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-07 10:51:19 +08:00
Rapply -o suffix handling
This commit is contained in:
parent
47916216de
commit
61b9e50b8e
@ -9,6 +9,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/leaanthony/mewn"
|
"github.com/leaanthony/mewn"
|
||||||
@ -221,6 +222,17 @@ func BuildNative(binaryName string, forceRebuild bool, buildMode string, project
|
|||||||
}
|
}
|
||||||
|
|
||||||
if binaryName != "" {
|
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))
|
buildCommand.Add("-o", filepath.Join("build", binaryName))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user