Add appsetting tag in xml
authorDuyoung Jang <duyoung.jang@samsung.com>
Tue, 19 Mar 2013 08:54:04 +0000 (17:54 +0900)
committerDuyoung Jang <duyoung.jang@samsung.com>
Tue, 19 Mar 2013 08:54:04 +0000 (17:54 +0900)
Change-Id: Ic43a152bf09628b87a16d8b15cb5d0fe69265bde
Signed-off-by: Duyoung Jang <duyoung.jang@samsung.com>
inc/InstallerDefs.h
src/Context/InstallationContext.cpp
src/Context/InstallationContext.h
src/Manager/PermissionManager.cpp
src/XmlHandler/ManifestGenerator.cpp

index fb38f16..0c1056c 100755 (executable)
@@ -23,7 +23,7 @@
 
 #include "InstallerUtil.h"
 
-#define OSP_INSTALLER_VERSION "version=[20130319.1]"
+#define OSP_INSTALLER_VERSION "version=[20130319.2]"
 
 #define DIR_BIN                                L"/bin"
 #define DIR_INFO                       L"/info"
index 4cfc34d..d3453e3 100755 (executable)
@@ -50,6 +50,7 @@ InstallationContext::InstallationContext(void)
 ,__isHybridService(false)
 ,__isVerificationMode(false)
 ,__isUpdated(false)
+,__isAppSetting(false)
 ,__operation(INSTALLER_OPERATION_INSTALL)
 ,__storage(INSTALLATION_STORAGE_INTERNAL)
 ,__rootCertType(ROOT_CERTIFICATE_NONE)
index b55ef80..3947501 100755 (executable)
@@ -109,6 +109,7 @@ public:
        bool __isHybridService;
        bool __isVerificationMode;
        bool __isUpdated;
+       bool __isAppSetting;
 
        InstallerOperation __operation;
        InstallationStorage __storage;
index d251232..70cfb8c 100755 (executable)
@@ -55,7 +55,6 @@ PermissionManager::SetDirectory(InstallationContext* pContext)
 
        String destPath;
        String appRootPath;
-       FileAttributes attribute;
        SmackManager smackManager;
 
        appRootPath = pContext->__rootPath;
@@ -123,8 +122,7 @@ PermissionManager::SetDirectory(InstallationContext* pContext)
 
        // appRoot/setting
        destPath = appRootPath + DIR_SETTING;
-       r = File::GetAttributes(destPath, attribute);
-       if (r == E_SUCCESS)
+       if (pContext->__isAppSetting == true)
        {
                String appVersion = pContext->__version;
                String srcPath;
index d82e20f..f465df6 100755 (executable)
@@ -62,6 +62,7 @@ bool
 ManifestGenerator::Write()
 {
        String location;
+       String appSetting(L"false");
 
        if (__pContext->__isPreloaded == true)
        {
@@ -72,6 +73,13 @@ ManifestGenerator::Write()
                location = L"auto";
        }
 
+       String appSettingPath = __pContext->__rootPath + DIR_SETTING;
+       if (File::IsFileExist(appSettingPath) == true)
+       {
+               __pContext->__isAppSetting = true;
+               appSetting = L"true";
+       }
+
        __pWriter->Construct(__pContext->__coreXmlPath);
 
        __pWriter->StartElement("manifest");
@@ -81,6 +89,7 @@ ManifestGenerator::Write()
        __pWriter->WriteAttribute("version", __pContext->__version);
        __pWriter->WriteAttribute("install-location", location);
        __pWriter->WriteAttribute("root_path", __pContext->__rootPath);
+       __pWriter->WriteAttribute("appsetting", appSetting);
 
        __pWriter->StartElement("label");
        __pWriter->WriteString(__pContext->__displayName);