installation location to /opt/apps for all applications
authorDongeup Ham <dongeup.ham@samsung.com>
Wed, 7 Nov 2012 04:27:14 +0000 (13:27 +0900)
committerDongeup Ham <dongeup.ham@samsung.com>
Wed, 7 Nov 2012 04:27:14 +0000 (13:27 +0900)
Change-Id: I1642ce5a099ad7c92593c2fc0c45ae06ab2d3649

inc/InstallerDefs.h
src/Installer/PreloadedInstaller.cpp
src/Util/InstallerUtil.cpp

index 03acf8a..b731b60 100755 (executable)
@@ -21,7 +21,7 @@
 #ifndef _INSTALLER_DEFS_H_
 #define _INSTALLER_DEFS_H_
 
-#define OSP_INSTALLER_VERSION "osp-installer version = [2012/11/07]"
+#define OSP_INSTALLER_VERSION "osp-installer version = [2012/11/07]_[2]"
 
 #define DIR_BIN                                L"/bin"
 #define DIR_INFO                       L"/info"
index 39d589a..4453894 100755 (executable)
  */
 
 #include <FBaseLog.h>
+#include <FIoDirectory.h>
 
 #include "PreloadedInstaller.h"
 #include "InstallerUtil.h"
 
 using namespace Osp::Base;
+using namespace Osp::Io;
 
 PreloadedInstaller::PreloadedInstaller(void)
 {
@@ -60,7 +62,7 @@ PreloadedInstaller::OnInit(void)
        destRootPath += appId;
 
        InstallerUtil::Remove(destRootPath);
-       InstallerUtil::Remove(destRootPath);
+       Directory::Create(destRootPath);
 
        String srcPath;
        String destPath;
@@ -97,7 +99,6 @@ PreloadedInstaller::OnInit(void)
        destPath = destRootPath + DIR_SETTING;
        InstallerUtil::CreateSymlink(srcPath, destPath);
 
-       // pContext->SetInputPath(destRootPath);
        pContext->SetInstallDir(destRootPath);
 
        return DirectoryInstaller::OnInit();
index b18a01e..bbdc3cb 100755 (executable)
@@ -367,14 +367,6 @@ InstallerUtil::GetCategoryType(char* pCategory)
 bool
 InstallerUtil::CreateSymlinkForAppId(const String& inPath, String& outPath)
 {
-       if (InstallerUtil::IsSymlink(PATH_OPT_APPS) == true &&
-                       inPath.StartsWith(PATH_OPT_USR_APPS, 0) == true)
-       {
-               AppLogTag(OSP_INSTALLER, "CreateSymlinkForAppId() return false, path = [%ls]", inPath.GetPointer());
-               outPath = inPath;
-               return false;
-       }
-
        String appId;
        int length = inPath.GetLength();
        inPath.SubString(length - APPID_LENGTH, APPID_LENGTH, appId);
@@ -384,14 +376,11 @@ InstallerUtil::CreateSymlinkForAppId(const String& inPath, String& outPath)
        newPath += L"/";
        newPath += appId;
 
-       if (inPath == newPath)
+       if (inPath != newPath)
        {
-               outPath = inPath;
-               return false;
+               InstallerUtil::CreateSymlink(inPath, newPath);
        }
 
-       InstallerUtil::CreateSymlink(inPath, newPath);
-
        outPath = newPath;
 
        return true;