#include "InstallerUtil.h"
-#define OSP_INSTALLER_VERSION "version=[20130424.2]"
+#define OSP_INSTALLER_VERSION "version=[20130424.3]"
#define DIR_BIN L"/bin"
#define DIR_INFO L"/info"
std::unique_ptr< PackageInfo > pPackageInfo(_PackageManagerImpl::GetInstance()->GetPackageInfoN(__pContext->__packageId));
if (pPackageInfo)
{
+ __pContext->__isUpdated = true;
+
String oldVersion = pPackageInfo->GetVersion();
String newVersion = __pContext->__version;
}
else if (res == VERSION_NEW)
{
- __pContext->__isUpdated = true;
-
AppLog("Update version: package = [%ls]", __pContext->__packageId.GetPointer());
AppLog("Update version: oldVersion = [%ls] -> newVersion = [%ls]", oldVersion.GetPointer(), newVersion.GetPointer());
}
else if (res == VERSION_OLD)
{
AppLog("Lower version: oldVersion = [%ls] -> newVersion = [%ls]", oldVersion.GetPointer(), newVersion.GetPointer());
- return INSTALLER_ERROR_PACKAGE_LOWER_VERSION;
}
else
{
TryReturn(isUninstallable == true, INSTALLER_ERROR_PACKAGE_INVALID, "preload app cannot be uninstalled.");
__pContext->__rootPath = pPackageInfoImpl->GetAppRootPath();
- if (__pContext->__rootPath.StartsWith(PATH_USR_APPS, 0) == true)
+
+ if (pPackageInfoImpl->IsDownloaded() == false)
{
+ AppLog("[%ls] is preloaded app.", packageId.GetPointer());
__pContext->__isPreloaded = true;
}
AppLog("UnzipTo - START");
r = unzipper.UnzipTo(newInstallPath);
- TryReturn(!IsFailed(r), INSTALLER_ERROR_OUT_OF_STORAGE, "UnzipTo(%ls) failed.", newInstallPath.GetPointer());
+ TryReturn(!IsFailed(r), INSTALLER_ERROR_PACKAGE_INVALID, "UnzipTo(%ls) failed.", newInstallPath.GetPointer());
AppLog("UnzipTo - END");
// GoNextState();