From 8b35c1f4cc5eff9899f7954c888829fa35505960 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Wed, 16 Jul 2008 16:55:46 +0000 Subject: [PATCH] - MGR: Detect when a reboot is required for BOINC and display an error dialog if it is required. clientgui/ BOINCGUIApp.cpp, .h svn path=/trunk/boinc/; revision=15610 --- checkin_notes | 7 +++++++ clientgui/BOINCGUIApp.cpp | 22 ++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/checkin_notes b/checkin_notes index 293ba3c700..8d3f0db9d9 100644 --- a/checkin_notes +++ b/checkin_notes @@ -5809,3 +5809,10 @@ David 15 July 2008 sched/ sched_send.C + +Rom 16 July 2008 + - MGR: Detect when a reboot is required for BOINC and display an error + dialog if it is required. + + clientgui/ + BOINCGUIApp.cpp, .h diff --git a/clientgui/BOINCGUIApp.cpp b/clientgui/BOINCGUIApp.cpp index d510263e43..c805a63dc4 100644 --- a/clientgui/BOINCGUIApp.cpp +++ b/clientgui/BOINCGUIApp.cpp @@ -71,6 +71,7 @@ bool CBOINCGUIApp::OnInit() { // Setup variables with default values m_strBOINCArguments = wxEmptyString; m_strBOINCMGRRootDirectory = wxEmptyString; + m_strBOINCMGRDataDirectory = wxEmptyString; m_pLocale = NULL; m_pSkinManager = NULL; m_pFrame = NULL; @@ -323,6 +324,27 @@ bool CBOINCGUIApp::OnInit() { m_pConfig->Read(wxT("Skin"), m_pSkinManager->GetDefaultSkinName()) ); + + // Perform any last minute checks that should keep the manager + // from starting up. + wxString strRebootPendingFile = + GetRootDirectory() + wxFileName::GetPathSeparator() + wxT("RebootPending.txt"); + + wxFileInputStream fisRebootPending(strRebootPendingFile); + if (fisRebootPending.IsOk()) { + + wxMessageDialog dialog( + NULL, + _("A reboot is required in order for BOINC to run properly.\nPlease reboot your computer and try again."), + _("BOINC Manager"), + wxOK|wxICON_ERROR + ); + + dialog.ShowModal(); + return false; + } + + // Initialize the main document m_pDocument = new CMainDocument(); wxASSERT(m_pDocument);