MCPcopy Create free account
hub / github.com/bruderstein/nppPluginManager / runSteps

Method runSteps

pluginManager/src/Plugin.cpp:364–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362
363
364InstallStatus Plugin::runSteps(InstallStepContainer steps, tstring& basePath, TiXmlElement* forGpup,
365 std::function<void(const TCHAR*)> setStatus,
366 std::function<void(const int)> stepProgress,
367 std::function<void()> stepComplete,
368 const ModuleInfo* moduleInfo,
369 VariableHandler* variableHandler,
370 CancelToken& cancelToken)
371{
372 InstallStatus status = INSTALL_SUCCESS;
373
374 InstallStepContainer::iterator stepIterator = steps.begin();
375
376 variableHandler->setVariable(_T("PLUGINFILENAME"), getFilename().c_str());
377
378 StepStatus stepStatus;
379
380 while (stepIterator != steps.end())
381 {
382
383 if (variableHandler)
384 (*stepIterator)->replaceVariables(variableHandler);
385
386 stepStatus = (*stepIterator)->perform(basePath, forGpup, setStatus, stepProgress, moduleInfo, cancelToken);
387
388 switch(stepStatus)
389 {
390 case STEPSTATUS_FAIL:
391 // Stop processing
392 return INSTALL_FAIL;
393
394 case STEPSTATUS_NEEDGPUP:
395 status = INSTALL_NEEDRESTART;
396 break;
397 }
398 stepComplete();
399 ++stepIterator;
400 }
401
402
403 return status;
404}
405
406
407

Callers

nothing calls this directly

Calls 6

beginMethod · 0.80
setVariableMethod · 0.80
c_strMethod · 0.80
endMethod · 0.80
replaceVariablesMethod · 0.45
performMethod · 0.45

Tested by

no test coverage detected