Launcher: take app information from AppManager

Change-Id: I0dedd5a710adc4810feb9210b903655a3d2f5533
diff --git a/core/installer/app.go b/core/installer/app.go
index 30e946b..fcf39ff 100644
--- a/core/installer/app.go
+++ b/core/installer/app.go
@@ -22,6 +22,15 @@
 readme: string | *""
 icon: string | *""
 namespace: string | *""
+help: [...#HelpDocument] | *[]
+
+#HelpDocument: {
+	title: string
+	contents: string
+	children: [...#HelpDocument] | *[]
+}
+
+url: string | *""
 
 #AppType: "infra" | "env"
 appType: #AppType | *"env"
@@ -302,6 +311,15 @@
 	Ports     []PortForward
 	Config    AppInstanceConfig
 	Data      CueAppData
+	Help      []HelpDocument
+	Url       string
+	Icon      string
+}
+
+type HelpDocument struct {
+	Title    string
+	Contents string
+	Children []HelpDocument
 }
 
 type PortForward struct {
@@ -499,6 +517,22 @@
 			ret.Resources[name] = contents
 		}
 	}
+	helpValue := res.LookupPath(cue.ParsePath("help"))
+	if helpValue.Exists() {
+		if err := helpValue.Decode(&ret.Help); err != nil {
+			return Rendered{}, err
+		}
+	}
+	url, err := res.LookupPath(cue.ParsePath("url")).String()
+	if err != nil {
+		return Rendered{}, err
+	}
+	ret.Url = url
+	icon, err := res.LookupPath(cue.ParsePath("icon")).String()
+	if err != nil {
+		return Rendered{}, err
+	}
+	ret.Icon = icon
 	return ret, nil
 }
 
@@ -538,6 +572,8 @@
 		Release: release,
 		Values:  values,
 		Input:   derived,
+		Help:    ret.Help,
+		Url:     ret.Url,
 	}
 	return ret, nil
 }