change directory /shared-res to /shared/res.
authorDongeup Ham <dongeup.ham@samsung.com>
Thu, 3 Jan 2013 09:08:54 +0000 (18:08 +0900)
committerDongeup Ham <dongeup.ham@samsung.com>
Thu, 3 Jan 2013 09:08:54 +0000 (18:08 +0900)
Change-Id: I484546a3a16d09316a682f195ef6e38e0f0bddcb
Signed-off-by: Dongeup Ham <dongeup.ham@samsung.com>
inc/InstallerDefs.h
src/Installer/PreloadedInstaller.cpp
src/Manager/PermissionManager.cpp

index 34d4c80..f8fb4c9 100755 (executable)
 #ifndef _INSTALLER_DEFS_H_
 #define _INSTALLER_DEFS_H_
 
-#define OSP_INSTALLER_VERSION "osp-installer version = [2013/01/03]_[2]"
+#define OSP_INSTALLER_VERSION "osp-installer version = [2013/01/03]_[3]"
 
 #define DIR_BIN                                L"/bin"
 #define DIR_INFO                       L"/info"
 #define DIR_RES                                L"/res"
 #define DIR_DATA                       L"/data"
 #define DIR_ICONS                      L"/icons"
-#define DIR_SHARED_RES         L"/shared-res"
+#define DIR_SHARED                     L"/shared"
 #define DIR_LIB                                L"/lib"
 #define DIR_SETTING                    L"/setting"
 #define DIR_CONTENTS           L"/contents"
+#define DIR_SHARED_RES         L"/shared/res"
 
 #define SLP_DIR_BIN                    L"/bin"
 #define SLP_DIR_RES                    L"/res"
index 5e3679d..10a2cf6 100755 (executable)
@@ -92,8 +92,12 @@ PreloadedInstaller::OnInit(void)
        destPath = destRootPath + DIR_LIB;
        InstallerUtil::CreateSymlink(srcPath, destPath);
 
-       srcPath = path + DIR_SHARED_RES;
-       destPath = destRootPath + DIR_SHARED_RES;
+       srcPath = path + DIR_SHARED;
+       destPath = destRootPath + DIR_SHARED;
+       InstallerUtil::CopyDirectory(srcPath, destPath);
+
+       srcPath += DIR_RES;
+       destPath += DIR_RES;
        if (File::IsFileExist(srcPath) == false)
        {
                srcPath = path + DIR_ICONS;
index b5e1564..96f7286 100755 (executable)
@@ -82,7 +82,15 @@ PermissionManager::SetDirectory(InstallationContext* pContext)
        destPath = appRootPath + DIR_LIB;
        InstallerUtil::ChangeDirectoryPermission(destPath, PERM_BASE | PERM_EXECUTE);
 
-       // appRoot/icons
+       // appRoot/shared
+       destPath = appRootPath + DIR_SHARED;
+       if (File::IsFileExist(destPath) == false)
+       {
+               r = Directory::Create(destPath, false);
+               TryReturn(!IsFailed(r), INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] Directory::Create() failed");
+       }
+       InstallerUtil::ChangeDirectoryPermission(destPath, PERM_BASE);
+
        destPath = appRootPath + DIR_SHARED_RES;
        if (File::IsFileExist(destPath) == false)
        {