mirror of https://github.com/BOINC/boinc.git
- 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
This commit is contained in:
parent
a6cf172fb0
commit
8b35c1f4cc
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue