From: Brian S. <xue...@us...> - 2005-09-23 16:16:07
|
Update of /cvsroot/popfile/windows/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21575 Modified Files: pfidiag.nsi Log Message: Updated to use the newer, smaller ShellLink plugin. Since the POPFile shortcut tests are very simple, downgrade the error msgs to warnings. Index: pfidiag.nsi =================================================================== RCS file: /cvsroot/popfile/windows/test/pfidiag.nsi,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** pfidiag.nsi 5 Aug 2005 19:08:53 -0000 1.14 --- pfidiag.nsi 23 Sep 2005 16:15:59 -0000 1.15 *************** *** 59,62 **** --- 59,64 ---- ; (${NSISDIR}\Plugins\). The 'ShellLink' source and example files can be unzipped to the ; ${NSISDIR}\Contrib\ShellLink\ folder if you wish, but this step is entirely optional. + ; + ; This script requires v1.1 (or later) of the ShellLink plugin *************** *** 103,107 **** ;-------------------------------------------------------------------------- ! !define C_VERSION "0.0.56" !define C_OUTFILE "pfidiag.exe" --- 105,109 ---- ;-------------------------------------------------------------------------- ! !define C_VERSION "0.0.57" !define C_OUTFILE "pfidiag.exe" *************** *** 476,482 **** ; do not support different account types, we treat this error as if user has 'Admin' rights. ! ClearErrors ! UserInfo::GetName ! IfErrors 0 got_name ; Assume Win9x system, so user has 'Admin' rights --- 478,484 ---- ; do not support different account types, we treat this error as if user has 'Admin' rights. ! ClearErrors ! UserInfo::GetName ! IfErrors 0 got_name ; Assume Win9x system, so user has 'Admin' rights *************** *** 487,491 **** got_name: ! Pop $G_WINUSERNAME StrCmp $G_WINUSERNAME "" 0 get_usertype StrCpy $G_WINUSERNAME "UnknownUser" --- 489,493 ---- got_name: ! Pop $G_WINUSERNAME StrCmp $G_WINUSERNAME "" 0 get_usertype StrCpy $G_WINUSERNAME "UnknownUser" *************** *** 493,497 **** get_usertype: UserInfo::GetAccountType ! Pop ${L_WINUSERTYPE} StrCmp ${L_WINUSERTYPE} "Admin" section_end StrCmp ${L_WINUSERTYPE} "Power" section_end --- 495,499 ---- get_usertype: UserInfo::GetAccountType ! Pop ${L_WINUSERTYPE} StrCmp ${L_WINUSERTYPE} "Admin" section_end StrCmp ${L_WINUSERTYPE} "Power" section_end *************** *** 597,601 **** DetailPrint "" DetailPrint "'POPFile' total = ${L_TEMP}" ! DetailPrint "^^^^^ Error ^^^^^ The $\"'POPFile' total$\" should not be more than one (1)" section_end: --- 599,603 ---- DetailPrint "" DetailPrint "'POPFile' total = ${L_TEMP}" ! DetailPrint "^^^^ Warning ^^^^ The $\"'POPFile' total$\" is greater than one" section_end: *************** *** 1393,1404 **** Function AnalyseShortcuts ! !define L_LNK_FOLDER $R9 ; folder where the shortcuts (if any) are stored ! !define L_LNK_HANDLE $R8 ; file handle used when searching for shortcut files ! !define L_LNK_NAME $R7 ; name of a shortcut file ! !define L_LNK_TOTAL $R6 ; counts the number of shortcuts we find ! !define L_POPFILE_TOTAL $R5 ; total number of shortcuts which appear to start POPFile ! !define L_SHORTCUT_ARGS $R4 ! !define L_SHORTCUT_TARGET $R3 ! !define L_TEMP $R2 Exch ${L_LNK_FOLDER} --- 1395,1407 ---- Function AnalyseShortcuts ! !define L_LNK_FOLDER $R9 ; folder where the shortcuts (if any) are stored ! !define L_LNK_HANDLE $R8 ; file handle used when searching for shortcut files ! !define L_LNK_NAME $R7 ; name of a shortcut file ! !define L_LNK_TOTAL $R6 ; counts the number of shortcuts we find ! !define L_POPFILE_TOTAL $R5 ; total number of shortcuts which appear to start POPFile ! !define L_SHORTCUT_ARGS $R4 ! !define L_SHORTCUT_START_IN $R3 ! !define L_SHORTCUT_TARGET $R2 ! !define L_TEMP $R1 Exch ${L_LNK_FOLDER} *************** *** 1408,1411 **** --- 1411,1415 ---- Push ${L_POPFILE_TOTAL} Push ${L_SHORTCUT_ARGS} + Push ${L_SHORTCUT_START_IN} Push ${L_SHORTCUT_TARGET} Push ${L_TEMP} *************** *** 1424,1431 **** IfFileExists "${L_LNK_FOLDER}\${L_LNK_NAME}\*.*" look_again IntOp ${L_LNK_TOTAL} ${L_LNK_TOTAL} + 1 ! ShellLink::GetShortCutTarget "${L_LNK_FOLDER}\${L_LNK_NAME}" ! Pop ${L_SHORTCUT_TARGET} ! ShellLink::GetShortCutArgs "${L_LNK_FOLDER}\${L_LNK_NAME}" ! Pop ${L_SHORTCUT_ARGS} Push ${L_SHORTCUT_TARGET} --- 1428,1435 ---- IfFileExists "${L_LNK_FOLDER}\${L_LNK_NAME}\*.*" look_again IntOp ${L_LNK_TOTAL} ${L_LNK_TOTAL} + 1 ! ShellLink::GetShortCutTarget "${L_LNK_FOLDER}\${L_LNK_NAME}" ! Pop ${L_SHORTCUT_TARGET} ! ShellLink::GetShortCutArgs "${L_LNK_FOLDER}\${L_LNK_NAME}" ! Pop ${L_SHORTCUT_ARGS} Push ${L_SHORTCUT_TARGET} *************** *** 1442,1447 **** --- 1446,1454 ---- show_details: IntOp ${L_POPFILE_TOTAL} ${L_POPFILE_TOTAL} + 1 + ShellLink::GetShortCutWorkingDirectory "${L_LNK_FOLDER}\${L_LNK_NAME}" + Pop ${L_SHORTCUT_START_IN} DetailPrint "" DetailPrint "Shortcut name = < ${L_LNK_NAME} >" + DetailPrint "Shortcut start in = < ${L_SHORTCUT_START_IN} >" DetailPrint "Shortcut target = < ${L_SHORTCUT_TARGET} >" StrCpy ${L_TEMP} "found" *************** *** 1472,1476 **** DetailPrint "POPFile shortcuts = ${L_POPFILE_TOTAL}" IntCmp ${L_POPFILE_TOTAL} 1 restore_regs restore_regs ! DetailPrint "^^^^^ Error ^^^^^ There should not be more than one (1) POPFile StartUp shortcut here" restore_regs: --- 1479,1483 ---- DetailPrint "POPFile shortcuts = ${L_POPFILE_TOTAL}" IntCmp ${L_POPFILE_TOTAL} 1 restore_regs restore_regs ! DetailPrint "^^^^ Warning ^^^^ More than one POPFile StartUp shortcut found in this folder" restore_regs: *************** *** 1479,1482 **** --- 1486,1490 ---- Pop ${L_TEMP} Pop ${L_SHORTCUT_TARGET} + Pop ${L_SHORTCUT_START_IN} Pop ${L_SHORTCUT_ARGS} Pop ${L_POPFILE_TOTAL} *************** *** 1492,1495 **** --- 1500,1504 ---- !undef L_POPFILE_TOTAL !undef L_SHORTCUT_ARGS + !undef L_SHORTCUT_START_IN !undef L_SHORTCUT_TARGET !undef L_TEMP |