namespace Jobs {
namespace WidgetInstall {
-
TaskPrepareFiles::TaskPrepareFiles(InstallerContext &installerContext) :
DPL::TaskDecl<TaskPrepareFiles>(this),
m_installerContext(installerContext)
{
- // Install steps
+ AddStep(&TaskPrepareFiles::StartStep);
AddStep(&TaskPrepareFiles::StepCopyFiles);
+ AddStep(&TaskPrepareFiles::EndStep);
}
void TaskPrepareFiles::CopyFile(const std::string& source)
{
- if(source.empty()) {
+ if (source.empty()) {
LogWarning("No source file specified");
return;
}
std::string filename = source;
- size_t last = source.find_last_of( "\\/" );
- if(last != std::string::npos) {
- filename = source.substr( last+1 );
+ size_t last = source.find_last_of("\\/");
+ if (last != std::string::npos) {
+ filename = source.substr(last + 1);
}
- std::string target = m_installerContext.locations->getTemporaryPackageDir() + '/' + filename;
+ std::string target =
+ m_installerContext.locations->getTemporaryPackageDir() + '/' +
+ filename;
LogDebug("source " << source);
LogDebug("target " << target);
{
CopyFile(m_installerContext.locations->getWidgetSource());
- size_t last = m_installerContext.locations->getWidgetSource().find_last_of("\\/");
+ size_t last = m_installerContext.locations->getWidgetSource().find_last_of(
+ "\\/");
std::string sourceDir = "";
if (last != std::string::npos) {
- sourceDir = m_installerContext.locations->getWidgetSource().substr(0,last+1);
+ sourceDir = m_installerContext.locations->getWidgetSource().substr(
+ 0,
+ last
+ + 1);
}
LogDebug("Icons copy...");
}
}
+void TaskPrepareFiles::StartStep()
+{
+ LogDebug("--------- <TaskPrepareFiles> : START ----------");
+}
+
+void TaskPrepareFiles::EndStep()
+{
+ LogDebug("--------- <TaskPrepareFiles> : END ----------");
+}
} // namespace WidgetInstall
} // namespace Jobs