summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org>2014-04-08 11:14:26 +0200
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>2014-04-08 16:34:35 +0200
commit4add4965e22cb52e1f0b06391c5324d49a5bfd1c (patch)
tree1485fecd336a18c64a9a408682d1a9d2c4b1bde2
parent142e0d36329ac17bf880df0492b967bc502d86bb (diff)
downloadwrt-widgets-4add4965e22cb52e1f0b06391c5324d49a5bfd1c.tar.gz
wrt-widgets-4add4965e22cb52e1f0b06391c5324d49a5bfd1c.tar.bz2
wrt-widgets-4add4965e22cb52e1f0b06391c5324d49a5bfd1c.zip
Remove harcoded path
Change-Id: I495286cd68a57fc36316f5def2397b2c0f6cf0fa Signed-off-by: Jean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org>
-rwxr-xr-xinstall_widgets.sh12
-rwxr-xr-xprepare_widgets.sh10
2 files changed, 13 insertions, 9 deletions
diff --git a/install_widgets.sh b/install_widgets.sh
index 9d7eb8c..91f9fc5 100755
--- a/install_widgets.sh
+++ b/install_widgets.sh
@@ -7,7 +7,9 @@
# exit 1
#fi
-wgtdir=/usr/share/widget_demo
+source /etc/tizen-platform.conf
+
+wgtdir=${TZ_SYS_SHARE}/widget_demo
if [ -z "$(ls $wgtdir/*.wgt 2> /dev/null)" ]; then
echo "$wgtdir doesn't contains any widgets (.wgt)" 1>&2
exit 1
@@ -23,8 +25,8 @@ do
fi
done
-repo=/opt/usr/apps/
-chmod -R a+rw /opt/dbspace/
+repo=${TZ_USER_APP}/
+chmod -R a+rw ${TZ_SYS_DB}/
if [ -x /usr/bin/wrt-launcher ]; then
wrt-launcher --list |
@@ -36,13 +38,13 @@ if [ -x /usr/bin/wrt-launcher ]; then
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
+ diric=${TZ_SYS_SHARE}/icons/hicolor/$res/apps
[[ -d $diric ]] || mkdir -p $diric
cp $x $diric/$name.png
fi
fi
done
- desk=/usr/share/applications/$name.desktop
+ desk=${TZ_SYS_RO_DESKTOP_APP}/$name.desktop
cat << EOC > $desk
[Desktop Entry]
Type=Application
diff --git a/prepare_widgets.sh b/prepare_widgets.sh
index daff164..4b6972a 100755
--- a/prepare_widgets.sh
+++ b/prepare_widgets.sh
@@ -3,7 +3,9 @@
##### vconf create table from settings package #########################
# Set vconf values with -g/-u options
-rm -rf /opt/data/setting/set_info
+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"
@@ -14,8 +16,8 @@ vconftool set -t string db/setting/accessibility/font_name "HelveticaNeue"
# PC Specific Environment settings
-mkdir -p /opt/share/packages
-rm -f /opt/dbspace/.wrt*
+mkdir -p ${TZ_SYS_RW_PACKAGES}
+rm -f ${TZ_SYS_DB}/.wrt*
if [ -x /usr/bin/wrt-client ]; then
wrt_commons_create_clean_db.sh
@@ -25,5 +27,5 @@ pkg_initdb
ail_initdb
##### WA : To allow multi-user launch ##########
-chmod -R a+rw /opt/dbspace/
+chmod -R a+rw ${TZ_SYS_DB}/