#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"
*/
#include <FBaseLog.h>
+#include <FIoDirectory.h>
#include "PreloadedInstaller.h"
#include "InstallerUtil.h"
using namespace Osp::Base;
+using namespace Osp::Io;
PreloadedInstaller::PreloadedInstaller(void)
{
destRootPath += appId;
InstallerUtil::Remove(destRootPath);
- InstallerUtil::Remove(destRootPath);
+ Directory::Create(destRootPath);
String srcPath;
String destPath;
destPath = destRootPath + DIR_SETTING;
InstallerUtil::CreateSymlink(srcPath, destPath);
- // pContext->SetInputPath(destRootPath);
pContext->SetInstallDir(destRootPath);
return DirectoryInstaller::OnInit();
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);
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;