summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--install.conf5
-rwxr-xr-xinstall_widgets.sh13
-rw-r--r--packaging/wrt-widgets.spec3
3 files changed, 17 insertions, 4 deletions
diff --git a/install.conf b/install.conf
new file mode 100644
index 0000000..a3d51dc
--- /dev/null
+++ b/install.conf
@@ -0,0 +1,5 @@
+alice:annex.wgt
+bob:bubblewrap.wgt go.wgt
+carol:
+app:mancala.wgt
+guest:BluetoothChat.wgt
diff --git a/install_widgets.sh b/install_widgets.sh
index 42beb02..d1f56a0 100755
--- a/install_widgets.sh
+++ b/install_widgets.sh
@@ -15,16 +15,23 @@ if [ -z "$(ls $wgtdir/*.wgt 2> /dev/null)" ]; then
exit 1
fi
-for wgt in $wgtdir/*.wgt
+for wgt in $(grep "^$USER" $wgtdir/install.conf | cut -f2 -d':'); do
do
echo "installing $wgt"
if [ -x /usr/bin/wrt-installer ]; then
- wrt-installer -i $wgt
+ wrt-installer -i $wgtdir/$wgt
else
- xwalkctl -i $wgt
+ xwalkctl -i $wgtdir/$wgt
fi
done
+# setup desktop icons for xwalk
+if [ ! -x /usr/bin/wrt-installer ]; then
+ for id in $(sqlite3 ~/.config/xwalk-service/applications.db 'select id from applications'); do
+ ln -sf /opt/share/applications/xwalk-service.$id.*.desktop ~/.applications/desktop/
+ done
+fi
+
[[ "$(id -u)" == "0" ]] && chmod -R a+rw ${TZ_SYS_DB}/
if [ -x /usr/bin/wrt-launcher ]; then
diff --git a/packaging/wrt-widgets.spec b/packaging/wrt-widgets.spec
index e8f6b8a..47353f0 100644
--- a/packaging/wrt-widgets.spec
+++ b/packaging/wrt-widgets.spec
@@ -26,10 +26,11 @@ cp prepare_widgets.sh %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/%{TZ_SYS_SHARE}/widget_demo
cp -r *.wgt %{buildroot}/%{TZ_SYS_SHARE}/widget_demo/
+cp install.conf %{buildroot}/%{TZ_SYS_SHARE}/widget_demo/
%post
%files
-%{TZ_SYS_SHARE}/widget_demo/*.wgt
+%{TZ_SYS_SHARE}/widget_demo/*
%attr(755,root,root) %{_bindir}/install_widgets.sh
%attr(755,root,root) %{_bindir}/prepare_widgets.sh