Subversion Repositories DevTools

Rev

Blame | Last modification | View Log | RSS feed

!define nsis_path::PrependSystemPath `!insertmacro nsis_path::PrependSystemPath`

!macro nsis_path::PrependSystemPath _PATH
    push $0             ; save $0
    nsis_pathP::ChangePath /NOUNLOAD "ADDBEFORE" "SYSTEM" "${_PATH}"
    pop $0              ; get return code
    IntCmp $0 0 +2      ; If non 0 return the set error
        SetErrors
    pop $0              ; restore $0
!macroend

!define nsis_path::PrependUserPath `!insertmacro nsis_path::PrependUserPath`

!macro nsis_path::PrependUserPath _PATH
    push $0             ; save $0
    nsis_pathP::ChangePath /NOUNLOAD "ADDBEFORE" "USER" "${_PATH}"
    pop $0              ; get return code
    IntCmp $0 0 +2      ; If non 0 return the set error
        SetErrors
    pop $0              ; restore $0
!macroend


!define nsis_path::AppendSystemPath `!insertmacro nsis_path::AppendSystemPath`

!macro nsis_path::AppendSystemPath _PATH
    push $0             ; save $0
    nsis_pathP::ChangePath /NOUNLOAD "ADDAFTER" "SYSTEM" "${_PATH}"
    pop $0              ; get return code
    IntCmp $0 0 +2      ; If non 0 return the set error
        SetErrors
    pop $0              ; restore $0
!macroend

!define nsis_path::AppendUserPath `!insertmacro nsis_path::AppendUserPath`

!macro nsis_path::AppendUserPath _PATH
    push $0             ; save $0
    nsis_pathP::ChangePath /NOUNLOAD "ADDAFTER" "USER" "${_PATH}"
    pop $0              ; get return code
    IntCmp $0 0 +2      ; If non 0 return the set error
        SetErrors
    pop $0              ; restore $0
!macroend


!define nsis_path::DeleteSystemPath `!insertmacro nsis_path::DeleteSystemPath`

!macro nsis_path::DeleteSystemPath _PATH
    push $0             ; save $0
    nsis_pathP::ChangePath /NOUNLOAD "DELETE" "SYSTEM" "${_PATH}"
    pop $0              ; get return code
    IntCmp $0 0 +2      ; If non 0 return the set error
        SetErrors
    pop $0              ; restore $0
!macroend

!define nsis_path::DeleteUserPath `!insertmacro nsis_path::DeleteUserPath`

!macro nsis_path::DeleteUserPath _PATH
    push $0             ; save $0
    nsis_pathP::ChangePath /NOUNLOAD "DELETE" "USER" "${_PATH}"
    pop $0              ; get return code
    IntCmp $0 0 +2      ; If non 0 return the set error
        SetErrors
    pop $0              ; restore $0
!macroend