MGR: Don't mark a project as supported if it requires a coprocessor we lack

svn path=/trunk/boinc/; revision=23750
This commit is contained in:
Charlie Fenton 2011-06-18 12:08:13 +00:00
parent 8de55ac7da
commit 7d6bad2e0f
1 changed files with 14 additions and 12 deletions

View File

@ -672,6 +672,13 @@ void CProjectInfoPage::OnPageChanged( wxWizardExEvent& event ) {
} }
// Can the core client support a platform that this project supports? // Can the core client support a platform that this project supports?
//
// NOTE: if the platform entry contains a modifier such as [cuda] or [ati],
// that capability is required. If a project offers both a cuda application
// and a CPU-only application for an operating system, it must have two
// separate platform entries for that OS, one with [cuda] and one without.
// Likewise for ati and mt.
//
for (j = 0;j < aClientPlatforms.size(); j++) { for (j = 0;j < aClientPlatforms.size(); j++) {
for (k = 0;k < aProjectPlatforms.size(); k++) { for (k = 0;k < aProjectPlatforms.size(); k++) {
wxString strClientPlatform = aClientPlatforms[j]; wxString strClientPlatform = aClientPlatforms[j];
@ -680,30 +687,22 @@ void CProjectInfoPage::OnPageChanged( wxWizardExEvent& event ) {
if (strProjectPlatform.Find(_T("windows")) != wxNOT_FOUND) { if (strProjectPlatform.Find(_T("windows")) != wxNOT_FOUND) {
pProjectInfo->m_bProjectSupportsWindows = true; pProjectInfo->m_bProjectSupportsWindows = true;
if (strClientPlatform == strRootProjectPlatform) {
pProjectInfo->m_bSupportedPlatformFound = true;
}
} }
if (strProjectPlatform.Find(_T("apple")) != wxNOT_FOUND) { if (strProjectPlatform.Find(_T("apple")) != wxNOT_FOUND) {
pProjectInfo->m_bProjectSupportsMac = true; pProjectInfo->m_bProjectSupportsMac = true;
if (strClientPlatform == strRootProjectPlatform) {
pProjectInfo->m_bSupportedPlatformFound = true;
}
} }
if (strProjectPlatform.Find(_T("linux")) != wxNOT_FOUND) { if (strProjectPlatform.Find(_T("linux")) != wxNOT_FOUND) {
pProjectInfo->m_bProjectSupportsLinux = true; pProjectInfo->m_bProjectSupportsLinux = true;
if (strClientPlatform == strRootProjectPlatform) {
pProjectInfo->m_bSupportedPlatformFound = true;
}
} }
if (strProjectPlatform.Find(_T("[cuda")) != wxNOT_FOUND) { if (strProjectPlatform.Find(_T("[cuda")) != wxNOT_FOUND) {
pProjectInfo->m_bProjectSupportsNvidiaGPU = true; pProjectInfo->m_bProjectSupportsNvidiaGPU = true;
if ((pDoc->state.have_cuda) && (strClientPlatform == strRootProjectPlatform)) { if ((pDoc->state.have_cuda) && (strClientPlatform == strRootProjectPlatform)) {
pProjectInfo->m_bSupportedPlatformFound = true; pProjectInfo->m_bSupportedPlatformFound = true;
} }
continue;
} }
if (strProjectPlatform.Find(_T("[ati")) != wxNOT_FOUND) { if (strProjectPlatform.Find(_T("[ati")) != wxNOT_FOUND) {
@ -711,6 +710,7 @@ void CProjectInfoPage::OnPageChanged( wxWizardExEvent& event ) {
if ((pDoc->state.have_ati) && (strClientPlatform == strRootProjectPlatform)) { if ((pDoc->state.have_ati) && (strClientPlatform == strRootProjectPlatform)) {
pProjectInfo->m_bSupportedPlatformFound = true; pProjectInfo->m_bSupportedPlatformFound = true;
} }
continue;
} }
if (strProjectPlatform.Find(_T("[mt")) != wxNOT_FOUND) { if (strProjectPlatform.Find(_T("[mt")) != wxNOT_FOUND) {
@ -718,8 +718,10 @@ void CProjectInfoPage::OnPageChanged( wxWizardExEvent& event ) {
if ((pDoc->host.p_ncpus >= 4) && (strClientPlatform == strRootProjectPlatform)) { if ((pDoc->host.p_ncpus >= 4) && (strClientPlatform == strRootProjectPlatform)) {
pProjectInfo->m_bSupportedPlatformFound = true; pProjectInfo->m_bSupportedPlatformFound = true;
} }
continue;
} }
// Application does not require CUDA, ATI or MT
if (strClientPlatform == strRootProjectPlatform) { if (strClientPlatform == strRootProjectPlatform) {
pProjectInfo->m_bSupportedPlatformFound = true; pProjectInfo->m_bSupportedPlatformFound = true;
} }