#include "InstallerUtil.h"
-#define OSP_INSTALLER_VERSION "version=[20130425.3]"
+#define OSP_INSTALLER_VERSION "version=[20130425.4]"
#define DIR_BIN L"/bin"
#define DIR_INFO L"/info"
}
}
+ bool firstPreloadedUpdate = false;
+
+ String roXmlPath;
+ roXmlPath.Format(1024, DIR_RO_PACKAGE_SYSTEM_MANIFEST, pContext->__packageId.GetPointer());
+
+ String rwXmlPath;
+ rwXmlPath.Format(1024, DIR_RW_PACKAGE_SYSTEM_MANIFEST, pContext->__packageId.GetPointer());
+
if (pContext->__isPreloaded == true)
{
- pContext->__coreXmlPath.Format(1024, DIR_RO_PACKAGE_SYSTEM_MANIFEST, pContext->__packageId.GetPointer());
+ pContext->__coreXmlPath = roXmlPath;
}
else
{
- pContext->__coreXmlPath.Format(1024, DIR_RW_PACKAGE_SYSTEM_MANIFEST, pContext->__packageId.GetPointer());
+ pContext->__coreXmlPath = rwXmlPath;
+ if ((File::IsFileExist(roXmlPath) == true) && (File::IsFileExist(rwXmlPath) == false))
+ {
+ AppLog("First preloaded app update");
+ firstPreloadedUpdate = true;
+ }
}
std::unique_ptr<char[]> pXmlPath(_StringConverter::CopyToCharArrayN(pContext->__coreXmlPath));
else
{
AppLog("pkgmgr_parser_parse_manifest_for_uninstallation() - START");
- pkgmgr_parser_parse_manifest_for_uninstallation(pXmlPath.get(), null);
+ if (firstPreloadedUpdate == false)
+ {
+ AppLog(" - uninstall path=[%s]", pXmlPath.get());
+ pkgmgr_parser_parse_manifest_for_uninstallation(pXmlPath.get(), null);
+ }
+ else
+ {
+ std::unique_ptr<char[]> pRoXmlPath(_StringConverter::CopyToCharArrayN(roXmlPath));
+ AppLog(" - uninstall path=[%s]", pRoXmlPath.get());
+ pkgmgr_parser_parse_manifest_for_uninstallation(pRoXmlPath.get(), null);
+ }
+
AppLog("pkgmgr_parser_parse_manifest_for_uninstallation() - END");
CreateCoreXmlFile(pContext);
}
if (dirPath.Contains(L"shared/data") == true)
{
+ label = L"*";
+
+#if 0
if (__pContext->__isPreloaded == false)
{
label.Append("_shareddata");
AddSharedDirReaders(label);
}
+#endif
return true;
}
version.SubString(startIndex, macroStr);
- Integer::Decode(majorStr, major);
- Integer::Decode(minorStr, minor);
- Integer::Decode(macroStr, macro);
+ Integer::Parse(majorStr, major);
+ Integer::Parse(minorStr, minor);
+ Integer::Parse(macroStr, macro);
AppLog("version = [%ls] -> major = [%d], minor = [%d], macro = [%d]", version.GetPointer(), major, minor, macro);
// __pContext->__additionalErrorString = L"Thrown when the application cannot be uninstalled because the application was preloaded.";
// }
// TryReturn(isUninstallable == true, INSTALLER_ERROR_PACKAGE_INVALID, "preload app cannot be uninstalled.");
- String filePath = PATH_USR_APPS;
- filePath += L"/";
- filePath += __pContext->__packageId;
- if (File::IsFileExist(filePath) == true)
+
+ String rwXmlPath;
+ rwXmlPath.Format(1024, DIR_RW_PACKAGE_SYSTEM_MANIFEST, packageId.GetPointer());
+ if (File::IsFileExist(rwXmlPath) == false)
{
- AppLog("This is a preload app=[%ls]", filePath.GetPointer());
+ AppLog("This is a preload app = [%ls]", rwXmlPath.GetPointer());
__pContext->__isPreloaded = true;
}
__pContext->__rootPath = pPackageInfoImpl->GetAppRootPath();
-// if (__pContext->__rootPath.StartsWith(PATH_USR_APPS, 0) == true)
-// {
-// __pContext->__isPreloaded = true;
-// }
if (__pContext->__isHybridService == true)
{