From 1eb15f89acdb86cb9285a8313b1c25c3a029a286 Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Tue, 7 Apr 2020 13:53:57 +0900 Subject: [PATCH] Add GetArchiveInfo Requires : - [app-installers]https://review.tizen.org/gerrit/#/c/platform/core/appfw/app-installers/+/228145/ Change-Id: If8ccd2c9b92ab5232c62e6cf4237fbebdc649b6f Signed-off-by: Ilho Kim --- src/hybrid/hybrid_installer.cc | 7 +++++++ src/hybrid/hybrid_installer.h | 1 + src/wgt/CMakeLists.txt | 5 ++++- src/wgt/wgt_installer.cc | 7 +++++++ src/wgt/wgt_installer.h | 1 + 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/hybrid/hybrid_installer.cc b/src/hybrid/hybrid_installer.cc index d3accd7..c1c4326 100644 --- a/src/hybrid/hybrid_installer.cc +++ b/src/hybrid/hybrid_installer.cc @@ -26,6 +26,7 @@ #include "hybrid/step/configuration/step_stash_tpk_config.h" #include "hybrid/step/encryption/step_encrypt_hybrid_resources.h" #include "hybrid/step/pkgmgr/step_merge_xml.h" +#include "lib/wgt_archive_info.h" #include "wgt/step/configuration/step_parse.h" #include "wgt/step/configuration/step_set_old_signature_files_location.h" #include "wgt/step/encryption/step_remove_encryption_data.h" @@ -50,6 +51,12 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr) context_->backend_data.set(new HybridBackendData()); } +std::unique_ptr HybridInstaller::GetArchiveInfo() { + std::unique_ptr archive_info; + archive_info.reset(new WgtArchiveInfo(pkgmgr_->GetRequestInfo(GetIndex()))); + return archive_info; +} + void HybridInstaller::InstallSteps() { AppInstaller::InstallSteps(); AddStepAfter("CheckInstallable"); diff --git a/src/hybrid/hybrid_installer.h b/src/hybrid/hybrid_installer.h index 2102a55..c595153 100644 --- a/src/hybrid/hybrid_installer.h +++ b/src/hybrid/hybrid_installer.h @@ -24,6 +24,7 @@ namespace hybrid { class HybridInstaller : public common_installer::AppInstaller { public: explicit HybridInstaller(common_installer::PkgMgrPtr pkgmgr); + std::unique_ptr GetArchiveInfo() override; SCOPE_LOG_TAG(HybridInstaller) diff --git a/src/wgt/CMakeLists.txt b/src/wgt/CMakeLists.txt index 9aa1b7b..4a98bc4 100755 --- a/src/wgt/CMakeLists.txt +++ b/src/wgt/CMakeLists.txt @@ -6,6 +6,7 @@ AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/step/filesystem WGT_STEP_FILESY AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/step/pkgmgr WGT_STEP_PKGMGR_SRCS) AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/step/security WGT_STEP_SECURITY_SRCS) AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/utils WGT_UTILS_SRCS) +AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../lib LIB_SRCS) # Target - definition ADD_LIBRARY(${TARGET_LIBNAME_WGT} SHARED @@ -15,7 +16,8 @@ ADD_LIBRARY(${TARGET_LIBNAME_WGT} SHARED ${WGT_STEP_FILESYSTEM_SRCS} ${WGT_STEP_PKGMGR_SRCS} ${WGT_STEP_SECURITY_SRCS} - ${WGT_UTILS_SRCS}) + ${WGT_UTILS_SRCS} + ${LIB_SRCS}) # Target - includes TARGET_INCLUDE_DIRECTORIES(${TARGET_LIBNAME_WGT} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../") # Target - deps @@ -26,6 +28,7 @@ APPLY_PKG_CONFIG(${TARGET_LIBNAME_WGT} PUBLIC PKGMGR_INSTALLER_DEPS ENCRYPTION_DEPS Boost + VCONF_DEPS ) SET_TARGET_PROPERTIES(${TARGET_LIBNAME_WGT} PROPERTIES COMPILE_FLAGS "-fPIC") diff --git a/src/wgt/wgt_installer.cc b/src/wgt/wgt_installer.cc index f064f30..87ff292 100644 --- a/src/wgt/wgt_installer.cc +++ b/src/wgt/wgt_installer.cc @@ -15,6 +15,7 @@ #include +#include "lib/wgt_archive_info.h" #include "wgt/utils/shared_dirs.h" #include "wgt/step/configuration/step_check_rds_manifest.h" #include "wgt/step/configuration/step_check_start_files.h" @@ -49,6 +50,12 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr) context_->backend_data.set(new WgtBackendData()); } +std::unique_ptr WgtInstaller::GetArchiveInfo() { + std::unique_ptr archive_info; + archive_info.reset(new WgtArchiveInfo(pkgmgr_->GetRequestInfo(GetIndex()))); + return archive_info; +} + void WgtInstaller::InstallSteps() { AppInstaller::InstallSteps(); ReplaceStep("ParseManifest", diff --git a/src/wgt/wgt_installer.h b/src/wgt/wgt_installer.h index d0a4c2b..e210622 100644 --- a/src/wgt/wgt_installer.h +++ b/src/wgt/wgt_installer.h @@ -24,6 +24,7 @@ class WgtInstaller : public common_installer::AppInstaller { * \param pkgmgr pointer to pkgmgr */ explicit WgtInstaller(common_installer::PkgMgrPtr pkgrmgr); + std::unique_ptr GetArchiveInfo() override; protected: void InstallSteps() override; -- 2.7.4