diff options
author | Dongeup Ham <dongeup.ham@samsung.com> | 2012-10-31 20:41:54 +0900 |
---|---|---|
committer | Dongeup Ham <dongeup.ham@samsung.com> | 2012-10-31 20:41:54 +0900 |
commit | 38b877649556347d2ecbb8e0db67a1ca8e883b7a (patch) | |
tree | 200759d3d157097e9b781d944e9712644efe183e /src/Step | |
parent | f50725771059bc65a5037f7bca6bf8874e011c05 (diff) | |
download | installer-38b877649556347d2ecbb8e0db67a1ca8e883b7a.tar.gz installer-38b877649556347d2ecbb8e0db67a1ca8e883b7a.tar.bz2 installer-38b877649556347d2ecbb8e0db67a1ca8e883b7a.zip |
Implementation for preloaded app and downloaded app.
Change-Id: I2db52734a79969811a6d0f04d97838b4361ccfe3
Diffstat (limited to 'src/Step')
-rwxr-xr-x | src/Step/UnpackStep.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/Step/UnpackStep.cpp b/src/Step/UnpackStep.cpp index f79feba..10ee8c5 100755 --- a/src/Step/UnpackStep.cpp +++ b/src/Step/UnpackStep.cpp @@ -27,6 +27,7 @@ #include "InstallationContext.h" #include "UnpackStep.h" +#include "InstallerUtil.h" using namespace Osp::Base; using namespace Osp::Base::Utility; @@ -109,7 +110,6 @@ UnpackStep::GoNextState(void) InstallerError UnpackStep::OnUnzip(void) { - // String tempDir; InstallerError error = INSTALLER_ERROR_NONE; AppLogTag(OSP_INSTALLER, "OnUnzip()"); _PackageInfoImpl *pPackageInfoImpl = null; @@ -179,7 +179,7 @@ UnpackStep::OnUnzip(void) #endif String installPath; - installPath = SLP_APP_PATH; + installPath = PATH_OPT_USR_APPS; installPath += "/"; if (__pContext->GetPackageNameType() == INSTALLER_PREFIX_TYPE_ORG) @@ -188,22 +188,25 @@ UnpackStep::OnUnzip(void) } installPath += __pContext->GetAppId(); - __pContext->SetInstallDir(installPath); if (File::IsFileExist(installPath) == false) { result r = E_SUCCESS; r = Directory::Create(installPath, false); - TryReturn(!IsFailed(r), INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] Directory::Create() failed"); + TryReturn(!IsFailed(r), INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] Directory::Create() failed, installPath=%ls", installPath.GetPointer()); } + String newInstallPath; + InstallerUtil::CreateSymlinkForAppId(installPath, newInstallPath); + __pContext->SetInstallDir(newInstallPath); + pPackageInfoImpl = __pContext->GetPackageInfoImpl(); - pPackageInfoImpl->SetAppRootPath(installPath); + pPackageInfoImpl->SetAppRootPath(newInstallPath); AppLogTag(OSP_INSTALLER, "UnzipTo - START"); FileUnzipper unzipper; unzipper.Construct(__pContext->GetPackagePath()); - unzipper.UnzipTo(installPath); + unzipper.UnzipTo(newInstallPath); AppLogTag(OSP_INSTALLER, "UnzipTo - END"); // GoNextState(); |