Skip to content

Commit

Permalink
U: command-line, build_windows
Browse files Browse the repository at this point in the history
  • Loading branch information
sxmxta committed Apr 29, 2024
1 parent 73f4fda commit 7eef643
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions cmd/internal/build/build_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"github.com/energye/energy/v2/cmd/internal/term"
"github.com/energye/energy/v2/cmd/internal/tools"
toolsCommand "github.com/energye/golcl/tools/command"
"os"
"path/filepath"
"strings"
)
Expand All @@ -39,19 +38,11 @@ const (
func build(c *command.Config, proj *project.Project) (err error) {
var (
iconPath string
syso string
)
if iconPath, err = generaICON(proj); err != nil {
return err
}
var delSyso = func() {
if syso != "" {
os.Remove(syso)
syso = ""
}
}
defer delSyso()
if syso, err = generaSYSO(iconPath, proj); err != nil {
if _, err = generaSYSO(iconPath, proj); err != nil {
return err
}
// go build
Expand All @@ -70,7 +61,6 @@ func build(c *command.Config, proj *project.Project) (err error) {
args = append(args, "-ldflags", "-s -w -H windowsgui")
args = append(args, "-o", proj.OutputFilename)
cmd.Command("go", args...)
delSyso()
// upx
if c.Build.Upx && tools.CommandExists("upx") {
term.Section.Println("Upx compression")
Expand Down

0 comments on commit 7eef643

Please sign in to comment.