INPUT=$1
OUTPUT=$2
PKGID=$3
-CLIENTID=$4
+USRAPPDIR=$4
+CLIENTID=$5
INSTALLLOCATION=0
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]
if [ $INSTALLLOCATION -eq 1 ]
then
/bin/sed -e "s#<icon>#<icon>/opt/usr/apps/$PKGID/shared/res/#g" \
- -e "s#exec=\"#exec=\"/opt/usr/apps/$PKGID/bin/#g" \
+ -e "s#exec=\"#exec=\"$USRAPPDIR/$PKGID/bin/#g" \
-e "/<feature.*>/ d" -e "/<feature /,/<\/feature>/ d" \
-e "s#\(<manifest[^>]*\)>#\1 storeclient-id=\"$CLIENTID\">#" \
-e "s#package=\"#type=\"coretpk\" package=\"#g" $INPUT > $OUTPUT
else
/bin/sed -e "s#<icon>#<icon>/opt/usr/apps/$PKGID/shared/res/#g" \
- -e "s#exec=\"#exec=\"/opt/usr/apps/$PKGID/bin/#g" \
+ -e "s#exec=\"#exec=\"$USRAPPDIR/$PKGID/bin/#g" \
-e "/<feature.*>/ d" -e "/<feature /,/<\/feature>/ d" \
-e "s#\(<manifest[^>]*\)>#\1 install-location=\"internal-only\">#" \
-e "s#\(<manifest[^>]*\)>#\1 storeclient-id=\"$CLIENTID\">#" \
if [ $INSTALLLOCATION -eq 1 ]
then
/bin/sed -e "s#<icon>#<icon>/opt/usr/apps/$PKGID/shared/res/#g" \
- -e "s#exec=\"#exec=\"/opt/usr/apps/$PKGID/bin/#g" \
+ -e "s#exec=\"#exec=\"$USRAPPDIR/$PKGID/bin/#g" \
-e "/<feature.*>/ d" -e "/<feature /,/<\/feature>/ d" \
-e "s#\(<manifest[^>]*\)>#\1 storeclient-id=\"$CLIENTID\">#" \
-e "s#package=\"#type=\"coretpk\" package=\"#g" $INPUT > $OUTPUT
else
/bin/sed -e "s#<icon>#<icon>/opt/usr/apps/$PKGID/shared/res/#g" \
- -e "s#exec=\"#exec=\"/opt/usr/apps/$PKGID/bin/#g" \
+ -e "s#exec=\"#exec=\"$USRAPPDIR/$PKGID/bin/#g" \
-e "/<feature.*>/ d" -e "/<feature /,/<\/feature>/ d" \
-e "s#\(<manifest[^>]*\)>#\1 install-location=\"auto\">#" \
-e "s#\(<manifest[^>]*\)>#\1 storeclient-id=\"$CLIENTID\">#" \
then
/bin/sed -e "s#<icon>#<icon>/opt/usr/apps/$PKGID/shared/res/#g" \
-e "/<feature.*>/ d" -e "/<feature /,/<\/feature>/ d" \
- -e "s#exec=\"#exec=\"/opt/usr/apps/$PKGID/bin/#g" \
+ -e "s#exec=\"#exec=\"$USRAPPDIR/$PKGID/bin/#g" \
-e "s#package=\"#type=\"coretpk\" package=\"#g" $INPUT > $OUTPUT
else
/bin/sed -e "s#<icon>#<icon>/opt/usr/apps/$PKGID/shared/res/#g" \
- -e "s#exec=\"#exec=\"/opt/usr/apps/$PKGID/bin/#g" \
+ -e "s#exec=\"#exec=\"$USRAPPDIR/$PKGID/bin/#g" \
-e "/<feature.*>/ d" -e "/<feature /,/<\/feature>/ d" \
-e "s#\(<manifest[^>]*\)>#\1 install-location=\"internal-only\">#" \
-e "s#package=\"#type=\"coretpk\" package=\"#g" $INPUT > $OUTPUT
then
/bin/sed -e "s#<icon>#<icon>/opt/usr/apps/$PKGID/shared/res/#g" \
-e "/<feature.*>/ d" -e "/<feature /,/<\/feature>/ d" \
- -e "s#exec=\"#exec=\"/opt/usr/apps/$PKGID/bin/#g" \
+ -e "s#exec=\"#exec=\"$USRAPPDIR/$PKGID/bin/#g" \
-e "s#package=\"#type=\"coretpk\" package=\"#g" $INPUT > $OUTPUT
else
/bin/sed -e "s#<icon>#<icon>/opt/usr/apps/$PKGID/shared/res/#g" \
- -e "s#exec=\"#exec=\"/opt/usr/apps/$PKGID/bin/#g" \
+ -e "s#exec=\"#exec=\"$USRAPPDIR/$PKGID/bin/#g" \
-e "/<feature.*>/ d" -e "/<feature /,/<\/feature>/ d" \
-e "s#\(<manifest[^>]*\)>#\1 install-location=\"auto\">#" \
-e "s#package=\"#type=\"coretpk\" package=\"#g" $INPUT > $OUTPUT
/*run script*/
if (strstr(manifestfilepath, OPT_USR_APPS)) {
snprintf(rwmanifest, BUF_SIZE, "%s/%s.xml", OPT_SHARE_PACKAGES, pkgid);
- const char *rw_xml_argv[] = { CORETPK_RW_XML_CONVERTER, manifestfilepath, rwmanifest, pkgid, clientid, NULL };
+ const char *rw_xml_argv[] = { CORETPK_RW_XML_CONVERTER, manifestfilepath, rwmanifest, pkgid, OPT_USR_APPS, clientid, NULL };
ret = _ri_xsystem(rw_xml_argv);
} else {
snprintf(rwmanifest, BUF_SIZE, "%s/%s.xml", USR_SHARE_PACKAGES, pkgid);
snprintf(outputxml, BUF_SIZE, "%s/%s", TEMP_XML_DIR, CORETPK_XML);
_LOGD("input xml = [%s], out xml = [%s]", manifest, outputxml);
- const char *unzip_argv_rw[] = { CORETPK_RW_XML_CONVERTER, manifest, outputxml, pkgid, NULL, NULL };
+ const char *unzip_argv_rw[] = { CORETPK_RW_XML_CONVERTER, manifest, outputxml, pkgid, OPT_USR_APPS, NULL, NULL };
const char *unzip_argv_ro[] = { CORETPK_RO_XML_CONVERTER, manifest, outputxml, pkgid, NULL, NULL };
if (strstr(manifest, OPT_USR_APPS)) {