bool ExecuteComponentCallbackImpl::OnComponentExecError(const ComponentPtr& component, std::exception& ex)
{
	::InterlockedIncrement(& errors);
	std::wcout << std::endl << L"Error executing '" << component->id << L"' (" << component->GetDisplayName() << L"):"
		<< DVLib::string2wstring(ex.what());
	return true;
}
Esempio n. 2
0
void InstallerWindow::RunComponent(const ComponentPtr& component)
{
	try
	{
		LOG(L"--- Component '" << component->id << L"' (" << component->GetDisplayName() << L"): EXECUTING");
		if (! OnComponentExecBegin(component))
			return;

		component->Exec();
		component->Wait();

		LOG(L"*** Component '" << component->id << L"' (" << component->GetDisplayName() << L"): SUCCESS");

		if (! OnComponentExecSuccess(component))
			return;
	}
	catch(std::exception& ex)
	{
		LOG(L"*** Component '" << component->id << L"' (" << component->GetDisplayName() << L"): ERROR - " 
			<< DVLib::string2wstring(ex.what()));

		DniMessageBox::Show(DVLib::string2wstring(ex.what()).c_str(), MB_OK | MB_ICONSTOP);
	}
}
Esempio n. 3
0
bool InstallerWindow::OnComponentExecWait(const ComponentPtr& component)
{
	LOG(L"--- Component '" << component->id << L" (" << component->GetDisplayName() << L"): FINISHED");
	return true;
}
bool ExecuteComponentCallbackImpl::OnComponentExecSuccess(const ComponentPtr& component)
{
	::InterlockedIncrement(& successes);
	std::wcout << std::endl << L"Successfully executed '" << component->id << L"' (" << component->GetDisplayName() << L")";
	return true;
}
bool ExecuteComponentCallbackImpl::OnComponentExecWait(const ComponentPtr& component)
{
	::InterlockedIncrement(& waits);
	std::wcout << std::endl << L"Waiting for '" << component->id << L"' (" << component->GetDisplayName() << L")";
	return true;
}