Use pkgcmd to install SDL Crosswalk app. 63/28563/1 accepted/tizen_3.0.m14.3_ivi tizen_3.0.m14.3_ivi accepted/tizen/ivi/20141010.190049 submit/tizen_ivi/20141009.210406 tizen_3.0.m14.3_ivi_release
authorOssama Othman <ossama.othman@intel.com>
Thu, 9 Oct 2014 20:39:12 +0000 (13:39 -0700)
committerOssama Othman <ossama.othman@intel.com>
Thu, 9 Oct 2014 20:47:55 +0000 (13:47 -0700)
This set of changes does the following:
- reduces hardcoding of SDL Crosswalk package and app IDs
- corrects SDL Crosswalk package installation and
  uninstallation

With these changes in place, the sample HMI may once again be
launched through the smartDeviceLinkCore program.  The sample
HMI now also responds to touch input as well.

Change-Id: I06883624e71f706d3ef0317383be7dc240538cff
Bug-Tizen: TC-244
Signed-off-by: Ossama Othman <ossama.othman@intel.com>
packaging/config.xml.in [moved from packaging/config.xml with 92% similarity]
packaging/smartdevicelink.changes
packaging/smartdevicelink.spec

similarity index 92%
rename from packaging/config.xml
rename to packaging/config.xml.in
index bf45b6a..c7afef4 100644 (file)
@@ -2,8 +2,8 @@
 <widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets"
        id="http://com.intel.tizen/smartdevicelink" version="1.0.0" viewmodes="maximized">
        <access origin="*" subdomains="true"></access>
-       <tizen:application id="SDL0000001.SmartDeviceLink"
-               package="SDL0000001" required_version="2.0" />
+       <tizen:application id="%SDL_APPID%"
+               package="%SDL_PKGID%" required_version="2.0" />
        <content src="index.html" />
        <icon src="images/sdl/devices.png" />
        <name>SmartDeviceLink</name>
index f805338..0f1d3b1 100644 (file)
@@ -1,3 +1,7 @@
+* Thu Oct 09 2014 Ossama Othman <ossama.othman@intel.com> submit/tizen_ivi/20140918.175344-1-gedd6685
+- Launch SDL HMIs via xwalk-launcher.
+- Use pkgcmd to install SDL Crosswalk app.
+
 * Thu Aug 07 2014 Ossama Othman <ossama.othman@intel.com> accepted/tizen/ivi/panda/20140403.015744-2-g2948856
 - Remove dependency to MiniBrowser
 - Make SmartDeviceLink work with Crosswalk.
index 7e54acf..785ccda 100644 (file)
@@ -1,3 +1,6 @@
+%define SDL_PKGID SDL0000001
+%define SDL_APPID %{SDL_PKGID}.SmartDeviceLink
+
 Name:          smartdevicelink
 Summary:       GENIVI mobile device and HMI integration
 Version:       2.0
@@ -8,7 +11,7 @@ URL:           http://projects.genivi.org/smartdevicelink/
 Source:        %{name}-%{version}.tar.gz
 Source1:       %{name}.xml
 Source1001:    %{name}.manifest
-Source2001:    config.xml
+Source2001:    config.xml.in
 Source2002:    manifest.json
 BuildRequires: cmake
 BuildRequires: pkgconfig(bluez)
@@ -21,7 +24,6 @@ BuildRequires: pkgconfig(libtzplatform-config)
 BuildRequires: doxygen
 BuildRequires: zip
 Requires:      crosswalk
-Requires(post): /usr/bin/pkg_initdb
 
 # Custom SDL-enabled HMIs should "Provide" this virtual package.
 Requires:      smartdevicelink-hmi
@@ -91,12 +93,15 @@ install -m 0755 SDL_Core/src/thirdPartyLibs/jsoncpp/libjsoncpp.so %{buildroot}%{
 # The SDL HMI will be launched with xwalk-launcher so package it as a
 # Crosswalk widget.
 mkdir -p %{buildroot}%{TZ_SYS_APP_PREINSTALL}
-cd %{dirname:%SOURCE2001} \
-  && zip %{buildroot}%{TZ_SYS_APP_PREINSTALL}/%{name}.wgt config.xml manifest.json \
-  && cd -
-cd SDL_Core/src/components/HMI \
-  && zip -r %{buildroot}%{TZ_SYS_APP_PREINSTALL}/%{name}.wgt . \
-  && cd -
+pushd %{dirname:%SOURCE2001}
+sed -e 's/%%SDL_PKGID%%/%{SDL_PKGID}/' \
+    -e 's/%%SDL_APPID%%/%{SDL_APPID}/' %{SOURCE2001} > config.xml
+zip %{buildroot}%{TZ_SYS_APP_PREINSTALL}/%{name}.wgt config.xml manifest.json
+rm config.xml
+popd
+pushd SDL_Core/src/components/HMI
+zip -r %{buildroot}%{TZ_SYS_APP_PREINSTALL}/%{name}.wgt .
+popd
 
 # Create the 'hmi_link' file with the location of the sample HMI.
 # Normally this would be the path to the top-level index.html file for
@@ -104,7 +109,7 @@ cd SDL_Core/src/components/HMI \
 # since we are using xwalk-laucher to launch the HMI we must instead
 # provide the SDL Crosswalk application ID, i.s. SmartDeviceLink,
 # instead.
-echo SDL0000001.SmartDeviceLink > %{buildroot}%{_sysconfdir}/%{name}/hmi_link
+echo %{SDL_APPID} > %{buildroot}%{_sysconfdir}/%{name}/hmi_link
 
 # Install Tizen package metadata for smartdevicelink
 mkdir -p %{buildroot}%{_datadir}/packages/
@@ -118,14 +123,12 @@ install -m 0644 SDL_Core/src/components/HMI/images/sdl/devices.png \
 %post -p /sbin/ldconfig
 
 %post sample-hmi
-/usr/bin/pkg_initdb
-su app -c "xwalkctl -i %{TZ_SYS_APP_PREINSTALL}/%{name}.wgt"
+su app -c "pkgcmd -q -i -t wgt -p %{TZ_SYS_APP_PREINSTALL}/%{name}.wgt"
 
 %postun -p /sbin/ldconfig
 
 %postun sample-hmi
-/usr/bin/pkg_initdb
-su app -c "xwalkctl -u $(su app -c "xwalkctl list | grep SmartDeviceLink | cut -c 1-32")"
+su app -c "pkgcmd -u -n %{SDL_PKGID} -q"
 
 %files
 %manifest %{name}.manifest