| 384 | |
| 385 | |
| 386 | void PluginList::addSteps(Plugin* plugin, TiXmlElement* installElement, InstallOrRemove ior) |
| 387 | { |
| 388 | if (!installElement) |
| 389 | return; |
| 390 | |
| 391 | TiXmlElement *installStepElement = installElement->FirstChildElement(); |
| 392 | |
| 393 | InstallStepFactory installStepFactory(_variableHandler); |
| 394 | |
| 395 | while (installStepElement) |
| 396 | { |
| 397 | // If it is a unicode tag and build for x64, then only process the contents if it's a x64 N++, which is just available for unicode |
| 398 | // or if it's an unicode tag and build for x86, then only process the contents if it's an unicode N++ |
| 399 | // or if it's an ansi tag, then only process the contents if it's an ansi N++ |
| 400 | if ((g_isUnicode && g_isX64 |
| 401 | && !_tcscmp(installStepElement->Value(), _T("x64")) |
| 402 | && installStepElement->FirstChild()) |
| 403 | || |
| 404 | (g_isUnicode |
| 405 | && !_tcscmp(installStepElement->Value(), _T("unicode")) |
| 406 | && installStepElement->FirstChild()) |
| 407 | || |
| 408 | (!g_isUnicode |
| 409 | && !_tcscmp(installStepElement->Value(), _T("ansi")) |
| 410 | && installStepElement->FirstChild())) |
| 411 | { |
| 412 | addSteps(plugin, installStepElement, ior); |
| 413 | } |
| 414 | else |
| 415 | { |
| 416 | |
| 417 | std::shared_ptr<InstallStep> installStep = installStepFactory.create(installStepElement); |
| 418 | if (installStep.get()) |
| 419 | { |
| 420 | if (INSTALL == ior) |
| 421 | plugin->addInstallStep(installStep); |
| 422 | else if (REMOVE == ior) |
| 423 | plugin->addRemoveStep(installStep); |
| 424 | } |
| 425 | |
| 426 | } |
| 427 | |
| 428 | |
| 429 | |
| 430 | installStepElement = (TiXmlElement *)installElement->IterateChildren(installStepElement); |
| 431 | } |
| 432 | } |
| 433 | |
| 434 | BOOL PluginList::checkInstalledPlugins() |
| 435 | { |
nothing calls this directly
no test coverage detected