mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 22:55:48 +01:00
wip: attempting to remove '.exe' from binary name
This commit is contained in:
parent
8d1238289f
commit
a2b066decb
2 changed files with 2 additions and 20 deletions
|
|
@ -9,7 +9,6 @@ import (
|
|||
"path/filepath"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/leaanthony/mewn"
|
||||
|
|
@ -137,7 +136,7 @@ func BuildDocker(binaryName string, buildMode string, projectOptions *ProjectOpt
|
|||
"docker",
|
||||
"run",
|
||||
"--rm",
|
||||
"-v", fmt.Sprintf("%s/build:/build", fs.Cwd()),
|
||||
"-v", fmt.Sprintf("%s:/build", filepath.Join(fs.Cwd(), "build")),
|
||||
"-v", fmt.Sprintf("%s:/source", fs.Cwd()),
|
||||
"-e", fmt.Sprintf("LOCAL_USER_ID=%v", userid),
|
||||
"-e", fmt.Sprintf("FLAG_LDFLAGS=%s", ldFlags(projectOptions, buildMode)),
|
||||
|
|
@ -222,17 +221,6 @@ 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))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import (
|
|||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
|
|
@ -188,7 +187,7 @@ func (po *ProjectOptions) GetNPMBinaryName() (PackageManager, error) {
|
|||
if strings.Index(po.FrontEnd.Install, "yarn") > -1 {
|
||||
return YARN, nil
|
||||
}
|
||||
|
||||
helper
|
||||
return UNKNOWN, nil
|
||||
}
|
||||
|
||||
|
|
@ -336,11 +335,6 @@ func processBinaryName(po *ProjectOptions) {
|
|||
if po.BinaryName == "" {
|
||||
var binaryNameComputed = computeBinaryName(po.Name)
|
||||
po.BinaryName = Prompt("The output binary name", binaryNameComputed)
|
||||
if runtime.GOOS == "windows" {
|
||||
if !strings.HasSuffix(po.BinaryName, ".exe") {
|
||||
po.BinaryName += ".exe"
|
||||
}
|
||||
}
|
||||
}
|
||||
fmt.Println("Output binary Name: " + po.BinaryName)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue