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"] {
|
if ev.Data["Key"] == UI.CurKeys["B"] {
|
||||||
|
fmt.Println("Update Confirm Page B",self.GIT)
|
||||||
if self.GIT == true {
|
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)
|
event.Post(UI.RUNSH,cmdpath)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -229,7 +231,7 @@ func (self *UpdatePage) KeyDown(ev *event.Event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ev.Data["Key"] == UI.CurKeys["X"] {
|
if ev.Data["Key"] == UI.CurKeys["X"] {
|
||||||
if self.Screen.DBusManager.IsWifiConnectedNow() == true {
|
if self.Screen.DBusManager.IsWifiConnectedNow() == false {
|
||||||
if self.CheckUpdate() == true {
|
if self.CheckUpdate() == true {
|
||||||
self.Screen.Draw()
|
self.Screen.Draw()
|
||||||
self.Screen.SwapAndShow()
|
self.Screen.SwapAndShow()
|
||||||
|
|||||||
8
main.go
8
main.go
@ -262,8 +262,8 @@ func run() int {
|
|||||||
UI.SwapAndShow()
|
UI.SwapAndShow()
|
||||||
|
|
||||||
//fmt.Println(main_screen)
|
//fmt.Println(main_screen)
|
||||||
|
event.AllocEvents(3)
|
||||||
event.AddCustomEvent(UI.RUNEVT)
|
event.AddCustomEvent(UI.RUNEVT)
|
||||||
event.AddCustomEvent(UI.RUNSH)
|
event.AddCustomEvent(UI.RUNSH)
|
||||||
|
|
||||||
go FlashLed1(main_screen)
|
go FlashLed1(main_screen)
|
||||||
@ -307,9 +307,9 @@ func run() int {
|
|||||||
gogame.Quit()
|
gogame.Quit()
|
||||||
|
|
||||||
fmt.Println("RUNSH")
|
fmt.Println("RUNSH")
|
||||||
exec_app_cmd := ev.Data["Msg"]
|
exec_app_cmd := ev.Data["Msg"]+";"
|
||||||
fmt.Println(exec_app_cmd)
|
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()
|
err := cmd.Start()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
|
|||||||
@ -9,7 +9,7 @@ type PowerLevel struct {
|
|||||||
var PowerLevels map[string]*PowerLevel
|
var PowerLevels map[string]*PowerLevel
|
||||||
|
|
||||||
var (
|
var (
|
||||||
CurKeySet = "GameShell" // PC or GameShell
|
CurKeySet = "PC" // PC or GameShell
|
||||||
DontLeave = false
|
DontLeave = false
|
||||||
BackLight = "/proc/driver/backlight"
|
BackLight = "/proc/driver/backlight"
|
||||||
Battery = "/sys/class/power_supply/axp20x-battery/uevent"
|
Battery = "/sys/class/power_supply/axp20x-battery/uevent"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user