mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=10078
This commit is contained in:
parent
cecb7f4c98
commit
eb867967e6
|
@ -4378,5 +4378,17 @@ Rom 1 May 2006
|
|||
diagnostics.h
|
||||
diagnostics_win.C
|
||||
|
||||
Rom 2 May 2006
|
||||
- Have the BOINC Manager perform the screensaver test everytime
|
||||
is successfully makes a connection to the localhost core
|
||||
client. It executes so fast it doesn't even show up in the
|
||||
process list and if the user ever switches firewall packages
|
||||
it'll at least prevent the machine from going into limbo
|
||||
when the screensaver is spposed to shutdown.
|
||||
|
||||
clientgui/
|
||||
BOINCGUIApp.cpp, .h
|
||||
MainFrame.cpp
|
||||
|
||||
|
||||
|
|
@ -951,4 +951,47 @@ int CBOINCGUIApp::UpdateSystemIdleDetection() {
|
|||
}
|
||||
|
||||
|
||||
int CBOINCGUIApp::StartBOINCScreensaverTest() {
|
||||
#ifdef __WXMSW__
|
||||
wxString strExecute = wxEmptyString;
|
||||
wxChar szExecutableDirectory[4096];
|
||||
PROCESS_INFORMATION pi;
|
||||
STARTUPINFO si;
|
||||
BOOL bProcessStarted;
|
||||
|
||||
memset(szExecutableDirectory, 0, sizeof(szExecutableDirectory));
|
||||
memset(&pi, 0, sizeof(pi));
|
||||
memset(&si, 0, sizeof(si));
|
||||
|
||||
si.cb = sizeof(si);
|
||||
si.dwFlags = STARTF_USESHOWWINDOW;
|
||||
si.wShowWindow = SW_HIDE;
|
||||
|
||||
|
||||
// On Windows the screensaver is located in the Windows directory.
|
||||
GetWindowsDirectory(
|
||||
szExecutableDirectory,
|
||||
(sizeof(szExecutableDirectory) / sizeof(wxChar))
|
||||
);
|
||||
|
||||
// Append boinc.exe to the end of the strExecute string and get ready to rock
|
||||
strExecute = wxT("\"") + wxString(szExecutableDirectory) + wxT("\\boinc.scr\" /test");
|
||||
|
||||
bProcessStarted = CreateProcess(
|
||||
NULL,
|
||||
(LPTSTR)strExecute.c_str(),
|
||||
NULL,
|
||||
NULL,
|
||||
FALSE,
|
||||
CREATE_NEW_PROCESS_GROUP|CREATE_NO_WINDOW,
|
||||
NULL,
|
||||
szExecutableDirectory,
|
||||
&si,
|
||||
&pi
|
||||
);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
const char *BOINC_RCSID_487cbf3018 = "$Id$";
|
||||
|
|
|
@ -147,6 +147,8 @@ public:
|
|||
int IsNetworkAlwaysOnline();
|
||||
int UpdateSystemIdleDetection();
|
||||
|
||||
int StartBOINCScreensaverTest();
|
||||
|
||||
CBrandingScheme* GetBrand() { return m_pBranding; }
|
||||
CMainFrame* GetFrame() { return m_pFrame; }
|
||||
CMainDocument* GetDocument() { return m_pDocument; }
|
||||
|
|
|
@ -1669,6 +1669,7 @@ void CMainFrame::OnConnect(CMainFrameEvent&) {
|
|||
CMainDocument* pDoc = wxGetApp().GetDocument();
|
||||
CWizardAccountManager* pAMWizard = NULL;
|
||||
CWizardAttachProject* pAPWizard = NULL;
|
||||
wxString strComputer = wxEmptyString;
|
||||
wxString strName = wxEmptyString;
|
||||
wxString strURL = wxEmptyString;
|
||||
bool bCachedCredentials = false;
|
||||
|
@ -1690,6 +1691,15 @@ void CMainFrame::OnConnect(CMainFrameEvent&) {
|
|||
m_pFrameListPanelRenderTimer->Stop();
|
||||
m_pDocumentPollTimer->Stop();
|
||||
|
||||
|
||||
// If we are connected to the localhost, run a really quick screensaver
|
||||
// test to trigger a firewall popup.
|
||||
pDoc->GetConnectedComputerName(strComputer);
|
||||
if (pDoc->IsComputerNameLocal(strComputer)) {
|
||||
wxGetApp().StartBOINCScreensaverTest();
|
||||
}
|
||||
|
||||
|
||||
pDoc->rpc.acct_mgr_info(ami);
|
||||
if (ami.acct_mgr_url.size() && !ami.have_credentials) {
|
||||
pAMWizard = new CWizardAccountManager(this);
|
||||
|
|
Loading…
Reference in New Issue