energy/example/app-icon-syso/main.go

32 lines
721 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package main
import (
"fmt"
"github.com/energye/golcl/tools/winRes"
)
func main() {
//rsrc()
sysoRsrc()
}
func sysoRsrc() {
err := syso()
if err != nil {
fmt.Println("syso-error:", err.Error())
//syso失败的时候使用rsrc方式生成该方式需要rsrc.exe执行文件
rsrc()
}
}
func rsrc() error {
rsrc := winRes.NewRSRC()
rsrc.RSRCPath = "E:\\SWT\\gopath\\src\\gitee.com\\snxamdf\\golcl\\exe"
rsrc.CMDDir = "E:\\SWT\\gopath\\src\\github.com\\energye\\energy\\example\\browser-control"
return rsrc.Gen()
}
func syso() error {
syso := winRes.NewSYSO()
syso.CMDDir = "E:\\SWT\\gopath\\src\\github.com\\energye\\energy\\example\\browser-control"
syso.IconName = "icon.ico"
return syso.RC()
}