Restore webapp samples 29/28129/2
authorRoger Zanoni <rzanoni@igalia.com>
Wed, 9 Nov 2022 13:31:36 +0000 (14:31 +0100)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Mon, 14 Nov 2022 11:31:15 +0000 (11:31 +0000)
The desktop files aren't used anymore, change
the recipes to use appinfo.json instead.

Bug-AGL: SPEC-4605
Signed-off-by: Roger Zanoni <rzanoni@igalia.com>
Change-Id: Ie03aef155217f59bb6363f18b2781adbacc93786

13 files changed:
recipes-demo/webapp-samples/files/appinfo-aquarium.json [new file with mode: 0644]
recipes-demo/webapp-samples/files/appinfo-examples.json [new file with mode: 0644]
recipes-demo/webapp-samples/files/appinfo-jitsi.json [new file with mode: 0644]
recipes-demo/webapp-samples/files/appinfo-youtube.json [new file with mode: 0644]
recipes-demo/webapp-samples/files/webapps-aquarium.desktop [deleted file]
recipes-demo/webapp-samples/files/webapps-examples.desktop [deleted file]
recipes-demo/webapp-samples/files/webapps-jitsi.desktop [deleted file]
recipes-demo/webapp-samples/files/webapps-youtube.desktop [deleted file]
recipes-demo/webapp-samples/html5-aquarium_git.bb
recipes-demo/webapp-samples/html5-examples_git.bb
recipes-demo/webapp-samples/html5-jitsi_git.bb
recipes-demo/webapp-samples/html5-youtube_git.bb
recipes-demo/webapp-samples/webapp-samples.inc

diff --git a/recipes-demo/webapp-samples/files/appinfo-aquarium.json b/recipes-demo/webapp-samples/files/appinfo-aquarium.json
new file mode 100644 (file)
index 0000000..76fdd9e
--- /dev/null
@@ -0,0 +1,11 @@
+{
+  "id": "webapps-aquarium",
+  "title": "Aquarium",
+  "description": "HTML5 WebGL Aquarium sample",
+  "version": "0.0.0",
+  "vendor": "Igalia, S.L.",
+  "type": "web",
+  "main": "aquarium.html",
+  "uiRevision": "2",
+  "icon": "icon.svg"
+}
diff --git a/recipes-demo/webapp-samples/files/appinfo-examples.json b/recipes-demo/webapp-samples/files/appinfo-examples.json
new file mode 100644 (file)
index 0000000..c1c960d
--- /dev/null
@@ -0,0 +1,11 @@
+{
+  "id": "webapps-examples",
+  "title": "Examples",
+  "description": "HTML5 examples",
+  "version": "0.0.0",
+  "vendor": "Igalia, S.L.",
+  "type": "web",
+  "main": "index.html",
+  "uiRevision": "2",
+  "icon": "icon.svg"
+}
diff --git a/recipes-demo/webapp-samples/files/appinfo-jitsi.json b/recipes-demo/webapp-samples/files/appinfo-jitsi.json
new file mode 100644 (file)
index 0000000..f5e1d80
--- /dev/null
@@ -0,0 +1,11 @@
+{
+  "id": "webapps-jitsi",
+  "title": "Jitsi",
+  "description": "HTML5 Jitsi sample",
+  "version": "0.0.0",
+  "vendor": "Igalia, S.L.",
+  "type": "web",
+  "main": "index.html",
+  "uiRevision": "2",
+  "icon": "icon.svg"
+}
diff --git a/recipes-demo/webapp-samples/files/appinfo-youtube.json b/recipes-demo/webapp-samples/files/appinfo-youtube.json
new file mode 100644 (file)
index 0000000..f844bf7
--- /dev/null
@@ -0,0 +1,11 @@
+{
+  "id": "webapps-youtube",
+  "title": "Youtube",
+  "description": "HTML5 Youtube sample",
+  "version": "0.0.0",
+  "vendor": "Igalia, S.L.",
+  "type": "web",
+  "main": "index.html",
+  "uiRevision": "2",
+  "icon": "icon.svg"
+}
diff --git a/recipes-demo/webapp-samples/files/webapps-aquarium.desktop b/recipes-demo/webapp-samples/files/webapps-aquarium.desktop
deleted file mode 100644 (file)
index 49ae05a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Version=1.0
-Name=HTML5 Aquarium
-Comment=Aquarium
-GenericName=Aquarium
-Exec=/usr/bin/WebAppMgr --appid=webapps-aquarium --app-install-dir=/usr/lib/wam_apps/html5-aquarium/
-Icon=settings
-Terminal=false
-Type=Application
-Categories=System;
-StartupNotify=true
diff --git a/recipes-demo/webapp-samples/files/webapps-examples.desktop b/recipes-demo/webapp-samples/files/webapps-examples.desktop
deleted file mode 100644 (file)
index 0764cfd..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Version=1.0
-Name=HTML5 Examples
-Comment=Examples of web contents
-GenericName=Examples
-Exec=/usr/bin/WebAppMgr --appid=webapps-examples --app-install-dir=/usr/lib/wam_apps/html5-examples/
-Icon=settings
-Terminal=false
-Type=Application
-Categories=System;
-StartupNotify=true
diff --git a/recipes-demo/webapp-samples/files/webapps-jitsi.desktop b/recipes-demo/webapp-samples/files/webapps-jitsi.desktop
deleted file mode 100644 (file)
index 63a1043..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Version=1.0
-Name=HTML5 Jitsi
-Comment=Jitsi
-GenericName=Jitsi
-Exec=/usr/bin/WebAppMgr --appid=webapps-jitsi --app-install-dir=/usr/lib/wam_apps/html5-jitsi/
-Icon=settings
-Terminal=false
-Type=Application
-Categories=System;
-StartupNotify=true
diff --git a/recipes-demo/webapp-samples/files/webapps-youtube.desktop b/recipes-demo/webapp-samples/files/webapps-youtube.desktop
deleted file mode 100644 (file)
index 71faa0f..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Version=1.0
-Name=HTML5 YouTube
-Comment=YouTube
-GenericName=YouTube
-Exec=/usr/bin/WebAppMgr --appid=webapps-youtube --app-install-dir=/usr/lib/wam_apps/html5-youtube/
-Icon=settings
-Terminal=false
-Type=Application
-Categories=System;
-StartupNotify=true
index 6ca90bc..7828ecc 100644 (file)
@@ -1,10 +1,16 @@
 SUMMARY     = "AGL HTML5 Aquarium Demo"
 LICENSE     = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://aquarium/LICENSE;md5=9f0d95e61aa217eacd61ee6833cf411c"
-DESKTOP_FILE = "webapps-aquarium.desktop"
+APPINFO_FILE = "appinfo-aquarium.json"
 
 require webapp-samples.inc
 
+inherit pythonnative agl-app
+
+AGL_APP_TEMPLATE = "agl-app-web"
+AGL_APP_ID = "webapps-aquarium"
+AGL_APP_NAME = "Aquarium"
+
 do_install:append() {
   cp -R --no-dereference --preserve=mode,links ${S}/aquarium/* ${D}${WAM_APPLICATIONS_DIR}/${PN}
 }
index 7853797..080331e 100644 (file)
@@ -1,10 +1,16 @@
 SUMMARY     = "AGL HTML5 Examples"
 LICENSE     = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=7ea5dd8751060d9f04d2748030c547ed"
-DESKTOP_FILE = "webapps-examples.desktop"
+APPINFO_FILE = "appinfo-examples.json"
 
 require webapp-samples.inc
 
+inherit pythonnative agl-app
+
+AGL_APP_TEMPLATE = "agl-app-web"
+AGL_APP_ID = "webapps-examples"
+AGL_APP_NAME = "Examples"
+
 do_install:append() {
   cp -R --no-dereference --preserve=mode,links ${S}/examples/* ${D}${WAM_APPLICATIONS_DIR}/${PN}
 }
index 4c92e46..e24ff32 100644 (file)
@@ -1,10 +1,16 @@
 SUMMARY     = "AGL HTML5 Jitsi"
 LICENSE     = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=7ea5dd8751060d9f04d2748030c547ed"
-DESKTOP_FILE = "webapps-jitsi.desktop"
+APPINFO_FILE = "appinfo-jitsi.json"
 
 require webapp-samples.inc
 
+inherit pythonnative agl-app
+
+AGL_APP_TEMPLATE = "agl-app-web"
+AGL_APP_ID = "webapps-jitsi"
+AGL_APP_NAME = "Jitsi"
+
 do_install:append() {
   cp -R --no-dereference --preserve=mode,links ${S}/jitsi/* ${D}${WAM_APPLICATIONS_DIR}/${PN}
 }
index 8f45c42..240ce85 100644 (file)
@@ -1,10 +1,16 @@
 SUMMARY     = "AGL HTML5 Youtube"
 LICENSE     = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=7ea5dd8751060d9f04d2748030c547ed"
-DESKTOP_FILE = "webapps-youtube.desktop"
+APPINFO_FILE = "appinfo-youtube.json"
 
 require webapp-samples.inc
 
+inherit pythonnative agl-app
+
+AGL_APP_TEMPLATE = "agl-app-web"
+AGL_APP_ID = "webapps-youtube"
+AGL_APP_NAME = "Youtube"
+
 do_install:append() {
   cp -R --no-dereference --preserve=mode,links ${S}/youtube/* ${D}${WAM_APPLICATIONS_DIR}/${PN}
 }
index f2d61a0..1a74a46 100644 (file)
@@ -7,20 +7,17 @@ B       = "${WORKDIR}/build"
 
 SRC_URI = " \
   git://github.com/AGL-web-applications/webapp-samples.git;protocol=https;branch=master \
-  file://${DESKTOP_FILE} \
+  file://${APPINFO_FILE} \
 "
 SRCREV = "b24a62cc524bdec98a61acc03fc53cbab24c1571"
 
 WAM_APPLICATIONS_DIR="${libdir}/wam_apps"
-APPLICATIONS_DIR="${datadir}/applications"
 
 do_install() {
   install -d ${D}${WAM_APPLICATIONS_DIR}/${PN}
-  install -d ${D}${APPLICATIONS_DIR}
-  install ${WORKDIR}/${DESKTOP_FILE} ${D}${APPLICATIONS_DIR}
+  install ${WORKDIR}/${APPINFO_FILE} ${D}${WAM_APPLICATIONS_DIR}/${PN}/appinfo.json
 }
 
 FILES:${PN} = " \
   ${WAM_APPLICATIONS_DIR}/${PN} \
-  ${APPLICATIONS_DIR} \
 "