mirror of
https://gitee.com/energye/energy.git
synced 2024-11-29 18:28:06 +08:00
U: 命令行工具优化, build命令增加自定义go build 的 args参数,
This commit is contained in:
parent
e6ce5387a1
commit
8220eccbde
14
UpdateLog.md
14
UpdateLog.md
@ -1,22 +1,25 @@
|
||||
|
||||
### 2.4.0
|
||||
|
||||
#### Windows XP 版本支持
|
||||
|
||||
|
||||
```text
|
||||
go1.10 是最后一个支持WinXP的, 但是编译出的exe对CEF封装的不好
|
||||
go1.11.4 和1.11.13 编译出的exe可以在WinXP SP3 运行, 测试赞未发现问题
|
||||
windows xp go 1.11.13
|
||||
|
||||
以下修改需同步到其它特定分枝和主分枝
|
||||
以下修改liblcl需同步到其它特定分枝和主分枝
|
||||
|
||||
增加了特定版本支持 API
|
||||
liblcl
|
||||
CEFAppConfig_SpecificVersion OK
|
||||
|
||||
修改字符串返回, 使用TString API
|
||||
修改字符串返回, 使用TString API OK
|
||||
liblcl
|
||||
CEFFrame_Name
|
||||
CEFFrame_Url
|
||||
|
||||
侯改 ChromiumEvent_OnBeforePopup
|
||||
侯改 ChromiumEvent_OnBeforePopup OK
|
||||
Go
|
||||
SetOnBeforePopup 增加 settings *TCefBrowserSettings
|
||||
liblcl
|
||||
@ -47,4 +50,5 @@ Go
|
||||
命令行工具
|
||||
集成 go-bindata
|
||||
build 增加自定义扩展参数
|
||||
|
||||
|
||||
```
|
@ -22,7 +22,7 @@ var CmdBindata = &command.Command{
|
||||
Short: "Use bindata to embed static resources",
|
||||
Long: `
|
||||
If the go version is less than 1.16, you can use bindata to embed static resources
|
||||
Example: go:generate energy bindata --fs --o=assets/assets.go --pkg=assets --paths=./resources
|
||||
Example: go:generate energy bindata --fs --o=assets/assets.go --pkg=assets --paths=./resources,./assets
|
||||
. Execute command
|
||||
`,
|
||||
}
|
||||
|
@ -32,6 +32,12 @@ func build(c *command.Config, proj *project.Project) (err error) {
|
||||
if proj.TempDll {
|
||||
args = append(args, "--tags=tempdll "+c.Build.TempDllFlag)
|
||||
}
|
||||
if c.Build.Args != "" {
|
||||
gbargs := strings.Split(c.Build.Args, " ")
|
||||
for i := range gbargs {
|
||||
args = append(args, gbargs[i])
|
||||
}
|
||||
}
|
||||
args = append(args, "-ldflags", "-s -w")
|
||||
args = append(args, "-o", proj.OutputFilename)
|
||||
cmd.Command("go", args...)
|
||||
|
@ -32,6 +32,12 @@ func build(c *command.Config, proj *project.Project) (err error) {
|
||||
if proj.TempDll {
|
||||
args = append(args, "--tags=tempdll "+c.Build.TempDllFlag)
|
||||
}
|
||||
if c.Build.Args != "" {
|
||||
gbargs := strings.Split(c.Build.Args, " ")
|
||||
for i := range gbargs {
|
||||
args = append(args, gbargs[i])
|
||||
}
|
||||
}
|
||||
args = append(args, "-ldflags", "-s -w")
|
||||
args = append(args, "-o", proj.OutputFilename)
|
||||
cmd.Command("go", args...)
|
||||
|
@ -76,6 +76,12 @@ func build(c *command.Config, proj *project.Project) (err error) {
|
||||
}
|
||||
args = append(args, "--tags=tempdll "+c.Build.TempDllFlag)
|
||||
}
|
||||
if c.Build.Args != "" {
|
||||
gbargs := strings.Split(c.Build.Args, " ")
|
||||
for i := range gbargs {
|
||||
args = append(args, gbargs[i])
|
||||
}
|
||||
}
|
||||
args = append(args, "-ldflags", "-s -w -H windowsgui")
|
||||
args = append(args, "-o", proj.OutputFilename)
|
||||
cmd.Command("go", args...)
|
||||
|
@ -82,6 +82,7 @@ type Build struct {
|
||||
UpxFlag string `long:"upxFlag" description:"Upx command line parameters" default:""`
|
||||
TempDll bool `short:"d" long:"dll" description:"Enable built-in liblcl build"`
|
||||
TempDllFlag string `long:"tempDllFlag" description:"TempDll parameters" default:"latest"`
|
||||
Args string `long:"args" description:"go build [args]" default:""`
|
||||
}
|
||||
|
||||
type Bindata struct {
|
||||
@ -98,7 +99,7 @@ type Bindata struct {
|
||||
ModTime int64 `long:"modtime" description:"Optional modification unix timestamp override for all files."`
|
||||
Output string `long:"o" description:"Optional name of the output file to be generated." default:"./bindata.go"`
|
||||
Ignore string `long:"Ignore" description:"Regex pattern to ignore." default:""`
|
||||
Paths string `long:"paths" description:"Static resource directory" default:""`
|
||||
Paths string `long:"paths" description:"Static resource directory, Multiple Catalogs: ./resource,./libs" default:""`
|
||||
}
|
||||
|
||||
type EnergyConfig struct {
|
||||
|
Loading…
Reference in New Issue
Block a user