From 8233433f6cee350ee8a4cfe0a3fb625864ff6e3f Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 13 Oct 2002 21:51:23 +0000 Subject: [PATCH] win compile svn path=/trunk/boinc/; revision=489 --- client/main.C | 24 +++--------------------- client/win/win_main.cpp | 2 ++ client/win/wingui.cpp | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/client/main.C b/client/main.C index 8fb9c35cad..0b273080fd 100644 --- a/client/main.C +++ b/client/main.C @@ -19,16 +19,12 @@ // command-line version of the BOINC core client -#include "boinc_api.h" +// This file contains no GUI-related code, +// and is not included in the source code for Mac or Win GUI clients -#ifndef _WIN32 #include -#endif - -#ifdef _WIN32 -#include "win/wingui.h" -#endif +#include "boinc_api.h" #include "account.h" #include "client_state.h" #include "error_numbers.h" @@ -48,18 +44,6 @@ void show_message(char* message, char* priority) { } } -#ifdef _WIN32 - -int get_initial_project() { - CLoginDialog dlg(IDD_LOGIN); - int retval = dlg.DoModal(); - if (retval != IDOK) return -1; - write_account_file(dlg.m_url.GetBuffer(0), dlg.m_auth.GetBuffer(0)); - return 0; -} - -#else - // Prompt user for project URL and authenticator, // and create an account file // TODO: use better input method here, backspace doesn't always seem to work @@ -85,8 +69,6 @@ int get_initial_project() { return 0; } -#endif - #ifdef __APPLE_CC__ #include "mac_main.h" int main() { diff --git a/client/win/win_main.cpp b/client/win/win_main.cpp index 6d2f026a5c..006c55e244 100644 --- a/client/win/win_main.cpp +++ b/client/win/win_main.cpp @@ -17,6 +17,8 @@ // Contributor(s): // +// Main program for the Windows command-line client + #include #include "win_net.h" diff --git a/client/win/wingui.cpp b/client/win/wingui.cpp index 9d0b828436..3b46754165 100755 --- a/client/win/wingui.cpp +++ b/client/win/wingui.cpp @@ -7,6 +7,22 @@ CMainWindow* myWnd; CMyApp myApp; +void show_message(char* message, char* priority) { + if (!strcmp(priority, "high")) { + fprintf(stderr, "BOINC core client: %s (priority: %s)\n", message, priority); + } else { + printf("BOINC core client: %s (priority: %s)\n", message, priority); + } +} + +int get_initial_project() { + CLoginDialog dlg(IDD_LOGIN); + int retval = dlg.DoModal(); + if (retval != IDOK) return -1; + write_account_file(dlg.m_url.GetBuffer(0), dlg.m_auth.GetBuffer(0)); + return 0; +} + ///////////////////////////////////////////////////////////////////////// // CProgressHeaderCtrl message map and member functions