diff options
-rwxr-xr-x | inc/InstallerDefs.h | 2 | ||||
-rwxr-xr-x | src/Installer/Installer.cpp | 4 | ||||
-rwxr-xr-x | src/Manager/PermissionManager.cpp | 2 | ||||
-rwxr-xr-x | src/Step/UninstallStep.cpp | 2 | ||||
-rwxr-xr-x | src/XmlHandler/ManifestGenerator.cpp | 37 | ||||
-rwxr-xr-x | src/XmlHandler/ManifestHandler.cpp | 14 |
6 files changed, 23 insertions, 38 deletions
diff --git a/inc/InstallerDefs.h b/inc/InstallerDefs.h index 4c510ae..a05a6d2 100755 --- a/inc/InstallerDefs.h +++ b/inc/InstallerDefs.h @@ -21,7 +21,7 @@ #ifndef _INSTALLER_DEFS_H_ #define _INSTALLER_DEFS_H_ -#define OSP_INSTALLER_VERSION "osp-installer version = 20130115.1" +#define OSP_INSTALLER_VERSION "osp-installer version = 20130115.2" #define DIR_BIN L"/bin" #define DIR_INFO L"/info" diff --git a/src/Installer/Installer.cpp b/src/Installer/Installer.cpp index b455cbe..fb10659 100755 --- a/src/Installer/Installer.cpp +++ b/src/Installer/Installer.cpp @@ -107,15 +107,11 @@ Installer::OnRegister(void) TryReturn(pContext, INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] pContext is null"); InstallerOperation operation = pContext->GetInstallerOperation(); - _PackageInfoImpl* pInfoImpl = null; _PackageManagerImpl *pManagerImpl = null; pManagerImpl = pManagerImpl->GetInstance(); TryReturn(pManagerImpl, INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] pManagerImpl is null"); - pInfoImpl = pContext->GetPackageInfoImpl(); - TryReturn(pInfoImpl, INSTALLER_ERROR_INTERNAL_STATE, "[osp-installer] pInfoImpl is null"); - if (operation == INSTALLER_OPERATION_INSTALL) { pManagerImpl->UnregisterPackageInfo(pContext->GetId()); diff --git a/src/Manager/PermissionManager.cpp b/src/Manager/PermissionManager.cpp index 3311a40..cf1c9b2 100755 --- a/src/Manager/PermissionManager.cpp +++ b/src/Manager/PermissionManager.cpp @@ -109,7 +109,7 @@ PermissionManager::SetDirectory(InstallationContext* pContext) r = File::GetAttributes(destPath, attribute); if (r == E_SUCCESS) { - String appVersion = pPackageInfoImpl->GetAppVersion(); + String appVersion = pPackageInfoImpl->GetVersion(); String srcPath; String settingXmlPath; diff --git a/src/Step/UninstallStep.cpp b/src/Step/UninstallStep.cpp index 80c0004..27209e0 100755 --- a/src/Step/UninstallStep.cpp +++ b/src/Step/UninstallStep.cpp @@ -137,7 +137,7 @@ UninstallStep::OnStateGetPackageInfo(void) return error; } - if (pPackageInfoImpl->GetAppStorageType() == PACKAGE_STORAGE_TYPE_EXTERNAL) + if (pPackageInfoImpl->IsInstalledInExternalStorage() == true) { int res = 0; app2ext_handle* pHandle = null; diff --git a/src/XmlHandler/ManifestGenerator.cpp b/src/XmlHandler/ManifestGenerator.cpp index c2d8ac9..82783df 100755 --- a/src/XmlHandler/ManifestGenerator.cpp +++ b/src/XmlHandler/ManifestGenerator.cpp @@ -54,6 +54,7 @@ ManifestGenerator::Construct(InstallationContext* pContext) { __pContext = pContext; __pPackageInfoImpl = pContext->GetPackageInfoImpl(); + TryReturn(__pPackageInfoImpl, false, "[osp-installer] __pPackageInfoImpl is null."); __pWriter = new (std::nothrow) XmlWriter; TryReturn(__pWriter, false, "[osp-installer] __pWriter is null."); @@ -68,9 +69,6 @@ ManifestGenerator::Write() String xmlPath; String package; String location; - _PackageInfoImpl *pPackageInfoImpl = null; - pPackageInfoImpl = __pContext->GetPackageInfoImpl(); - TryReturn(pPackageInfoImpl, false, "[osp-installer] pPackageInfoImpl is null."); //if (preload == true) //{ @@ -91,23 +89,23 @@ ManifestGenerator::Write() __pWriter->WriteAttribute("xmlns", "http://tizen.org/ns/packages"); __pWriter->WriteAttribute("package", package); __pWriter->WriteAttribute("type", "tpk"); - __pWriter->WriteAttribute("version", pPackageInfoImpl->GetAppVersion()); + __pWriter->WriteAttribute("version", __pPackageInfoImpl->GetVersion()); __pWriter->WriteAttribute("install-location", location); __pWriter->StartElement("label"); - __pWriter->WriteString(pPackageInfoImpl->GetAppName()); + __pWriter->WriteString(__pPackageInfoImpl->GetDisplayName()); __pWriter->EndElement(); __pWriter->StartElement("author"); __pWriter->EndElement(); __pWriter->StartElement("description"); - __pWriter->WriteString(pPackageInfoImpl->GetAppDescription()); + __pWriter->WriteString(__pPackageInfoImpl->GetDescription()); __pWriter->EndElement(); _PackageAppInfoImpl* pAppInfoImpl = null; ArrayList* pAppList = null; - pAppList = pPackageInfoImpl->GetAppInfoList(); + pAppList = __pPackageInfoImpl->GetAppInfoList(); int appCount = pAppList->GetCount(); AppLogTag(OSP_INSTALLER, "Write(): appCount=%d", appCount); @@ -238,7 +236,6 @@ ManifestGenerator::WriteLiveboxes(_PackageAppInfoImpl* pAppInfoImpl) const TryReturn(__pWriter, false, "[osp-installer] __pWriter is null."); ArrayList* pLiveboxDataList = __pContext->GetLiveboxDataList(); - _PackageInfoImpl* pPackageInfoImpl = __pContext->GetPackageInfoImpl(); String label("label"); if (pLiveboxDataList == null) @@ -283,7 +280,7 @@ ManifestGenerator::WriteLiveboxes(_PackageAppInfoImpl* pAppInfoImpl) const if (menuIcon.IsEmpty() == false) { String menuIconPath; - menuIconPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, menuIcon.GetPointer()); + menuIconPath.Format(1024, L"%ls%ls/%ls", __pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, menuIcon.GetPointer()); __pWriter->StartElement("icon"); __pWriter->WriteString(menuIconPath); @@ -468,14 +465,11 @@ ManifestGenerator::FindCategory(int index, const String& category) const bool ManifestGenerator::WriteApp(int index, Tizen::App::Package::_PackageAppInfoImpl* pAppInfoImpl) { - _PackageInfoImpl *pPackageInfoImpl = null; - pPackageInfoImpl = __pContext->GetPackageInfoImpl(); - IMap* pNameList = pAppInfoImpl->GetNameList(); String label("label"); String type("c++app"); String binaryPath; - binaryPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_BIN, pAppInfoImpl->GetName().GetPointer()); + binaryPath.Format(1024, L"%ls%ls/%ls", __pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_BIN, pAppInfoImpl->GetName().GetPointer()); if (pAppInfoImpl->GetDefault() == L"True") { @@ -484,7 +478,7 @@ ManifestGenerator::WriteApp(int index, Tizen::App::Package::_PackageAppInfoImpl* if (pAppInfoImpl->GetMainmenuIcon().IsEmpty() == false) { String iconPath; - iconPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, pAppInfoImpl->GetMainmenuIcon().GetPointer()); + iconPath.Format(1024, L"%ls%ls/%ls", __pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, pAppInfoImpl->GetMainmenuIcon().GetPointer()); __pWriter->StartElement("icon"); __pWriter->WriteString(iconPath); @@ -618,7 +612,7 @@ ManifestGenerator::WriteApp(int index, Tizen::App::Package::_PackageAppInfoImpl* if (pAppInfoImpl->GetMainmenuIcon().IsEmpty() == false) { String iconPath; - iconPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, pAppInfoImpl->GetMainmenuIcon().GetPointer()); + iconPath.Format(1024, L"%ls%ls/%ls", __pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, pAppInfoImpl->GetMainmenuIcon().GetPointer()); __pWriter->StartElement("icon"); __pWriter->WriteString(iconPath); @@ -657,15 +651,12 @@ ManifestGenerator::WriteApp(int index, Tizen::App::Package::_PackageAppInfoImpl* bool ManifestGenerator::WriteSubModeApp(int index) { - _PackageInfoImpl *pPackageInfoImpl = null; - pPackageInfoImpl = __pContext->GetPackageInfoImpl(); - // SUB_MODE_APPCONTROL_NAME -> AppName String subBinaryPath; - subBinaryPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_BIN, SUB_MODE_APPCONTROL_NAME); + subBinaryPath.Format(1024, L"%ls%ls/%ls", __pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_BIN, SUB_MODE_APPCONTROL_NAME); String binaryPath; - binaryPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_BIN, __pContext->__subModeAppName.GetPointer()); + binaryPath.Format(1024, L"%ls%ls/%ls", __pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_BIN, __pContext->__subModeAppName.GetPointer()); if (File::IsFileExist(subBinaryPath) == true) { @@ -783,8 +774,6 @@ ManifestGenerator::WriteAppControl(int index) bool ManifestGenerator::WriteAccounts(int index) { - _PackageInfoImpl *pPackageInfoImpl = __pContext->GetPackageInfoImpl(); - IListT<AppData*>* pAppDataList = __pContext->__pAppDataList; TryReturn(pAppDataList, false, "[osp-installer] pAppDataList is null"); @@ -818,7 +807,7 @@ ManifestGenerator::WriteAccounts(int index) if (accountIcon.IsEmpty() == false) { String accountIconPath; - accountIconPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, accountIcon.GetPointer()); + accountIconPath.Format(1024, L"%ls%ls/%ls", __pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, accountIcon.GetPointer()); __pWriter->StartElement("account-icon"); __pWriter->WriteString(accountIconPath); @@ -829,7 +818,7 @@ ManifestGenerator::WriteAccounts(int index) if (accountSmallIcon.IsEmpty() == false) { String accountSmallIconPath; - accountSmallIconPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, accountSmallIcon.GetPointer()); + accountSmallIconPath.Format(1024, L"%ls%ls/%ls", __pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, accountSmallIcon.GetPointer()); __pWriter->StartElement("account-small-icon"); __pWriter->WriteString(accountSmallIcon); diff --git a/src/XmlHandler/ManifestHandler.cpp b/src/XmlHandler/ManifestHandler.cpp index d2aa08a..c922732 100755 --- a/src/XmlHandler/ManifestHandler.cpp +++ b/src/XmlHandler/ManifestHandler.cpp @@ -873,7 +873,7 @@ bool ManifestHandler::OnVersionValue(const char *pCharacters) { AppLogTag(OSP_INSTALLER, "<Version>%s</Version>", pCharacters); - __pPackageInfoImpl->SetAppVersion(pCharacters); + __pPackageInfoImpl->SetVersion(pCharacters); return true; } @@ -882,7 +882,7 @@ bool ManifestHandler::OnTypeValue(const char *pCharacters) { AppLogTag(OSP_INSTALLER, "<Type>%s</Type>", pCharacters); - __pPackageInfoImpl->SetAppType(pCharacters); + //__pPackageInfoImpl->SetAppType(pCharacters); if (strcasecmp(pCharacters, "Contents") == 0) { @@ -911,7 +911,7 @@ ManifestHandler::OnAuthorValue(const char *pCharacters) // } AppLogTag(OSP_INSTALLER, "<Author>%s</Author>", pCharacters); - __pPackageInfoImpl->SetAppVendor(pCharacters); + __pPackageInfoImpl->SetAuthor(pCharacters); return true; } @@ -919,7 +919,7 @@ ManifestHandler::OnAuthorValue(const char *pCharacters) bool ManifestHandler::OnUrlValue(const char *pCharacters) { - __pPackageInfoImpl->SetAppUrl(pCharacters); + __pPackageInfoImpl->SetUrl(pCharacters); AppLogTag(OSP_INSTALLER, "<Url>%s</Url>", pCharacters); return true; @@ -1062,7 +1062,7 @@ ManifestHandler::OnNameValue(const char *pCharacters) { if (__isDefaultName == true) { - __pPackageInfoImpl->SetAppName(pCharacters); + __pPackageInfoImpl->SetDisplayName(pCharacters); } } @@ -1094,7 +1094,7 @@ ManifestHandler::OnDescriptionValue(const char *pCharacters) if (strcasecmp(pAttrValue, "eng-GB") == 0 || strcasecmp(pAttrValue, "eng-US") == 0) { // Set default name - __pPackageInfoImpl->SetAppDescription(pCharacters); + __pPackageInfoImpl->SetDescription(pCharacters); } AppLogTag(OSP_INSTALLER, "<Description Locale=\"%s\">%s</Description>", pAttrValue, pCharacters); @@ -1181,7 +1181,7 @@ ManifestHandler::OnInstallationLocationValue(const char *pCharacters) { AppLogTag(OSP_INSTALLER, "INSTALLATION_STORAGE = [EXTERNAL]"); __pContext->SetInstallationStorage(InstallationContext::INSTALLATION_STORAGE_EXTERNAL); - __pPackageInfoImpl->SetAppStorageType(PACKAGE_STORAGE_TYPE_EXTERNAL); + __pPackageInfoImpl->SetInstalledInExternalStorage(true); } return true; |