提交 63f0e75a 编写于 作者: yanghye's avatar yanghye

command-line: nsis 安装包工具优化license

上级 e48c92a5
......@@ -50,11 +50,13 @@ func build(c *command.Config, proj *project.Project) (err error) {
if iconPath, err = generaICON(proj); err != nil {
return err
}
defer func() {
var delSyso = func() {
if syso != "" {
os.Remove(syso)
syso = ""
}
}()
}
defer delSyso()
if syso, err = generaSYSO(iconPath, proj); err != nil {
return err
}
......@@ -70,6 +72,7 @@ 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")
......
......@@ -110,6 +110,7 @@ func (m *Info) ToSlash() {
func (m *NSIS) FromSlash() {
m.Icon = filepath.FromSlash(m.Icon)
m.UnIcon = filepath.FromSlash(m.UnIcon)
m.License = filepath.FromSlash(m.License)
for i, as := range m.Include {
m.Include[i] = filepath.FromSlash(as)
}
......@@ -118,6 +119,7 @@ func (m *NSIS) FromSlash() {
func (m *NSIS) ToSlash() {
m.Icon = filepath.ToSlash(m.Icon)
m.UnIcon = filepath.ToSlash(m.UnIcon)
m.License = filepath.ToSlash(m.License)
for i, as := range m.Include {
m.Include[i] = filepath.ToSlash(as)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册