Forgot to implement updating
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
"github.com/nelsam/gxui"
|
"github.com/nelsam/gxui"
|
||||||
"github.com/nelsam/gxui/drivers/gl"
|
"github.com/nelsam/gxui/drivers/gl"
|
||||||
"github.com/nelsam/gxui/themes/dark"
|
"github.com/nelsam/gxui/themes/dark"
|
||||||
@@ -25,6 +27,22 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
stat := versionDL()
|
||||||
|
if stat {
|
||||||
|
res := getVersionFileInfo()
|
||||||
|
if res != "Error!" {
|
||||||
|
stat = checkForUpdate(res)
|
||||||
|
if stat {
|
||||||
|
downloadUpdate(res)
|
||||||
|
} else {
|
||||||
|
fmt.Println("Failed DL")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
fmt.Println("Failed Version File Info")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
fmt.Println("Failed Version DL")
|
||||||
|
}
|
||||||
master = make(map[string][]app)
|
master = make(map[string][]app)
|
||||||
linmaster = make(map[string][]app)
|
linmaster = make(map[string][]app)
|
||||||
gl.StartDriver(appMain)
|
gl.StartDriver(appMain)
|
||||||
|
|||||||
@@ -56,8 +56,8 @@ func getVersionFileInfo() string {
|
|||||||
return string(out)
|
return string(out)
|
||||||
}
|
}
|
||||||
|
|
||||||
func checkForUpdate(cur string, new string) bool {
|
func checkForUpdate(new string) bool {
|
||||||
curSlice := strings.Split(cur, ".")
|
curSlice := strings.Split(version, ".")
|
||||||
newSlice := strings.Split(new, ".")
|
newSlice := strings.Split(new, ".")
|
||||||
curNums := make([]int, 4)
|
curNums := make([]int, 4)
|
||||||
newNums := make([]int, 4)
|
newNums := make([]int, 4)
|
||||||
|
|||||||
Reference in New Issue
Block a user