|
@@ -159,23 +159,23 @@ func main() {
|
|
|
os.Exit(0)
|
|
|
}()
|
|
|
|
|
|
- // go func() {
|
|
|
- // if len(GAppOption.Url) < 1 {
|
|
|
- // return
|
|
|
- // }
|
|
|
-
|
|
|
- // upgradeLancherExe(GAppOption.Url, func(i int, s string) {
|
|
|
- // fmt.Println("xxx=>", i, s)
|
|
|
-
|
|
|
- // if i == -1 {
|
|
|
- // installError = s
|
|
|
- // w.Invalidate()
|
|
|
- // return
|
|
|
- // }
|
|
|
- // installSucc = true
|
|
|
- // w.Invalidate()
|
|
|
- // })
|
|
|
- // }()
|
|
|
+ go func() {
|
|
|
+ if len(GAppOption.Url) < 1 {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ upgradeLancherExe(GAppOption.Url, func(i int, s string) {
|
|
|
+ fmt.Println("xxx=>", i, s)
|
|
|
+
|
|
|
+ if i == -1 {
|
|
|
+ installError = s
|
|
|
+ w.Invalidate()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ installSucc = true
|
|
|
+ w.Invalidate()
|
|
|
+ })
|
|
|
+ }()
|
|
|
|
|
|
app.Main()
|
|
|
}
|
|
@@ -193,7 +193,7 @@ func draw(w *app.Window) error {
|
|
|
|
|
|
case system.FrameEvent:
|
|
|
gtx := layout.NewContext(&ops, e)
|
|
|
- title := material.Body1(th, "下载中...")
|
|
|
+ title := material.Body1(th, "更新中...")
|
|
|
maroon := color.NRGBA{R: 0, G: 0, B: 0, A: 255}
|
|
|
title.Color = maroon
|
|
|
title.Alignment = text.Middle
|