diff options
-rwxr-xr-x | install_widgets.sh | 63 | ||||
-rw-r--r-- | launchpad | 2 | ||||
-rw-r--r-- | packaging/wrt-widgets.spec | 20 | ||||
-rwxr-xr-x | prepare_widgets.sh | 16 | ||||
-rw-r--r-- | wrt | 2 |
5 files changed, 44 insertions, 59 deletions
diff --git a/install_widgets.sh b/install_widgets.sh index 84ccc7b..6376c72 100755 --- a/install_widgets.sh +++ b/install_widgets.sh @@ -16,40 +16,45 @@ fi for wgt in $wgtdir/*.wgt do echo "installing $wgt" - wrt-installer -i $wgt + if [ -x /usr/bin/wrt-installer ]; then + wrt-installer -i $wgt + else + xwalkctl -i $wgt + fi done - repo=/opt/usr/apps/ chmod -R a+rw /opt/dbspace/ -wrt-launcher --list | -awk 'NR>2{print $2, $5, $6}' | -while read name packid appid -do - bin=$repo/$packid/bin/$appid - for x in $repo/$packid/res/wgt/*[iI][cC][oO][nN]*; do - if [[ -f $x ]]; then - res=$(file -b $x|cut -d , -f 2|tr -d ' '|egrep '[0-9]+x[0-9]+') - if [[ -n "$res" ]]; then - diric=/usr/share/icons/hicolor/$res/apps - [[ -d $diric ]] || mkdir -p $diric - cp $x $diric/$name.png - fi - fi - done - desk=/usr/share/applications/$name.desktop - cat << EOC > $desk -[Desktop Entry] -Type=Application -Name=$name -Exec=$bin -Icon=$name -Terminal=false -Categories=WRT;Game +if [ -x /usr/bin/wrt-launcher ]; then + wrt-launcher --list | + awk 'NR>2{print $2, $5, $6}' | + while read name packid appid + do + bin=$repo/$packid/bin/$appid + for x in $repo/$packid/res/wgt/*[iI][cC][oO][nN]*; do + if [[ -f $x ]]; then + res=$(file -b $x|cut -d , -f 2|tr -d ' '|egrep '[0-9]+x[0-9]+') + if [[ -n "$res" ]]; then + diric=/usr/share/icons/hicolor/$res/apps + [[ -d $diric ]] || mkdir -p $diric + cp $x $diric/$name.png + fi + fi + done + desk=/usr/share/applications/$name.desktop + cat << EOC > $desk + [Desktop Entry] + Type=Application + Name=$name + Exec=$bin + Icon=$name + Terminal=false + Categories=WRT;Game EOC -done + done +fi -update-desktop-database -xdg-icon-resource forceupdate +#update-desktop-database +#xdg-icon-resource forceupdate diff --git a/launchpad b/launchpad deleted file mode 100644 index 844ad4c..0000000 --- a/launchpad +++ /dev/null @@ -1,2 +0,0 @@ -DISPLAY=:0 -XAUTHORITY=/run/.x11WRT diff --git a/packaging/wrt-widgets.spec b/packaging/wrt-widgets.spec index 588ea72..fbe246b 100644 --- a/packaging/wrt-widgets.spec +++ b/packaging/wrt-widgets.spec @@ -6,17 +6,9 @@ Group: Web Framework/Web Run Time License: Apache-2.0 BuildArch: noarch Source0: %{name}-%{version}.tar.gz -Requires: wrt -Requires: wrt-commons -Requires: wrt-installer -Requires: wrt-plugins-tizen -Requires: wrt-security -## Requires: daemon-launch-config-pc -## Requires: dbus-config-pc -Requires: libprivilege-control-conf %description -Wrt-widgets prepare a suitable pc oriented environment to install WRT widgets +Wrt-widgets prepare a suitable pc oriented environment to install Web apps After installing wrt-widgets, launch install_widgets.sh script as root to install them. %prep @@ -30,14 +22,6 @@ mkdir -p %{buildroot}/%{_bindir} cp install_widgets.sh %{buildroot}/%{_bindir} cp prepare_widgets.sh %{buildroot}/%{_bindir} -if [ ! -d %{buildroot}/%{_sysconfdir}/sysconfig ] -then - mkdir -p %{buildroot}/%{_sysconfdir}/sysconfig -fi -cp wrt %{buildroot}/%{_sysconfdir}/sysconfig/ -cp launchpad %{buildroot}/%{_sysconfdir}/sysconfig/ - - if [ ! -d %{buildroot}/%{_datadir}/widget_demo ] then mkdir -p %{buildroot}/%{_datadir}/widget_demo @@ -51,5 +35,3 @@ cp -r *.wgt %{buildroot}/%{_datadir}/widget_demo/ %{_datadir}/widget_demo/*.wgt %attr(755,root,root) %{_bindir}/install_widgets.sh %attr(755,root,root) %{_bindir}/prepare_widgets.sh -%attr(644,root,root) %{_sysconfdir}/sysconfig/wrt -%attr(644,root,root) %{_sysconfdir}/sysconfig/launchpad diff --git a/prepare_widgets.sh b/prepare_widgets.sh index 739ccc1..daff164 100755 --- a/prepare_widgets.sh +++ b/prepare_widgets.sh @@ -2,23 +2,25 @@ ##### vconf create table from settings package ######################### # Set vconf values with -g/-u options -GOPTION="-g 6514" rm -rf /opt/data/setting/set_info #### Bluetotth API #################################################### -vconftool $GOPTION set -t string db/menu_widget/regionformat "en_GB.UTF-8" -vconftool $GOPTION set -t int db/menu_widget/regionformat_time1224 "1" -vconftool $GOPTION set -t string db/setting/accessibility/font_name "HelveticaNeue" +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 /opt/share/packages -rm /opt/dbspace/.wrt* -wrt_commons_create_clean_db.sh -wrt_reset_db.sh +rm -f /opt/dbspace/.wrt* + +if [ -x /usr/bin/wrt-client ]; then + wrt_commons_create_clean_db.sh + wrt_reset_db.sh +fi pkg_initdb ail_initdb @@ -1,2 +0,0 @@ -DISPLAY=:0 -XAUTHORITY=/run/.x11WRT |