#git:framework/web/wrt-installer
Name: wrt-installer
Summary: Installer for tizen Webruntime
-Version: 0.1.95
+Version: 0.1.97
Release: 1
Group: Development/Libraries
License: Apache License, Version 2.0
chmod +s /usr/bin/wrt-installer
#symlink for package manager
-ln -sf /usr/bin/wrt-installer /usr/etc/package-manager/backend/wgt
+%define pkg_manager_backend_path "/usr/etc/package-manager/backend"
+ln -sf /usr/bin/wrt-installer %{pkg_manager_backend_path}/wgt
+ln -sf %{pkg_manager_backend_path}/wgt %{pkg_manager_backend_path}/Wgt
+ln -sf %{pkg_manager_backend_path}/wgt %{pkg_manager_backend_path}/wGt
+ln -sf %{pkg_manager_backend_path}/wgt %{pkg_manager_backend_path}/wgT
+ln -sf %{pkg_manager_backend_path}/wgt %{pkg_manager_backend_path}/WGt
+ln -sf %{pkg_manager_backend_path}/wgt %{pkg_manager_backend_path}/wGT
+ln -sf %{pkg_manager_backend_path}/wgt %{pkg_manager_backend_path}/WgT
+ln -sf %{pkg_manager_backend_path}/wgt %{pkg_manager_backend_path}/WGT
+
#for booting recovery
mkdir -p /opt/share/widget/temp_info
%attr(755,root,root) %{_bindir}/wrt-installer-tests-*
/opt/share/widget/tests/installer/widgets/*
%endif
-%{_datadir}/wrt-engine/default_icon_tizen.png
LogError("Failed to localize config.xml");
result = ConfigureResult::Failed_InvalidConfig;
}
+ Catch(Exceptions::WidgetConfigFileInvalid)
+ {
+ LogError("Invalid configuration file");
+ result = ConfigureResult::Failed_InvalidConfig;
+ }
+ Catch(DPL::Exception)
+ {
+ LogError("Unknown exception");
+ result = ConfigureResult::Failed;
+ }
return result;
}
void JobWidgetInstall::setApplicationType(
const WrtDB::ConfigParserData &configInfo)
{
+ AppType widgetAppType = APP_TYPE_UNKNOWN;
FOREACH(iterator, configInfo.nameSpaces) {
LogInfo("namespace = [" << *iterator << "]");
- AppType currentAppType = APP_TYPE_UNKNOWN;
- if (*iterator == ConfigurationNamespace::W3CWidgetNamespaceName) {
- continue;
+ if (*iterator == ConfigurationNamespace::TizenWebAppNamespaceName) {
+ if (widgetAppType != APP_TYPE_UNKNOWN &&
+ widgetAppType != APP_TYPE_TIZENWEBAPP)
+ {
+ LogError("To many namespaces declared in configuration fileA.");
+ ThrowMsg(Exceptions::WidgetConfigFileInvalid,
+ "Config.xml has more than one valid namespace");
+ }
+ widgetAppType = APP_TYPE_TIZENWEBAPP;
} else if (
*iterator ==
ConfigurationNamespace::WacWidgetNamespaceNameForLinkElement ||
*iterator ==
ConfigurationNamespace::WacWidgetNamespaceName)
{
- currentAppType = APP_TYPE_WAC20;
- } else if (*iterator ==
- ConfigurationNamespace::TizenWebAppNamespaceName)
- {
- currentAppType = APP_TYPE_TIZENWEBAPP;
- }
-
- if (m_installerContext.widgetConfig.webAppType ==
- APP_TYPE_UNKNOWN)
- {
- m_installerContext.widgetConfig.webAppType = currentAppType;
- } else if (m_installerContext.widgetConfig.webAppType ==
- currentAppType)
- {
- continue;
+ if (widgetAppType != APP_TYPE_UNKNOWN &&
+ widgetAppType != APP_TYPE_WAC20)
+ {
+ LogError("To many namespaces declared in configuration fileB.");
+ ThrowMsg(Exceptions::WidgetConfigFileInvalid,
+ "Config.xml has more than one valid namespace");
+ }
+ widgetAppType = APP_TYPE_WAC20;
} else {
- ThrowMsg(Exceptions::WidgetConfigFileInvalid,
- "Config.xml has more than one namespace");
+ LogDebug("Namespace ignored.");
}
}
- // If there is no define, type set to WAC 2.0
- if (m_installerContext.widgetConfig.webAppType == APP_TYPE_UNKNOWN) {
- m_installerContext.widgetConfig.webAppType = APP_TYPE_WAC20;
- }
+ m_installerContext.widgetConfig.webAppType = widgetAppType;
LogInfo("type = [" <<
m_installerContext.widgetConfig.webAppType.getApptypeToString() <<
#include <dpl/test/test_runner.h>
#include <dpl/log/log.h>
#include <dpl/wrt-dao-ro/plugin_dao_read_only.h>
+#include <dpl/static_block.h>
////////////////////////////////////////////////////////////////////////////////
RUNNER_TEST_GROUP_INIT(PluginsInstallation)
+STATIC_BLOCK
+{
+ (void)system("wrt_reset_all.sh");
+ (void)system("wrt-installer -p");
+}
+
#define MAKE_PLUGIN_CHECK_TESTCASE(TESTCASE, LIBNAME) \
RUNNER_TEST(PluginsInstallation_##TESTCASE) \
{ \
WrtDB::PluginDAOReadOnly pdao(#LIBNAME); \
RUNNER_ASSERT_MSG(pdao.getInstallationStatus() == WrtDB::PluginDAOReadOnly::INSTALLATION_COMPLETED, "Plugin is not installed correctly"); \
} Catch(DPL::Exception) { \
- LogError(_rethrown_exception.DumpToString()); \
+ LogError(_rethrown_exception.DumpToString()); \
RUNNER_ASSERT_MSG(false, "DPL::Exception"); \
} \
} \