Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv22044
Modified Files:
installer.nsi pfi-library.nsh
Log Message:
Use a more elegant way to avoid relative jumps when defining macros.
Index: installer.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/installer.nsi,v
retrieving revision 1.109
retrieving revision 1.110
diff -C2 -d -r1.109 -r1.110
*** installer.nsi 20 Aug 2003 01:40:12 -0000 1.109
--- installer.nsi 8 Sep 2003 13:26:38 -0000 1.110
***************
*** 43,47 ****
;
; This version of the script has been tested with NSIS 2.0b4 (CVS) after updating it by using
! ; the 11 August 2003 (19:44 GMT) version of the NSIS CVS snapshot.
#--------------------------------------------------------------------------
--- 43,47 ----
;
; This version of the script has been tested with NSIS 2.0b4 (CVS) after updating it by using
! ; the 27 August 2003 (19:44 GMT) version of the NSIS CVS snapshot.
#--------------------------------------------------------------------------
***************
*** 2195,2207 ****
SetDetailsPrint listonly
! !insertmacro SafeRecursiveRMDir ${__LINE__} "$INSTDIR\auto"
! !insertmacro SafeRecursiveRMDir ${__LINE__} "$INSTDIR\Carp"
! !insertmacro SafeRecursiveRMDir ${__LINE__} "$INSTDIR\File"
! !insertmacro SafeRecursiveRMDir ${__LINE__} "$INSTDIR\IO"
! !insertmacro SafeRecursiveRMDir ${__LINE__} "$INSTDIR\MIME"
! !insertmacro SafeRecursiveRMDir ${__LINE__} "$INSTDIR\Sys"
! !insertmacro SafeRecursiveRMDir ${__LINE__} "$INSTDIR\Text"
! !insertmacro SafeRecursiveRMDir ${__LINE__} "$INSTDIR\warnings"
! !insertmacro SafeRecursiveRMDir ${__LINE__} "$INSTDIR\Win32"
StrCmp ${L_UPGRADE} "yes" Removed
--- 2195,2207 ----
SetDetailsPrint listonly
! !insertmacro SafeRecursiveRMDir "$INSTDIR\auto"
! !insertmacro SafeRecursiveRMDir "$INSTDIR\Carp"
! !insertmacro SafeRecursiveRMDir "$INSTDIR\File"
! !insertmacro SafeRecursiveRMDir "$INSTDIR\IO"
! !insertmacro SafeRecursiveRMDir "$INSTDIR\MIME"
! !insertmacro SafeRecursiveRMDir "$INSTDIR\Sys"
! !insertmacro SafeRecursiveRMDir "$INSTDIR\Text"
! !insertmacro SafeRecursiveRMDir "$INSTDIR\warnings"
! !insertmacro SafeRecursiveRMDir "$INSTDIR\Win32"
StrCmp ${L_UPGRADE} "yes" Removed
Index: pfi-library.nsh
===================================================================
RCS file: /cvsroot/popfile/windows/pfi-library.nsh,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** pfi-library.nsh 13 Aug 2003 16:35:55 -0000 1.11
--- pfi-library.nsh 8 Sep 2003 13:26:38 -0000 1.12
***************
*** 31,34 ****
--- 31,47 ----
#--------------------------------------------------------------------------
#
+ # Macro which makes it easy to avoid relative jumps when defining macros
+ #
+ #--------------------------------------------------------------------------
+
+ !macro PFI_UNIQUE_ID
+ !ifdef PFI_UNIQUE_ID
+ !undef PFI_UNIQUE_ID
+ !endif
+ !define PFI_UNIQUE_ID ${__LINE__}
+ !macroend
+
+ #--------------------------------------------------------------------------
+ #
# Macros used to simplify inclusion/selection of the necessary language files
#
***************
*** 89,96 ****
!macro UI_LANG_CONFIG PFI_SETTING UI_SETTING
! StrCmp $LANGUAGE ${LANG_${PFI_SETTING}} 0 +4
IfFileExists "$INSTDIR\languages\${UI_SETTING}.msg" 0 lang_done
StrCpy ${L_LANG} "${UI_SETTING}"
Goto lang_save
!macroend
--- 102,113 ----
!macro UI_LANG_CONFIG PFI_SETTING UI_SETTING
!
! !insertmacro PFI_UNIQUE_ID
!
! StrCmp $LANGUAGE ${LANG_${PFI_SETTING}} 0 skip_${PFI_UNIQUE_ID}
IfFileExists "$INSTDIR\languages\${UI_SETTING}.msg" 0 lang_done
StrCpy ${L_LANG} "${UI_SETTING}"
Goto lang_save
+ skip_${PFI_UNIQUE_ID}:
!macroend
***************
*** 101,130 ****
#
# Usage:
! # !insertmacro SafeRecursiveRMDir ${__LINE__} $(L_CORPUS}
#
- # ${__LINE__} holds the linenumber of the '!insertmacro' command
#--------------------------------------------------------------------------
! !macro SafeRecursiveRMDir UNIQUE_ID PATH
! StrCmp ${L_SUBCORPUS} "no" Label_A_${UNIQUE_ID}
Push ${L_CORPUS}
Push "${PATH}"
Call un.StrStr
Pop ${L_TEMP}
! StrCmp ${L_TEMP} "" 0 Label_C_${UNIQUE_ID}
! Label_A_${UNIQUE_ID}:
! StrCmp ${L_SUBHISTORY} "no" Label_B_${UNIQUE_ID}
Push ${L_HISTORY}
Push "${PATH}"
Call un.StrStr
Pop ${L_TEMP}
! StrCmp ${L_TEMP} "" 0 Label_C_${UNIQUE_ID}
! Label_B_${UNIQUE_ID}:
RMDir /r "${PATH}"
! Label_C_${UNIQUE_ID}:
!macroend
--- 118,148 ----
#
# Usage:
! # !insertmacro SafeRecursiveRMDir $(L_CORPUS}
#
#--------------------------------------------------------------------------
! !macro SafeRecursiveRMDir PATH
! !insertmacro PFI_UNIQUE_ID
!
! StrCmp ${L_SUBCORPUS} "no" Label_A_${PFI_UNIQUE_ID}
Push ${L_CORPUS}
Push "${PATH}"
Call un.StrStr
Pop ${L_TEMP}
! StrCmp ${L_TEMP} "" 0 Label_C_${PFI_UNIQUE_ID}
! Label_A_${PFI_UNIQUE_ID}:
! StrCmp ${L_SUBHISTORY} "no" Label_B_${PFI_UNIQUE_ID}
Push ${L_HISTORY}
Push "${PATH}"
Call un.StrStr
Pop ${L_TEMP}
! StrCmp ${L_TEMP} "" 0 Label_C_${PFI_UNIQUE_ID}
! Label_B_${PFI_UNIQUE_ID}:
RMDir /r "${PATH}"
! Label_C_${PFI_UNIQUE_ID}:
!macroend
|