diff --git a/checkin_notes b/checkin_notes index ddd6ea7ba1..6e7737d465 100755 --- a/checkin_notes +++ b/checkin_notes @@ -11805,3 +11805,17 @@ Rom April 27 2004 Makefile.am lib/ Makefile.am + +Rom April 28 2004 + - Fixup build system so it doesn't have to change the version number in the + Windows resource files for every version change. Make the resource files + include win_config.h which contain the nessassary information and then + reference it. + + / + set-version + /client + Makefile.am + /client/win + *.rc + update* (deleted) diff --git a/client/Makefile.am b/client/Makefile.am index fbe80cebc8..14ce7ae206 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -68,19 +68,7 @@ client-bin-gz: @CLIENT_BIN_FILENAME@.gz win/win_config.h: $(top_srcdir)/config.h grep '#define.*VERSION' $^ > $@ -win/boinc_cli.rc: $(top_srcdir)/config.h - cd win && ../$(srcdir)/win/update-boinc-cli-version - -win/boinc_dll.rc: $(top_srcdir)/config.h - cd win && ../$(srcdir)/win/update-boinc-dll-version - -win/boinc_gui.rc: $(top_srcdir)/config.h - cd win && ../$(srcdir)/win/update-boinc-gui-version - -win/boinc_ss.rc: $(top_srcdir)/config.h - cd win && ../$(srcdir)/win/update-boinc-ss-version - -version: win/win_config.h win/boinc_cli.rc win/boinc_dll.rc win/boinc_gui.rc win/boinc_ss.rc +version: win/win_config.h # make a hard link to the client name. @CLIENT_BIN_FILENAME@: boinc_client diff --git a/client/win/boinc_cli.rc b/client/win/boinc_cli.rc index f1072fd5c0..e539fee822 100644 --- a/client/win/boinc_cli.rc +++ b/client/win/boinc_cli.rc @@ -1,6 +1,7 @@ // Microsoft Visual C++ generated resource script. // #include "boinc_cli.h" +#include "win_config.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// @@ -30,6 +31,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 1 TEXTINCLUDE BEGIN "boinc_cli.h\0" + "win_config.h\0" END 2 TEXTINCLUDE @@ -53,8 +55,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,01,0,0 - PRODUCTVERSION 3,01,0,0 + FILEVERSION MAJOR_VERSION,MINOR_VERSION,0,0 + PRODUCTVERSION MAJOR_VERSION,MINOR_VERSION,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -71,12 +73,12 @@ BEGIN BEGIN VALUE "CompanyName", "Space Sciences Laboratory" VALUE "FileDescription", "BOINC Core Client Command Line Interface" - VALUE "FileVersion", "3, 01, 0, 0\0" + VALUE "FileVersion", VERSION "\0" VALUE "InternalName", "boinc_cli" VALUE "LegalCopyright", "Copyright © 2003-2004 University of California" VALUE "OriginalFilename", "boinc_cli.exe" VALUE "ProductName", "BOINC Core Client" - VALUE "ProductVersion", "3, 01, 0, 0\0" + VALUE "ProductVersion", PACKAGE_VERSION "\0" END END BLOCK "VarFileInfo" diff --git a/client/win/boinc_dll.rc b/client/win/boinc_dll.rc index 37a6425721..d60c56a485 100644 --- a/client/win/boinc_dll.rc +++ b/client/win/boinc_dll.rc @@ -1,6 +1,7 @@ // Microsoft Visual C++ generated resource script. // #include "boinc_dll.h" +#include "win_config.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// @@ -30,6 +31,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 1 TEXTINCLUDE BEGIN "boinc_dll.h\0" + "win_config.h\0" END 2 TEXTINCLUDE @@ -53,8 +55,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,01,0,0 - PRODUCTVERSION 3,01,0,0 + FILEVERSION MAJOR_VERSION,MINOR_VERSION,0,0 + PRODUCTVERSION MAJOR_VERSION,MINOR_VERSION,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -71,12 +73,12 @@ BEGIN BEGIN VALUE "CompanyName", "Space Sciences Laboratory" VALUE "FileDescription", "BOINC Input Monitor" - VALUE "FileVersion", "3, 01, 0, 0\0" + VALUE "FileVersion", VERSION "\0" VALUE "InternalName", "boinc_dll" VALUE "LegalCopyright", "Copyright © 2003-2004 University of California" VALUE "OriginalFilename", "boinc.dll" VALUE "ProductName", "BOINC Core Client" - VALUE "ProductVersion", "3, 01, 0, 0\0" + VALUE "ProductVersion", PACKAGE_VERSION "\0" END END BLOCK "VarFileInfo" diff --git a/client/win/boinc_gui.rc b/client/win/boinc_gui.rc index 668045c172..06a2fbf414 100644 --- a/client/win/boinc_gui.rc +++ b/client/win/boinc_gui.rc @@ -1,6 +1,7 @@ // Microsoft Visual C++ generated resource script. // #include "boinc_gui.h" +#include "win_config.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// @@ -30,6 +31,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 1 TEXTINCLUDE BEGIN "boinc_gui.h\0" + "win_config.h\0" END 2 TEXTINCLUDE @@ -288,8 +290,8 @@ IDI_ICONWARNING ICON "res\\iconwarning.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,01,0,0 - PRODUCTVERSION 3,01,0,0 + FILEVERSION MAJOR_VERSION,MINOR_VERSION,0,0 + PRODUCTVERSION MAJOR_VERSION,MINOR_VERSION,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -306,12 +308,12 @@ BEGIN BEGIN VALUE "CompanyName", "Space Sciences Laboratory" VALUE "FileDescription", "boinc_gui" - VALUE "FileVersion", "3, 01, 0, 0" + VALUE "FileVersion", VERSION "\0" VALUE "InternalName", "boinc_gui" VALUE "LegalCopyright", "Copyright © 2004 University of California" VALUE "OriginalFilename", "boinc_gui.exe" VALUE "ProductName", "BOINC Core Client" - VALUE "ProductVersion", "3, 01, 0, 0" + VALUE "ProductVersion", PACKAGE_VERSION "\0" END END BLOCK "VarFileInfo" diff --git a/client/win/boinc_ss.rc b/client/win/boinc_ss.rc index 2f0cedecdb..acafe618d0 100755 --- a/client/win/boinc_ss.rc +++ b/client/win/boinc_ss.rc @@ -1,6 +1,7 @@ // Microsoft Visual C++ generated resource script. // #include "boinc_ss.h" +#include "win_config.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// @@ -30,6 +31,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 1 TEXTINCLUDE BEGIN "boinc_ss.h\0" + "win_config.h\0" END 2 TEXTINCLUDE @@ -53,8 +55,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,01,0,0 - PRODUCTVERSION 3,01,0,0 + FILEVERSION MAJOR_VERSION,MINOR_VERSION,0,0 + PRODUCTVERSION MAJOR_VERSION,MINOR_VERSION,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -71,12 +73,12 @@ BEGIN BEGIN VALUE "CompanyName", "Space Sciences Laboratory" VALUE "FileDescription", "BOINC Screensaver" - VALUE "FileVersion", "3, 01, 0, 0\0" + VALUE "FileVersion", VERSION "\0" VALUE "InternalName", "boinc_ss" VALUE "LegalCopyright", "Copyright © 2003-2004 University of California" VALUE "OriginalFilename", "boinc.scr" VALUE "ProductName", "BOINC Core Client" - VALUE "ProductVersion", "3, 01, 0, 0\0" + VALUE "ProductVersion", PACKAGE_VERSION "\0" END END BLOCK "VarFileInfo" diff --git a/client/win/update-boinc-cli-version b/client/win/update-boinc-cli-version deleted file mode 100755 index f695805bdb..0000000000 --- a/client/win/update-boinc-cli-version +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python - -# $Id$ -# update boinc_cli.rc with version numbers. - -import boinc_path_config -from Boinc.version import * -import os, re - -version_string = '%d,%d,0,0' % (MAJOR_VERSION, MINOR_VERSION) -version_string_spaces = '"%d, %d, 0, 0\\\\0"' % (MAJOR_VERSION, MINOR_VERSION) - - -fn_boinc_cli_rc_old = 'boinc_cli.rc.old' -fn_boinc_cli_rc = 'boinc_cli.rc' - -os.rename(fn_boinc_cli_rc, fn_boinc_cli_rc_old) -rc_boinc_cli_old = open(fn_boinc_cli_rc_old) -rc_boinc_cli = open(fn_boinc_cli_rc, 'w') - -for line in rc_boinc_cli_old: - line = re.sub('( +(FILEVERSION|PRODUDUCTVERSION) +).*', '\\1'+version_string, line) - line = re.sub('( +VALUE "(FileVersion|ProductVersion)", +).*', '\\1'+version_string_spaces, line) - rc_boinc_cli.write(line) - -print "Updated boinc_cli.rc to version %d.%02d" %(MAJOR_VERSION, MINOR_VERSION) - diff --git a/client/win/update-boinc-dll-version b/client/win/update-boinc-dll-version deleted file mode 100755 index 6f6ff29318..0000000000 --- a/client/win/update-boinc-dll-version +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python - -# $Id$ -# update boinc_dll.rc with version numbers. - -import boinc_path_config -from Boinc.version import * -import os, re - -version_string = '%d,%d,0,0' % (MAJOR_VERSION, MINOR_VERSION) -version_string_spaces = '"%d, %d, 0, 0\\\\0"' % (MAJOR_VERSION, MINOR_VERSION) - - -fn_boinc_dll_rc_old = 'boinc_dll.rc.old' -fn_boinc_dll_rc = 'boinc_dll.rc' - -os.rename(fn_boinc_dll_rc, fn_boinc_dll_rc_old) -rc_boinc_dll_old = open(fn_boinc_dll_rc_old) -rc_boinc_dll = open(fn_boinc_dll_rc, 'w') - -for line in rc_boinc_dll_old: - line = re.sub('( +(FILEVERSION|PRODUDUCTVERSION) +).*', '\\1'+version_string, line) - line = re.sub('( +VALUE "(FileVersion|ProductVersion)", +).*', '\\1'+version_string_spaces, line) - rc_boinc_dll.write(line) - -print "Updated boinc_dll.rc to version %d.%02d" %(MAJOR_VERSION, MINOR_VERSION) - diff --git a/client/win/update-boinc-gui-version b/client/win/update-boinc-gui-version deleted file mode 100755 index 543ff31473..0000000000 --- a/client/win/update-boinc-gui-version +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python - -# $Id$ -# update boinc_gui.rc with version numbers. - -import boinc_path_config -from Boinc.version import * -import os, re - -version_string = '%d,%d,0,0' % (MAJOR_VERSION, MINOR_VERSION) -version_string_spaces = '"%d, %d, 0, 0\\\\0"' % (MAJOR_VERSION, MINOR_VERSION) - - -fn_boinc_gui_rc_old = 'boinc_gui.rc.old' -fn_boinc_gui_rc = 'boinc_gui.rc' - -os.rename(fn_boinc_gui_rc, fn_boinc_gui_rc_old) -rc_boinc_gui_old = open(fn_boinc_gui_rc_old) -rc_boinc_gui = open(fn_boinc_gui_rc, 'w') - -for line in rc_boinc_gui_old: - line = re.sub('( +(FILEVERSION|PRODUDUCTVERSION) +).*', '\\1'+version_string, line) - line = re.sub('( +VALUE "(FileVersion|ProductVersion)", +).*', '\\1'+version_string_spaces, line) - rc_boinc_gui.write(line) - -print "Updated boinc_gui.rc to version %d.%02d" %(MAJOR_VERSION, MINOR_VERSION) - diff --git a/client/win/update-boinc-ss-version b/client/win/update-boinc-ss-version deleted file mode 100755 index 73f152c0b6..0000000000 --- a/client/win/update-boinc-ss-version +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python - -# $Id$ -# update boinc_ss.rc with version numbers. - -import boinc_path_config -from Boinc.version import * -import os, re - -version_string = '%d,%d,0,0' % (MAJOR_VERSION, MINOR_VERSION) -version_string_spaces = '"%d, %d, 0, 0\\\\0"' % (MAJOR_VERSION, MINOR_VERSION) - - -fn_boinc_ss_rc_old = 'boinc_ss.rc.old' -fn_boinc_ss_rc = 'boinc_ss.rc' - -os.rename(fn_boinc_ss_rc, fn_boinc_ss_rc_old) -rc_boinc_ss_old = open(fn_boinc_ss_rc_old) -rc_boinc_ss = open(fn_boinc_ss_rc, 'w') - -for line in rc_boinc_ss_old: - line = re.sub('( +(FILEVERSION|PRODUDUCTVERSION) +).*', '\\1'+version_string, line) - line = re.sub('( +VALUE "(FileVersion|ProductVersion)", +).*', '\\1'+version_string_spaces, line) - rc_boinc_ss.write(line) - -print "Updated boinc_ss.rc to version %d.%02d" %(MAJOR_VERSION, MINOR_VERSION) diff --git a/client/win/win_service.cpp b/client/win/win_service.cpp index 59cab0b864..39b7405783 100644 --- a/client/win/win_service.cpp +++ b/client/win/win_service.cpp @@ -38,6 +38,7 @@ extern void susp_client(int a); extern void resume_client(int a); + // internal function prototypes not defined in the header LPTSTR GetLastErrorText( LPTSTR lpszBuf, DWORD dwSize ); @@ -194,7 +195,10 @@ BOOL ReportStatus(DWORD dwCurrentState, if (dwCurrentState == SERVICE_START_PENDING) ssStatus.dwControlsAccepted = 0; else - ssStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP; + ssStatus.dwControlsAccepted = + SERVICE_ACCEPT_STOP | + SERVICE_ACCEPT_PAUSE_CONTINUE | + SERVICE_ACCEPT_SHUTDOWN; ssStatus.dwCurrentState = dwCurrentState; ssStatus.dwWin32ExitCode = dwWin32ExitCode; diff --git a/set-version b/set-version index 1f6b1b7d0d..733bf8aeda 100755 --- a/set-version +++ b/set-version @@ -29,7 +29,3 @@ fi cmd ./_autosetup -c cmd cd client cmd make win/win_config.h -cmd make win/boinc_cli.rc -cmd make win/boinc_dll.rc -cmd make win/boinc_gui.rc -cmd make win/boinc_ss.rc