Added stuff for appimages.

Shows changelog before updating.
This commit is contained in:
Belac Darkstorm
2017-08-09 03:36:35 -05:00
parent 3d3239fe0a
commit 56748f043e
5 changed files with 185 additions and 15 deletions
+16 -4
View File
@@ -2,6 +2,7 @@ package main
import (
"encoding/gob"
"flag"
"fmt"
"os"
@@ -9,7 +10,7 @@ import (
)
const (
version = "2.1.1.0"
version = "2.1.2.0"
defIni = ""
)
@@ -23,16 +24,19 @@ var (
wineAvail bool
portableHide bool
versionNewest = true
paDirs = true
)
func main() {
forced := flag.Bool("force-update", false, "Force the update dialog to be shown")
flag.Parse()
os.MkdirAll("PortableApps/LinuxPACom", 0777)
master = make(map[string][]app)
linmaster = make(map[string][]app)
uiStart()
uiStart(*forced)
}
func uiStart() {
func uiStart(forced bool) {
gtk.Init(nil)
setup()
win, err := gtk.WindowNew(gtk.WINDOW_TOPLEVEL)
@@ -49,7 +53,7 @@ func uiStart() {
ui(win)
win.ShowAll()
win.Show()
update(win)
update(win, forced)
gtk.Main()
}
@@ -72,6 +76,10 @@ func savePrefs() {
if err != nil {
return
}
err = enc.Encode(paDirs)
if err != nil {
return
}
}
func loadPrefs() {
@@ -92,6 +100,10 @@ func loadPrefs() {
if err != nil {
return
}
err = dec.Decode(&paDirs)
if err != nil {
return
}
}
func contains(arr []string, str string) bool {