mirror of
https://github.com/clockworkpi/LauncherGoDev.git
synced 2025-12-12 16:08:52 +01:00
test update
This commit is contained in:
parent
748174b83a
commit
02786260f5
@ -52,8 +52,10 @@ func (self *UpdateConfirmPage) KeyDown(ev *event.Event) {
|
||||
}
|
||||
|
||||
if ev.Data["Key"] == UI.CurKeys["B"] {
|
||||
fmt.Println("Update Confirm Page B",self.GIT)
|
||||
if self.GIT == true {
|
||||
cmdpath := fmt.Sprintf("update.sh %s ",self.Version)
|
||||
//go exec requires FullPath of script filename
|
||||
cmdpath := fmt.Sprintf("%s/update.sh %s",UI.GetExePath(),self.Version)
|
||||
event.Post(UI.RUNSH,cmdpath)
|
||||
return
|
||||
}
|
||||
@ -229,7 +231,7 @@ func (self *UpdatePage) KeyDown(ev *event.Event) {
|
||||
}
|
||||
|
||||
if ev.Data["Key"] == UI.CurKeys["X"] {
|
||||
if self.Screen.DBusManager.IsWifiConnectedNow() == true {
|
||||
if self.Screen.DBusManager.IsWifiConnectedNow() == false {
|
||||
if self.CheckUpdate() == true {
|
||||
self.Screen.Draw()
|
||||
self.Screen.SwapAndShow()
|
||||
|
||||
8
main.go
8
main.go
@ -262,8 +262,8 @@ func run() int {
|
||||
UI.SwapAndShow()
|
||||
|
||||
//fmt.Println(main_screen)
|
||||
|
||||
event.AddCustomEvent(UI.RUNEVT)
|
||||
event.AllocEvents(3)
|
||||
event.AddCustomEvent(UI.RUNEVT)
|
||||
event.AddCustomEvent(UI.RUNSH)
|
||||
|
||||
go FlashLed1(main_screen)
|
||||
@ -307,9 +307,9 @@ func run() int {
|
||||
gogame.Quit()
|
||||
|
||||
fmt.Println("RUNSH")
|
||||
exec_app_cmd := ev.Data["Msg"]
|
||||
exec_app_cmd := ev.Data["Msg"]+";"
|
||||
fmt.Println(exec_app_cmd)
|
||||
cmd := exec.Command("/bin/sh",exec_app_cmd)
|
||||
cmd := exec.Command("/bin/sh","-c",exec_app_cmd)
|
||||
err := cmd.Start()
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
|
||||
@ -9,7 +9,7 @@ type PowerLevel struct {
|
||||
var PowerLevels map[string]*PowerLevel
|
||||
|
||||
var (
|
||||
CurKeySet = "GameShell" // PC or GameShell
|
||||
CurKeySet = "PC" // PC or GameShell
|
||||
DontLeave = false
|
||||
BackLight = "/proc/driver/backlight"
|
||||
Battery = "/sys/class/power_supply/axp20x-battery/uevent"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user