| 4914 |
gchristi |
1 |
!define nsis_path::PrependSystemPath `!insertmacro nsis_path::PrependSystemPath`
|
|
|
2 |
|
|
|
3 |
!macro nsis_path::PrependSystemPath _PATH
|
|
|
4 |
push $0 ; save $0
|
|
|
5 |
nsis_pathP::ChangePath /NOUNLOAD "ADDBEFORE" "SYSTEM" "${_PATH}"
|
|
|
6 |
pop $0 ; get return code
|
|
|
7 |
IntCmp $0 0 +2 ; If non 0 return the set error
|
|
|
8 |
SetErrors
|
|
|
9 |
pop $0 ; restore $0
|
|
|
10 |
!macroend
|
|
|
11 |
|
|
|
12 |
!define nsis_path::PrependUserPath `!insertmacro nsis_path::PrependUserPath`
|
|
|
13 |
|
|
|
14 |
!macro nsis_path::PrependUserPath _PATH
|
|
|
15 |
push $0 ; save $0
|
|
|
16 |
nsis_pathP::ChangePath /NOUNLOAD "ADDBEFORE" "USER" "${_PATH}"
|
|
|
17 |
pop $0 ; get return code
|
|
|
18 |
IntCmp $0 0 +2 ; If non 0 return the set error
|
|
|
19 |
SetErrors
|
|
|
20 |
pop $0 ; restore $0
|
|
|
21 |
!macroend
|
|
|
22 |
|
|
|
23 |
|
|
|
24 |
!define nsis_path::AppendSystemPath `!insertmacro nsis_path::AppendSystemPath`
|
|
|
25 |
|
|
|
26 |
!macro nsis_path::AppendSystemPath _PATH
|
|
|
27 |
push $0 ; save $0
|
|
|
28 |
nsis_pathP::ChangePath /NOUNLOAD "ADDAFTER" "SYSTEM" "${_PATH}"
|
|
|
29 |
pop $0 ; get return code
|
|
|
30 |
IntCmp $0 0 +2 ; If non 0 return the set error
|
|
|
31 |
SetErrors
|
|
|
32 |
pop $0 ; restore $0
|
|
|
33 |
!macroend
|
|
|
34 |
|
|
|
35 |
!define nsis_path::AppendUserPath `!insertmacro nsis_path::AppendUserPath`
|
|
|
36 |
|
|
|
37 |
!macro nsis_path::AppendUserPath _PATH
|
|
|
38 |
push $0 ; save $0
|
|
|
39 |
nsis_pathP::ChangePath /NOUNLOAD "ADDAFTER" "USER" "${_PATH}"
|
|
|
40 |
pop $0 ; get return code
|
|
|
41 |
IntCmp $0 0 +2 ; If non 0 return the set error
|
|
|
42 |
SetErrors
|
|
|
43 |
pop $0 ; restore $0
|
|
|
44 |
!macroend
|
|
|
45 |
|
|
|
46 |
|
|
|
47 |
!define nsis_path::DeleteSystemPath `!insertmacro nsis_path::DeleteSystemPath`
|
|
|
48 |
|
|
|
49 |
!macro nsis_path::DeleteSystemPath _PATH
|
|
|
50 |
push $0 ; save $0
|
|
|
51 |
nsis_pathP::ChangePath /NOUNLOAD "DELETE" "SYSTEM" "${_PATH}"
|
|
|
52 |
pop $0 ; get return code
|
|
|
53 |
IntCmp $0 0 +2 ; If non 0 return the set error
|
|
|
54 |
SetErrors
|
|
|
55 |
pop $0 ; restore $0
|
|
|
56 |
!macroend
|
|
|
57 |
|
|
|
58 |
!define nsis_path::DeleteUserPath `!insertmacro nsis_path::DeleteUserPath`
|
|
|
59 |
|
|
|
60 |
!macro nsis_path::DeleteUserPath _PATH
|
|
|
61 |
push $0 ; save $0
|
|
|
62 |
nsis_pathP::ChangePath /NOUNLOAD "DELETE" "USER" "${_PATH}"
|
|
|
63 |
pop $0 ; get return code
|
|
|
64 |
IntCmp $0 0 +2 ; If non 0 return the set error
|
|
|
65 |
SetErrors
|
|
|
66 |
pop $0 ; restore $0
|
|
|
67 |
!macroend
|