Exemple #1
0
void CUpdater::RunIfNeeded()
{
	build const b = AvailableBuild();
	if( state_ == idle || state_ == failed || LongTimeSinceLastCheck() || (state_ == newversion && !b.url_.empty()) ||
		(state_ == newversion_ready && !VerifyChecksum( DownloadedFile(), b.size_, b.hash_ ) ) ) {
		Run();
	}
}
Exemple #2
0
void CUpdater::RunIfNeeded()
{
#if FZ_AUTOUPDATECHECK
	if( state_ == failed || state_ == idle ) {
		if( !COptions::Get()->GetOptionVal(OPTION_DEFAULT_DISABLEUPDATECHECK) && COptions::Get()->GetOptionVal(OPTION_UPDATECHECK) != 0 && LongTimeSinceLastCheck() ) {
			Run();
		}
	}
#endif
}