From: John Graham-C. <jgr...@us...> - 2005-09-13 19:02:14
|
Update of /cvsroot/popfile/windows/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6260/test Modified Files: Tag: b0_22_2 pfidiag.nsi Log Message: Commit Brian's new installer to branch (without first and second patches) Index: pfidiag.nsi =================================================================== RCS file: /cvsroot/popfile/windows/test/pfidiag.nsi,v retrieving revision 1.8 retrieving revision 1.8.4.1 diff -C2 -d -r1.8 -r1.8.4.1 *** pfidiag.nsi 21 Oct 2004 12:39:09 -0000 1.8 --- pfidiag.nsi 13 Sep 2005 19:01:55 -0000 1.8.4.1 *************** *** 5,9 **** # by the Windows installer for POPFile v0.21.0 (or later). # ! # Copyright (c) 2004 John Graham-Cumming # # This file is part of POPFile --- 5,9 ---- # by the Windows installer for POPFile v0.21.0 (or later). # ! # Copyright (c) 2004-2005 John Graham-Cumming # # This file is part of POPFile *************** *** 25,30 **** #-------------------------------------------------------------------------- ! ; This version of the script has been tested with the "NSIS 2" compiler (final), ! ; released 7 February 2004, with no "official" NSIS patches/CVS updates applied. #-------------------------------------------------------------------------- --- 25,47 ---- #-------------------------------------------------------------------------- ! ; This version of the script has been tested with the "NSIS 2.0" compiler (final), ! ; released 7 February 2004, with no "official" NSIS patches applied. This compiler ! ; can be downloaded from http://prdownloads.sourceforge.net/nsis/nsis20.exe?download ! ! !define ${NSIS_VERSION}_found ! ! !ifndef v2.0_found ! !warning \ ! "$\r$\n\ ! $\r$\n*** NSIS COMPILER WARNING:\ ! $\r$\n***\ ! $\r$\n*** This script has only been tested using the NSIS 2.0 compiler\ ! $\r$\n*** and may not work properly with this NSIS ${NSIS_VERSION} compiler\ ! $\r$\n***\ ! $\r$\n*** The resulting 'installer' program should be tested carefully!\ ! $\r$\n$\r$\n" ! !endif ! ! !undef ${NSIS_VERSION}_found #-------------------------------------------------------------------------- *************** *** 61,65 **** ;-------------------------------------------------------------------------- ! !define C_VERSION "0.0.50" !define C_OUTFILE "pfidiag.exe" --- 78,82 ---- ;-------------------------------------------------------------------------- ! !define C_VERSION "0.0.53" !define C_OUTFILE "pfidiag.exe" *************** *** 84,115 **** #-------------------------------------------------------------------------- ! # Version Information settings (for the utility's EXE file) #-------------------------------------------------------------------------- ! ; 'VIProductVersion' format is X.X.X.X where X is a number in range 0 to 65535 ! ; representing the following values: Major.Minor.Release.Build ! ! VIProductVersion "${C_VERSION}.0" ! VIAddVersionKey "ProductName" "PFI Diagnostic Utility" ! VIAddVersionKey "Comments" "POPFile Homepage: http://getpopfile.org" ! VIAddVersionKey "CompanyName" "The POPFile Project" ! VIAddVersionKey "LegalCopyright" "Copyright (c) 2004 John Graham-Cumming" ! VIAddVersionKey "FileDescription" "PFI Diagnostic Utility" ! VIAddVersionKey "FileVersion" "${C_VERSION}" ! VIAddVersionKey "OriginalFilename" "${C_OUTFILE}" ! VIAddVersionKey "Build Date/Time" "${__DATE__} @ ${__TIME__}" ! VIAddVersionKey "Build Script" "${__FILE__}$\r$\n(${__TIMESTAMP__})" #-------------------------------------------------------------------------- ! # Include private library functions and macro definitions #-------------------------------------------------------------------------- ! ; Avoid compiler warnings by disabling the functions and definitions we do not use ! !define PFIDIAG ! !include "..\pfi-library.nsh" #-------------------------------------------------------------------------- --- 101,135 ---- #-------------------------------------------------------------------------- ! # Include private library functions and macro definitions #-------------------------------------------------------------------------- ! ; Avoid compiler warnings by disabling the functions and definitions we do not use ! !define PFIDIAG ! !include "..\pfi-library.nsh" #-------------------------------------------------------------------------- ! # Version Information settings (for the utility's EXE file) #-------------------------------------------------------------------------- ! ; 'VIProductVersion' format is X.X.X.X where X is a number in range 0 to 65535 ! ; representing the following values: Major.Minor.Release.Build ! VIProductVersion "${C_VERSION}.0" ! VIAddVersionKey "ProductName" "PFI Diagnostic Utility" ! VIAddVersionKey "Comments" "POPFile Homepage: http://getpopfile.org/" ! VIAddVersionKey "CompanyName" "The POPFile Project" ! VIAddVersionKey "LegalCopyright" "Copyright (c) 2005 John Graham-Cumming" ! VIAddVersionKey "FileDescription" "PFI Diagnostic Utility" ! VIAddVersionKey "FileVersion" "${C_VERSION}" ! VIAddVersionKey "OriginalFilename" "${C_OUTFILE}" ! ! VIAddVersionKey "Build Date/Time" "${__DATE__} @ ${__TIME__}" ! !ifdef C_PFI_LIBRARY_VERSION ! VIAddVersionKey "Build Library Version" "${C_PFI_LIBRARY_VERSION}" ! !endif ! VIAddVersionKey "Build Script" "${__FILE__}$\r$\n(${__TIMESTAMP__})" #-------------------------------------------------------------------------- *************** *** 347,351 **** ; (for convenience the leading slash is stripped from the value used internally) ! Call GetParameters Pop ${L_DIAG_MODE} StrCpy ${L_TEMP} ${L_DIAG_MODE} 1 --- 367,371 ---- ; (for convenience the leading slash is stripped from the value used internally) ! Call PFI_GetParameters Pop ${L_DIAG_MODE} StrCpy ${L_TEMP} ${L_DIAG_MODE} 1 *************** *** 411,415 **** DetailPrint "IsNT return code = ${L_WIN_OS_TYPE}" ! Call GetIEVersion Pop ${L_TEMP} DetailPrint "Internet Explorer = ${L_TEMP}" --- 431,435 ---- DetailPrint "IsNT return code = ${L_WIN_OS_TYPE}" ! Call PFI_GetIEVersion Pop ${L_TEMP} DetailPrint "Internet Explorer = ${L_TEMP}" *************** *** 797,801 **** Push ${L_EXPECTED_ROOT} Push " " ! Call StrStr Pop ${L_TEMP} StrCmp ${L_TEMP} "" 0 check_user --- 817,821 ---- Push ${L_EXPECTED_ROOT} Push " " ! Call PFI_StrStr Pop ${L_TEMP} StrCmp ${L_TEMP} "" 0 check_user *************** *** 817,821 **** Push ${L_EXPECTED_USER} Push " " ! Call StrStr Pop ${L_TEMP} StrCmp ${L_TEMP} "" 0 check_vars --- 837,841 ---- Push ${L_EXPECTED_USER} Push " " ! Call PFI_StrStr Pop ${L_TEMP} StrCmp ${L_TEMP} "" 0 check_vars *************** *** 889,893 **** exit: ! Call GetDateTimeStamp Pop ${L_TEMP} DetailPrint "------------------------------------------------------------" --- 909,913 ---- exit: ! Call PFI_GetDateTimeStamp Pop ${L_TEMP} DetailPrint "------------------------------------------------------------" *************** *** 895,898 **** --- 915,924 ---- DetailPrint "------------------------------------------------------------" + StrCmp ${L_DIAG_MODE} "simple" 0 quiet_exit + + ; For 'simple' reports, scroll to the LFN and SFN versions of the installation locations + + Call ScrollToShowPaths + quiet_exit: SetDetailsPrint textonly *************** *** 985,989 **** Push ${L_TEMP} Push " " ! Call StrStr Pop ${L_TEMP} StrCmp ${L_TEMP} "" exit --- 1011,1015 ---- Push ${L_TEMP} Push " " ! Call PFI_StrStr Pop ${L_TEMP} StrCmp ${L_TEMP} "" exit *************** *** 1039,1042 **** --- 1065,1137 ---- FunctionEnd + + #-------------------------------------------------------------------------- + # Function used to manipulate the contents of the details view + #-------------------------------------------------------------------------- + + ;------------------------------------------------------------------------ + ; Constants used when accessing the details view + ;------------------------------------------------------------------------ + + !define C_LVM_GETITEMCOUNT 0x1004 + !define C_LVM_ENSUREVISIBLE 0x1013 + + #-------------------------------------------------------------------------- + # Installer Function: ScrollToShowPaths + # + # Scrolls the details view up to make it show the locations of the + # program files and the 'User Data' files in LFN and SFN formats. + # + # Inputs: + # none + # + # Outputs: + # none + # + # Usage: + # Call ScrollToShowPaths + # + #-------------------------------------------------------------------------- + + Function ScrollToShowPaths + + !define L_TEMP $R9 + !define L_TOPROW $R8 ; item index of the line we want to be at the top of the window + + Push ${L_TEMP} + Push ${L_TOPROW} + + ; Even the 'simple' report is too long to fit in the details view window so we + ; automatically scroll the view to make it display the LFN and SFN versions of + ; the POPFile program and 'User Data' folder locations (on the assumption that + ; this is the information most users will want to find first). + + StrCpy ${L_TOPROW} 9 ; index of the blank line immediately before "Current UserName" + + ; Check how many 'details' lines there are + + FindWindow ${L_TEMP} "#32770" "" $HWNDPARENT + GetDlgItem ${L_TEMP} ${L_TEMP} 0x3F8 ; This is the Control ID of the details view + SendMessage ${L_TEMP} ${C_LVM_GETITEMCOUNT} 0 0 ${L_TEMP} + + ; No point in trying to display a non-existent line + + IntCmp ${L_TEMP} ${L_TOPROW} exit exit + + ; Scroll up (in effect) to show Current UserName, Program folder & User Data folder entries + + FindWindow ${L_TEMP} "#32770" "" $HWNDPARENT + GetDlgItem ${L_TEMP} ${L_TEMP} 0x3F8 ; This is the Control ID of the details view + SendMessage ${L_TEMP} ${C_LVM_ENSUREVISIBLE} ${L_TOPROW} 0 + + exit: + Pop ${L_TOPROW} + Pop ${L_TEMP} + + !undef L_TEMP + !undef L_TOPROW + + FunctionEnd + #-------------------------------------------------------------------------- # End of 'pfidiag.nsi' |