info "------------- wrt_widgets install start --------------"
local wgtdir=${TZ_SYS_SHARE}/widget_demo
- if [ -n "$(ls $wgtdir/*.wgt 2> /dev/null)" ]; then
- local nbinstall=0
- for wgt in $(grep "^$USER" $wgtdir/install.conf | cut -f2 -d':'); do
- info "installing $wgt"
- local try=1
- local ok=0
- while [ $try -le 3 ]; do
- flock -w 30 -e /tmp/pkgcmd_lock pkgcmd -i -q -t wgt -p $wgtdir/$wgt && { ok=1; break; }
- try=$((try+1))
- sleep 1
- done
- [ $ok -eq 1 ] && {
- info "$wgt installed successfully"
- nbinstall=$((nbinstall+1))
- } || info "failed to install $wgt"
+ local nbinstall=0
+ for wgt in $(grep "^$USER" $wgtdir/install.conf | cut -f2 -d':'); do
+ info "installing $wgt"
+ local try=1
+ local ok=0
+ while [ $try -le 3 ]; do
+ flock -w 30 -e /tmp/pkgcmd_lock pkgcmd -i -q -t wgt -p $wgtdir/$wgt && { ok=1; break; }
+ try=$((try+1))
+ sleep 1
done
-
- # signal tz-launcher that new apps were installed
- info "$nbinstall applications installed"
- if [ $nbinstall -gt 0 ]; then
- info "sending restart signal to tz-launcher"
- pkill -USR1 -U $UID tz-launcher
- fi
+ [ $ok -eq 1 ] && {
+ info "$wgt installed successfully"
+ nbinstall=$((nbinstall+1))
+ } || info "failed to install $wgt"
+ done
+
+ # signal tz-launcher that new apps were installed
+ info "$nbinstall applications installed"
+ if [ $nbinstall -gt 0 ]; then
+ info "sending restart signal to tz-launcher"
+ pkill -USR1 -U $UID tz-launcher
else
- info "$wgtdir doesn't contains any widgets (.wgt)"
+ info "$wgtdir hasn't installed widget (.wgt), init the bases..."
+ pkgcmd -l
+ info "init done"
fi
info "------------- wrt_widgets install end --------------"
mkdir -p %{buildroot}/%{_bindir}
cp install_widgets.sh %{buildroot}/%{_bindir}
-cp prepare_widgets.sh %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/%{TZ_SYS_SHARE}/widget_demo
cp -r apps/*.wgt %{buildroot}/%{TZ_SYS_SHARE}/widget_demo/
%defattr(-,root,root)
%{TZ_SYS_SHARE}/widget_demo/*
%attr(755,root,root) %{_bindir}/install_widgets.sh
-%attr(755,root,root) %{_bindir}/prepare_widgets.sh
%{_unitdir_user}/xwalk_widgets_preinstall.service
+++ /dev/null
-#!/bin/sh
-
-##### vconf create table from settings package #########################
-# Set vconf values with -g/-u options
-
-source /etc/tizen-platform.conf
-
-rm -rf ${TZ_SYS_DATA}/setting/set_info
-
-#### Bluetotth API ####################################################
-vconftool set -t string db/menu_widget/regionformat "en_GB.UTF-8"
-vconftool set -t int db/menu_widget/regionformat_time1224 "1"
-vconftool set -t string db/setting/accessibility/font_name "HelveticaNeue"
-
-########################################################################
-# PC Specific Environment settings
-
-mkdir -p ${TZ_SYS_RW_PACKAGES}
-
-##### WA : To allow multi-user launch ##########
-chmod -R a+rw ${TZ_SYS_DB}/
-