Added Button to launch PortableApps.com launcher. Added back common.sh support (oops)
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
|
|
||||||
"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"
|
||||||
@@ -18,6 +20,10 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
_, err := os.Open("PortableApps/LinuxPACom/common.sh")
|
||||||
|
if err == nil {
|
||||||
|
comEnbld = true
|
||||||
|
}
|
||||||
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)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
|
||||||
"github.com/nelsam/gxui"
|
"github.com/nelsam/gxui"
|
||||||
@@ -44,6 +45,18 @@ func ui() {
|
|||||||
wineBut.SetText("Show Windows Apps")
|
wineBut.SetText("Show Windows Apps")
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
_, err := os.Open("Start.exe")
|
||||||
|
if err == nil {
|
||||||
|
pa := th.CreateButton()
|
||||||
|
pa.SetText("Open PortableApps Launcher")
|
||||||
|
pa.OnClick(func(gxui.MouseEvent) {
|
||||||
|
cmd := exec.Command("wine", "Start.exe")
|
||||||
|
cmd.Stdout = os.Stdout
|
||||||
|
cmd.Stderr = os.Stderr
|
||||||
|
cmd.Start()
|
||||||
|
})
|
||||||
|
butBox.AddChild(pa)
|
||||||
|
}
|
||||||
butBox.AddChild(wineBut)
|
butBox.AddChild(wineBut)
|
||||||
}
|
}
|
||||||
top.AddChild(butBox)
|
top.AddChild(butBox)
|
||||||
|
|||||||
Reference in New Issue
Block a user