Add X-TIZEN-AppID filed in destop file 52/29552/1
authorBaptiste DURAND <baptiste.durand@open.eurogiciel.org>
Wed, 29 Oct 2014 12:46:38 +0000 (13:46 +0100)
committerBaptiste DURAND <baptiste.durand@open.eurogiciel.org>
Wed, 29 Oct 2014 12:46:38 +0000 (13:46 +0100)
This permits to have the AppId in desktop file when we install an
app trougth Application framework

It is usefull for TC-1968

BUG-Tizen=TC-1968

Change-Id: I152778db34bc2a018596a960890c2d4f367e9d23
Signed-off-by: Baptiste DURAND <baptiste.durand@open.eurogiciel.org>
parser/pkgmgr_parser.c

index 4c0b3c9..ae46ed2 100755 (executable)
@@ -4557,8 +4557,15 @@ static int __ps_make_nativeapp_desktop(manifest_x * mfx, const char *manifest, A
                        fwrite(buf, 1, strlen(buf), file);
                }
 
-               snprintf(buf, BUFMAX, "X-TIZEN-PkgID=%s\n", mfx->package);
-               fwrite(buf, 1, strlen(buf), file);
+               if(mfx->type) {
+                       snprintf(buf, BUFMAX, "X-TIZEN-PkgID=%s\n", mfx->package);
+                       fwrite(buf, 1, strlen(buf), file);
+               }
+               if(mfx->uiapplication->appid) {
+                       snprintf(buf, BUFMAX, "X-TIZEN-AppID=%s\n", mfx->uiapplication->appid);
+                       fwrite(buf, 1, strlen(buf), file);
+               }
+
 
 
 //             snprintf(buf, BUFMAX, "X-TIZEN-PackageType=rpm\n");