--- /dev/null
+* Wed May 29 2013 Rusty Lynch <rusty.lynch@intel.com> accepted/tizen/20130520.101714@6638094
+- Add config option for livebox support
+
+
+%bcond_with livebox
Name: wrt-installer
Summary: Installer for tizen Webruntime
Version: 0.1.58.2
BuildRequires: pkgconfig(dpl-encryption)
BuildRequires: pkgconfig(capi-appfw-app-manager)
BuildRequires: pkgconfig(app2sd)
+%if %{with livebox}
BuildRequires: pkgconfig(web-provider)
+%endif
BuildRequires: pkgconfig(libprivilege-control)
BuildRequires: pkgconfig(osp-appfw)
BuildRequires: osp-appfw-internal-devel
export LDFLAGS+="-Wl,--rpath=/usr/lib -Wl,--hash-style=both -Wl,--as-needed"
LDFLAGS="$LDFLAGS"
-cmake . -DCMAKE_INSTALL_PREFIX=/usr \
+%cmake . -DCMAKE_INSTALL_PREFIX=/usr \
+%if %{with livebox}
+ -DLIVEBOX_SUPPORT=On \
+%else
+ -DLIVEBOX_SUPPORT=Off \
+%endif
-DDPL_LOG=ON \
-DCMAKE_BUILD_TYPE=%{?build_type:%build_type} \
%{?WITH_TESTS:-DWITH_TESTS=%WITH_TESTS}
SET(TARGET_INSTALLER "wrt-installer")
OPTION(LB_SUPPORT "lb support" OFF)
+OPTION(LIVEBOX_SUPPORT "Livebox support" ON)
SET(INSTALLER_SRC_DIR
${PROJECT_SOURCE_DIR}/src
pkgmgr-installer
pkgmgr-parser
pkgmgr-info
- web-provider
osp-appfw
libsmack
REQUIRED
)
+IF(LIVEBOX_SUPPORT)
+PKG_CHECK_MODULES(web-provider)
+ADD_DEFINITIONS("-DLIVEBOX")
+ENDIF(LIVEBOX_SUPPORT)
+
PKG_CHECK_MODULES(SYS_INSTALLER_STATIC_DEP
appsvc
libxml-2.0
{
if (m_properNamespace) {
if (attribute.name == L"id") {
+#ifdef LIVEBOX
m_liveboxId = attribute.value;
+#endif
} else if (attribute.name == L"primary") {
m_primary = attribute.value;
} else if (attribute.name == L"auto-launch") {
virtual void Verify()
{
+#ifdef LIVEBOX
m_livebox.m_liveboxId = m_liveboxId;
+#endif
m_livebox.m_primary = m_primary;
m_livebox.m_autoLaunch = m_autoLaunch;
m_livebox.m_updatePeriod = m_updatePeriod;
private:
ConfigParserData& m_data;
ConfigParserData::LiveboxInfo m_livebox;
+#ifdef LIVEBOX
DPL::String m_liveboxId;
+#endif
DPL::String m_primary;
DPL::String m_autoLaunch;
DPL::String m_updatePeriod;
i->serialize(writer);
}
//FOREACH(f, this->font) { f->serialize(writer); }
+#ifdef LIVEBOX
FOREACH(l, this->livebox) {
l->serialize(writer);
}
+#endif
FOREACH(acc, this->account)
{
acc->serialize(writer);
endElement(writer);
}
+#ifdef LIVEBOX
+
void LiveBox::serialize(xmlTextWriterPtr writer)
{
startElement(writer, "livebox");
endElement(writer);
}
+#endif // LIVEBOX
void Account::serialize(xmlTextWriterPtr writer)
{
typedef UiApplication UiApplicationType;
+#ifdef LIVEBOX
+
/**
* @brief LiveBox element
*/
};
typedef LiveBox LiveBoxInfo;
+#endif //LIVEBOX
/**
* @brief manifest element
this->imeApplication.push_back(x);
}
// void addFont(const FontType &x) { this->font.push_back(x); }
-
+#ifdef LIVEBOX
void addLivebox(const LiveBoxInfo &x)
{
this->livebox.push_back(x);
}
-
+#endif //LIVEBOX
void addAccount(const Account &x)
{
this->account.push_back(x);
std::list<UiApplicationType> uiApplication;
std::list<ImeApplicationType> imeApplication;
// std::list<FontType> font;
+#ifdef LIVEBOX
std::list<LiveBoxInfo> livebox;
+#endif
InstallLocationType installLocation;
NcnameType package;
PackageType type;
#include <widget_install/job_widget_install.h>
#include <widget_install/widget_install_errors.h>
#include <widget_install/widget_install_context.h>
+#ifdef LIVEBOX
#include <web_provider_livebox_info.h>
+#endif
#include <dpl/wrt-dao-rw/widget_dao.h>
#include <dpl/wrt-dao-ro/vconf_config.h>
#include <dpl/foreach.h>
AddStep(&TaskDatabase::StepSecurityOriginDBInsert);
AddStep(&TaskDatabase::StepRemoveExternalFiles);
AddStep(&TaskDatabase::StepCreateVconf);
+#ifdef LIVEBOX
AddStep(&TaskDatabase::StepLiveboxDBInsert);
-
+#endif
AddAbortStep(&TaskDatabase::StepAbortDBInsert);
AddAbortStep(&TaskDatabase::StepAbortAceDBInsert);
}
LogDebug("Ace data inserted");
}
+#ifdef LIVEBOX
void TaskDatabase::StepLiveboxDBInsert()
{
if (m_context.widgetConfig.configInfo.m_livebox.size() <= 0) {
autoLaunch, mouseEvent, pdFastOpen);
}
}
+#endif // LIVEBOX
} //namespace WidgetInstall
} //namespace Jobs
void StepSecurityOriginDBInsert();
void StepRemoveExternalFiles();
void StepCreateVconf();
+#ifdef LIVEBOX
void StepLiveboxDBInsert();
-
+#endif
void StepAbortDBInsert();
void StepAbortAceDBInsert();
#include <widget_install/job_widget_install.h>
#include <widget_install/widget_install_errors.h>
#include <widget_install/widget_install_context.h>
+#ifdef LIVEBOX
#include <web_provider_livebox_info.h>
#include <web_provider_plugin_info.h>
+#endif
#include <dpl/wrt-dao-ro/global_config.h>
#include <dpl/log/log.h>
#include <dpl/file_input.h>
// for widget update.
AddStep(&TaskManifestFile::stepBackupIconFiles);
AddStep(&TaskManifestFile::stepCopyIconFiles);
+#ifdef LIVEBOX
AddStep(&TaskManifestFile::stepCopyLiveboxFiles);
+#endif
AddStep(&TaskManifestFile::stepCreateExecFile);
AddStep(&TaskManifestFile::stepGenerateManifest);
AddStep(&TaskManifestFile::stepParseUpgradedManifest);
AddAbortStep(&TaskManifestFile::stepAbortIconFiles);
} else {
AddStep(&TaskManifestFile::stepCopyIconFiles);
+#ifdef LIVEBOX
AddStep(&TaskManifestFile::stepCopyLiveboxFiles);
+#endif
AddStep(&TaskManifestFile::stepCreateExecFile);
AddStep(&TaskManifestFile::stepGenerateManifest);
AddStep(&TaskManifestFile::stepParseManifest);
"Widget iconfile copy Finished");
}
+#ifdef LIVEBOX
void TaskManifestFile::stepCopyLiveboxFiles()
{
LogDebug("Copy Livebox Files");
InstallerContext::INSTALL_COPY_LIVEBOX_FILES,
"Livebox files copy Finished");
}
+#endif // LIVEBOX
void TaskManifestFile::stepBackupIconFiles()
{
setWidgetOtherInfo(uiApp);
setAppCategory(uiApp);
setMetadata(uiApp);
+#ifdef LIVEBOX
setLiveBoxInfo(manifest);
+#endif
setAccount(manifest);
setPrivilege(manifest);
manifest.addUiApplication(uiApp);
setAppControlsInfo(uiApp);
setAppCategory(uiApp);
setMetadata(uiApp);
+#ifdef LIVEBOX
setLiveBoxInfo(manifest);
+#endif
setAccount(manifest);
setPrivilege(manifest);
}
}
+#ifdef LIVEBOX
void TaskManifestFile::setLiveBoxInfo(Manifest& manifest)
{
FOREACH(it, m_context.widgetConfig.configInfo.m_livebox) {
if (ConfigInfo->m_boxInfo.m_boxMouseEvent == L"true") {
std::string boxType;
+
if (ConfigInfo->m_type == L"") {
// in case of default livebox
boxType = web_provider_livebox_get_default_type();
manifest.addLivebox(liveBox);
}
}
+#endif // LIVEBOX
void TaskManifestFile::setAccount(Manifest& manifest)
{
#include <stdio.h>
#include <fstream>
+#include <unistd.h>
#include <dpl/task.h>
#include <dpl/string.h>
* @brief Implementation file for uninstaller task database updating
*/
+#ifdef LIVEBOX
#include <web_provider_livebox_info.h>
+#endif
#include <widget_uninstall/task_db_update.h>
#include <widget_uninstall/job_widget_uninstall.h>
#include <widget_uninstall/widget_uninstall_errors.h>
m_context(context)
{
AddStep(&TaskDbUpdate::StepDbUpdate);
+#ifdef LIVEBOX
AddStep(&TaskDbUpdate::StepLiveboxDBDelete);
+#endif
}
TaskDbUpdate::~TaskDbUpdate()
"Widget DB Update Finished");
}
+#ifdef LIVEBOX
void TaskDbUpdate::StepLiveboxDBDelete()
{
int ret =
LogInfo("delete box info: " << m_context.tzAppid);
}
}
+#endif // LIVEBOX
} //namespace WidgetUninstall
} //namespace Jobs
*/
#include "widget_location.h"
+#include <unistd.h>
#include <dpl/utils/wrt_utility.h>
#include <dpl/wrt-dao-ro/global_config.h>
#include <dpl/assert.h>