void Windows8LPIAction::CheckPrerequirements(Action * action) { if (_isASupportedSystemLanguage() == false) { _getStringFromResourceIDName(IDS_WINDOWSLPIACTION_NOSPFR, szCannotBeApplied); g_log.Log(L"Windows8LPIAction::CheckPrerequirements. Unsupported base language"); SetStatus(CannotBeApplied); return; } if (_isAlreadyApplied()) { SetStatus(AlreadyApplied); return; } ConfigurationFileActionDownload downloadVersion; downloadVersion = ConfigurationInstance::Get().GetRemote().GetDownloadForActionID(GetID(), wstring(_getDownloadID())); if (downloadVersion.IsEmpty()) { _getStringFromResourceIDName(IDS_NOTSUPPORTEDVERSION, szCannotBeApplied); g_log.Log(L"Windows8LPIAction::CheckPrerequirements. Version not supported"); SetStatus(CannotBeApplied); return; } }
void WindowsLPIAction::CheckPrerequirements(Action * action) { LANGID langid; WORD primary; bool bLangOk; if (m_OSVersion->IsWindows64Bits() == false) { if (m_OSVersion->GetVersion() != WindowsXP && m_OSVersion->GetVersion() != WindowsVista && m_OSVersion->GetVersion() != Windows7) { _getStringFromResourceIDName(IDS_WINDOWSLPIACTION_UNSUPPORTEDWIN, szCannotBeApplied); g_log.Log(L"WindowsLPIAction::CheckPrerequirements. Unsupported Windows version"); SetStatus(CannotBeApplied); return; } } else // 64 bits { if (m_OSVersion->GetVersion() != Windows7) { _getStringFromResourceIDName(IDS_WINDOWSLPIACTION_UNSUPPORTEDWIN, szCannotBeApplied); g_log.Log(L"WindowsLPIAction::CheckPrerequirements. Unsupported Windows version"); SetStatus(CannotBeApplied); return; } } langid = m_win32I18N->GetSystemDefaultUILanguage(); primary = PRIMARYLANGID(langid); if (m_OSVersion->GetVersion() == WindowsXP) { bLangOk = (primary == SPANISH_LOCALEID); } else { bLangOk = (primary == SPANISH_LOCALEID || primary == FRENCH_LOCALEID); } if (bLangOk == false) { _getStringFromResourceIDName(IDS_WINDOWSLPIACTION_NOSPFR, szCannotBeApplied); g_log.Log(L"WindowsLPIAction::CheckPrerequirements. Incorrect Windows base language found (langid %u)", (wchar_t* )langid); SetStatus(CannotBeApplied); return; } }
bool WindowsLPIAction::IsNeed() { if (status == CannotBeApplied) return false; bool bNeed = false; if (_getDownloadID() != DI_UNKNOWN) { if (_isLangPackInstalled() == false || _isDefaultLanguage() == false) { bNeed = true; } else { status = AlreadyApplied; } } else { status = CannotBeApplied; _getStringFromResourceIDName(IDS_WINDOWSLPIACTION_UNSUPPORTEDVERSION, szCannotBeApplied); g_log.Log(L"WindowsLPIAction::IsNeed. Unsupported Windows version"); } g_log.Log(L"WindowsLPIAction::IsNeed returns %u", (wchar_t *) bNeed); return bNeed; }
void OpenOfficeAction::CheckPrerequirements(Action * action) { _readVersionInstalled(); if (m_version.size() > 0) { if (_isLangPackInstalled() == true) { SetStatus(AlreadyApplied); return; } if (_doesDownloadExist() == false) { _getStringFromResourceIDName(IDS_OPENOFFICEACTION_NOTSUPPORTEDVERSION, szCannotBeApplied); g_log.Log(L"OpenOfficeAction::CheckPrerequirements. Version not supported"); SetStatus(CannotBeApplied); return; } } else { _setStatusNotInstalled(); return; } }
void AdobeReaderAction::CheckPrerequirements(Action * action) { _readVersionInstalled(); if (m_version.size() > 0) { if (_isLangPackInstalled() == true) { SetStatus(AlreadyApplied); return; } int major = _getMajorVersion(); if (major != 9 && major != 10) { _getStringFromResourceIDName(IDS_NOTSUPPORTEDVERSION, szCannotBeApplied); g_log.Log(L"AdobeReaderAction::CheckPrerequirements. Version not supported"); SetStatus(CannotBeApplied); return; } } else { _setStatusNotInstalled(); return; } }
void ConfigureDefaultLanguageAction::CheckPrerequirements(Action * action) { if (_isCatalanKeyboardActive()) { SetStatus(AlreadyApplied); } else { if (_hasSpanishKeyboard() == false) { _getStringFromResourceIDName(IDS_DEFLANGACTION_NOSPANISHKEYBOARD, szCannotBeApplied); g_log.Log(L"ConfigureDefaultLanguageAction::CheckPrerequirements. No Spanish keyboard installed."); SetStatus(CannotBeApplied); return; } } }
void IEAcceptLanguagesAction::CheckPrerequirements(Action * action) { wstring firstlang; if (m_OSVersion->GetVersion() == Windows8) { _getStringFromResourceIDName(IDS_IEACCEPTEDLANGUAGESACTION_WINDOWS8, szCannotBeApplied); g_log.Log(L"IEAcceptLanguagesAction::CheckPrerequirements. Applied with language pack."); SetStatus(CannotBeApplied); return; } if (_isCurrentLanguageOk(firstlang)) { SetStatus(AlreadyApplied); } }
void MSOfficeLPIAction::CheckPrerequirements(Action * action) { if (_getVersionInstalled() == NoMSOffice) { _setStatusNotInstalled(); return; } if (_getVersionInstalled() == MSOffice2010_64 || _getVersionInstalled() == MSOffice2013_64) { SetStatus(CannotBeApplied); _getStringFromResourceIDName(IDS_NOTSUPPORTEDVERSION, szCannotBeApplied); g_log.Log(L"MSOfficeLPIAction::CheckPrerequirements. Version not supported"); return; } if (_isLangPackInstalled()) { SetStatus(AlreadyApplied); return; } }
wchar_t* IEAction::GetDescription() { return _getStringFromResourceIDName(IDS_IEACTION_DESCRIPTION, szDescription); }
wchar_t* IEAction::GetName() { return _getStringFromResourceIDName(IDS_IEACTION_NAME, szName); }
wchar_t* WindowsLPIAction::GetDescription() { return _getStringFromResourceIDName(IDS_WINDOWSLPIACTION_DESCRIPTION, szDescription); }
wchar_t* WindowsLPIAction::GetName() { return _getStringFromResourceIDName(IDS_WINDOWSLPIACTION_NAME, szName); }
wchar_t* FirefoxAction::GetDescription() { return _getStringFromResourceIDName(IDS_FIREFOXACTION_DESCRIPTION, szDescription); }
wchar_t* ChromeAction::GetName() { return _getStringFromResourceIDName(IDS_CHROMEACTION_NAME, szName); }
wchar_t* OpenOfficeAction::GetName() { return _getStringFromResourceIDName(IDS_OPENOFFICEACTION_NAME, szName); }
wchar_t* AdobeReaderAction::GetName() { return _getStringFromResourceIDName(IDS_ADOBEREADERCTION_NAME, szName); }
wchar_t* FirefoxAction::GetName() { return _getStringFromResourceIDName(IDS_FIREFOXACTION_NAME, szName); }
wchar_t* ConfigureDefaultLanguageAction::GetName() { return _getStringFromResourceIDName(IDS_DEFLANGACTION_NAME, szName); }
wchar_t* MSOfficeLPIAction::GetName() { return _getStringFromResourceIDName(IDS_MSOFFICEACTION_NAME, szName); }
wchar_t* OpenOfficeAction::GetDescription() { return _getStringFromResourceIDName(IDS_OPENOFFICEACTION_DESCRIPTION, szDescription); }
wchar_t* AdobeReaderAction::GetDescription() { return _getStringFromResourceIDName(IDS_ADOBEREADERCTION_DESCRIPTION, szDescription); }
wchar_t* MSOfficeLPIAction::GetDescription() { return _getStringFromResourceIDName(IDS_MSOFFICEACTION_DESCRIPTION, szDescription); }
void Action::_setStatusNotInstalled() { _getStringFromResourceIDName(IDS_APPLICATION_NOTINSTALLED, szCannotBeApplied); SetStatus(NotInstalled); }
wchar_t* ConfigureDefaultLanguageAction::GetDescription() { return _getStringFromResourceIDName(IDS_DEFLANGACTION_DESCRIPTION, szDescription); }
void IELPIAction::CheckPrerequirements(Action * action) { Prerequirements pre; ActionStatus status; if (GetStatus() == CannotBeApplied) status = Selected; else status = GetStatus(); szCannotBeApplied[0] = NULL; pre = _checkPrerequirements(); if (pre != PrerequirementsOk) { switch (pre) { case UnknownIEVersion: _getStringFromResourceIDName(IDS_IELPIACTION_UNKNOWNIE, szCannotBeApplied); break; default: break; } } else if (action != NULL) { switch (_checkPrerequirementsDependand(action)) { case AppliedInWinLPI: _getStringFromResourceIDName(IDS_IELPIACTION_APPLIEDINWINLPI, szCannotBeApplied); break; case NeedsWinLPI: _getStringFromResourceIDName(IDS_IELPIACTION_IENEEDWINLPI, szCannotBeApplied); break; case NoLangPackAvailable: _getStringFromResourceIDName(IDS_IELPIACTION_NOPACKAGE, szCannotBeApplied); break; default: break; } } g_log.Log(L"IELPIAction::CheckPrerequirements: %s", wcslen(szCannotBeApplied) > 0 ? szCannotBeApplied: L"Ok"); if (wcslen(szCannotBeApplied) > 0) { status = CannotBeApplied; } else { if (_getDownloadID() != NULL) { if (_isLangPackInstalled()) { status = AlreadyApplied; } } else { status = CannotBeApplied; } } SetStatus(status); }