Add crosswalk to wayland images
[platform/upstream/meta-generic.git] / scripts / generic-crosswalk.post
index cfd5678..e3ea16d 100644 (file)
@@ -1,9 +1,32 @@
 ############### generic-crosswalk.post ################
 
-# patch install path of crosswalk
-if [ -d /usr/lib64/xwalk ]; then
-       ln -s ../lib64/xwalk /usr/lib
-fi
+# Initialize the native application database
+pkg_initdb
+ail_initdb
+
+# start wrt widgets preinstall
+prepare_widgets.sh
+
+# install widgets at first run
+cat <<EOF >/lib/systemd/user/xwalk_widgets_preinstall.service
+[Unit]
+Description=Installation of pre-installed widgets
+After=dbus.service
+ConditionPathExists=!/home/app/.config/xwalk-service/applications.db
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/install_widgets.sh
+
+[Install]
+WantedBy=weston.target
+EOF
+
+mkdir -p /lib/systemd/user/xwalk.target.wants
+ln -sf ../xwalk_widgets_preinstall.service /lib/systemd/user/weston.target.wants/xwalk_widgets_preinstall.service
+
+
+# add launchers to weston.ini
 
 if [ -f /usr/bin/weston ]; then
 
@@ -13,11 +36,17 @@ if [ -f /usr/bin/weston ]; then
 
 [launcher]
 icon=/usr/share/icons/tizen/32x32/web-browser.png
-path=/usr/lib64/xwalk/xwalk http://www.tizen.org
+path=/usr/lib64/xwalk/xwalk http://www.google.com
 
 [launcher]
-icon=/usr/share/icons/tizen/32x32/web-browser.png
-path=/usr/lib64/xwalk/xwalk http://www.google.com
+icon=/usr/share/icons/tizen/32x32/annex.png
+path=/usr/bin/xwalk-launcher hnabpnbionlaokfnobomjleblmmiefig
+
+[launcher]
+icon=/usr/share/icons/tizen/32x32/bubblewrap.png
+path=/usr/bin/xwalk-launcher kmnbdhfbkjkeilhpbooaecgpllbollfn
+
 EOF
 
 fi
+