mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=4841
This commit is contained in:
parent
c0c47595ac
commit
ba79e58d58
|
@ -21228,3 +21228,14 @@ David 13 Dec 2004
|
|||
assimilator.C
|
||||
transitioner.C
|
||||
validator.C
|
||||
|
||||
Rom 13 Dec 2004
|
||||
- Bug Fix: BOINC Manager needs to initialize the System Idle Tracker
|
||||
in order for BOINC to detect if the system is idle.
|
||||
- BOINC Setup for Windows - The UI is now complete for the Single,
|
||||
Shared, and Service install types.
|
||||
|
||||
clientgui/
|
||||
BOINCGUIApp.cpp, .h
|
||||
win_build/installerv2/
|
||||
BOINC.ism
|
||||
|
|
|
@ -31,6 +31,10 @@
|
|||
#include "MainDocument.h"
|
||||
|
||||
|
||||
typedef BOOL (CALLBACK* IdleTrackerInit)();
|
||||
typedef void (CALLBACK* IdleTrackerTerm)();
|
||||
|
||||
|
||||
IMPLEMENT_APP(CBOINCGUIApp)
|
||||
IMPLEMENT_DYNAMIC_CLASS(CBOINCGUIApp, wxApp)
|
||||
|
||||
|
@ -99,6 +103,9 @@ bool CBOINCGUIApp::OnInit()
|
|||
DetectDefaultWindowStation();
|
||||
DetectDefaultDesktop();
|
||||
|
||||
// Startup the System Idle Detection code
|
||||
StartupSystemIdleDetection();
|
||||
|
||||
// Detect if we need to start the BOINC Core Client due to configuration
|
||||
StartupBOINCCore();
|
||||
|
||||
|
@ -116,6 +123,9 @@ int CBOINCGUIApp::OnExit()
|
|||
// Detect if we need to stop the BOINC Core Client due to configuration
|
||||
ShutdownBOINCCore();
|
||||
|
||||
// Shutdown the System Idle Detection code
|
||||
ShutdownSystemIdleDetection();
|
||||
|
||||
#ifndef NOTASKBAR
|
||||
if (m_pTaskBarIcon)
|
||||
delete m_pTaskBarIcon;
|
||||
|
@ -321,6 +331,58 @@ void CBOINCGUIApp::ShutdownBOINCCore()
|
|||
}
|
||||
|
||||
|
||||
wxInt32 CBOINCGUIApp::StartupSystemIdleDetection()
|
||||
{
|
||||
#ifdef __WXMSW__
|
||||
// load dll and start idle detection
|
||||
m_hIdleDll = LoadLibrary("boinc.dll");
|
||||
if(m_hIdleDll)
|
||||
{
|
||||
IdleTrackerInit fn;
|
||||
fn = (IdleTrackerInit)GetProcAddress(m_hIdleDll, wxT("IdleTrackerInit"));
|
||||
if(!fn)
|
||||
{
|
||||
FreeLibrary(m_hIdleDll);
|
||||
m_hIdleDll = NULL;
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!fn())
|
||||
{
|
||||
FreeLibrary(m_hIdleDll);
|
||||
m_hIdleDll = NULL;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
wxInt32 CBOINCGUIApp::ShutdownSystemIdleDetection()
|
||||
{
|
||||
#ifdef __WXMSW__
|
||||
if(m_hIdleDll) {
|
||||
IdleTrackerTerm fn;
|
||||
fn = (IdleTrackerTerm)GetProcAddress(m_hIdleDll, wxT("IdleTrackerTerm"));
|
||||
if(fn)
|
||||
{
|
||||
fn();
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
FreeLibrary(m_hIdleDll);
|
||||
m_hIdleDll = NULL;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#ifdef __GNUC__
|
||||
static volatile const char __attribute__((unused)) *BOINCrcsid="$Id$";
|
||||
#else
|
||||
|
|
|
@ -53,6 +53,9 @@ protected:
|
|||
void StartupBOINCCore();
|
||||
void ShutdownBOINCCore();
|
||||
|
||||
wxInt32 StartupSystemIdleDetection();
|
||||
wxInt32 ShutdownSystemIdleDetection();
|
||||
|
||||
wxLocale* m_pLocale;
|
||||
wxConfig* m_pConfig;
|
||||
|
||||
|
@ -67,6 +70,10 @@ protected:
|
|||
|
||||
long m_lBOINCCoreProccessId;
|
||||
|
||||
#ifdef __WXMSW__
|
||||
HINSTANCE m_hIdleDll;
|
||||
#endif
|
||||
|
||||
wxString m_strDefaultWindowStation;
|
||||
wxString m_strDefaultDesktop;
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue