Statistiques
| Révision :

root / tmp / org.txm.setups / nsis-2.5 / Include / FileFunc.nsh @ 2961

Historique | Voir | Annoter | Télécharger (39,57 ko)

1 2961 mdecorde
/*
2 2961 mdecorde
_____________________________________________________________________________
3 2961 mdecorde
4 2961 mdecorde
                       File Functions Header v3.4
5 2961 mdecorde
_____________________________________________________________________________
6 2961 mdecorde
7 2961 mdecorde
 2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
8 2961 mdecorde
9 2961 mdecorde
 See documentation for more information about the following functions.
10 2961 mdecorde
11 2961 mdecorde
 Usage in script:
12 2961 mdecorde
 1. !include "FileFunc.nsh"
13 2961 mdecorde
 2. [Section|Function]
14 2961 mdecorde
      ${FileFunction} "Param1" "Param2" "..." $var
15 2961 mdecorde
    [SectionEnd|FunctionEnd]
16 2961 mdecorde
17 2961 mdecorde
18 2961 mdecorde
 FileFunction=[Locate|GetSize|DriveSpace|GetDrives|GetTime|GetFileAttributes|
19 2961 mdecorde
               GetFileVersion|GetExeName|GetExePath|GetParameters|GetOptions|
20 2961 mdecorde
               GetOptionsS|GetRoot|GetParent|GetFileName|GetBaseName|GetFileExt|
21 2961 mdecorde
               BannerTrimPath|DirState|RefreshShellIcons]
22 2961 mdecorde
23 2961 mdecorde
_____________________________________________________________________________
24 2961 mdecorde
25 2961 mdecorde
                       Thanks to:
26 2961 mdecorde
_____________________________________________________________________________
27 2961 mdecorde
28 2961 mdecorde
GetSize
29 2961 mdecorde
	KiCHiK (Function "FindFiles")
30 2961 mdecorde
DriveSpace
31 2961 mdecorde
	sunjammer (Function "CheckSpaceFree")
32 2961 mdecorde
GetDrives
33 2961 mdecorde
	deguix (Based on his idea of Function "DetectDrives")
34 2961 mdecorde
GetTime
35 2961 mdecorde
	Takhir (Script "StatTest") and deguix (Function "FileModifiedDate")
36 2961 mdecorde
GetFileVersion
37 2961 mdecorde
	KiCHiK (Based on his example for command "GetDLLVersion")
38 2961 mdecorde
GetParameters
39 2961 mdecorde
	sunjammer (Based on his Function "GetParameters")
40 2961 mdecorde
GetRoot
41 2961 mdecorde
	KiCHiK (Based on his Function "GetRoot")
42 2961 mdecorde
GetParent
43 2961 mdecorde
	sunjammer (Based on his Function "GetParent")
44 2961 mdecorde
GetFileName
45 2961 mdecorde
	KiCHiK (Based on his Function "GetFileName")
46 2961 mdecorde
GetBaseName
47 2961 mdecorde
	comperio (Based on his idea of Function "GetBaseName")
48 2961 mdecorde
GetFileExt
49 2961 mdecorde
	opher (author)
50 2961 mdecorde
RefreshShellIcons
51 2961 mdecorde
	jerome tremblay (author)
52 2961 mdecorde
*/
53 2961 mdecorde
54 2961 mdecorde
55 2961 mdecorde
;_____________________________________________________________________________
56 2961 mdecorde
;
57 2961 mdecorde
;                         Macros
58 2961 mdecorde
;_____________________________________________________________________________
59 2961 mdecorde
;
60 2961 mdecorde
; Change log window verbosity (default: 3=no script)
61 2961 mdecorde
;
62 2961 mdecorde
; Example:
63 2961 mdecorde
; !include "FileFunc.nsh"
64 2961 mdecorde
; !insertmacro Locate
65 2961 mdecorde
; ${FILEFUNC_VERBOSE} 4   # all verbosity
66 2961 mdecorde
; !insertmacro VersionCompare
67 2961 mdecorde
; ${FILEFUNC_VERBOSE} 3   # no script
68 2961 mdecorde
69 2961 mdecorde
!ifndef FILEFUNC_INCLUDED
70 2961 mdecorde
!define FILEFUNC_INCLUDED
71 2961 mdecorde
72 2961 mdecorde
!include Util.nsh
73 2961 mdecorde
74 2961 mdecorde
!verbose push
75 2961 mdecorde
!verbose 3
76 2961 mdecorde
!ifndef _FILEFUNC_VERBOSE
77 2961 mdecorde
	!define _FILEFUNC_VERBOSE 3
78 2961 mdecorde
!endif
79 2961 mdecorde
!verbose ${_FILEFUNC_VERBOSE}
80 2961 mdecorde
!define FILEFUNC_VERBOSE `!insertmacro FILEFUNC_VERBOSE`
81 2961 mdecorde
!verbose pop
82 2961 mdecorde
83 2961 mdecorde
!macro FILEFUNC_VERBOSE _VERBOSE
84 2961 mdecorde
	!verbose push
85 2961 mdecorde
	!verbose 3
86 2961 mdecorde
	!undef _FILEFUNC_VERBOSE
87 2961 mdecorde
	!define _FILEFUNC_VERBOSE ${_VERBOSE}
88 2961 mdecorde
	!verbose pop
89 2961 mdecorde
!macroend
90 2961 mdecorde
91 2961 mdecorde
!macro LocateCall _PATH _OPTIONS _FUNC
92 2961 mdecorde
	!verbose push
93 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
94 2961 mdecorde
	Push $0
95 2961 mdecorde
	Push `${_PATH}`
96 2961 mdecorde
	Push `${_OPTIONS}`
97 2961 mdecorde
	GetFunctionAddress $0 `${_FUNC}`
98 2961 mdecorde
	Push `$0`
99 2961 mdecorde
	${CallArtificialFunction} Locate_
100 2961 mdecorde
	Pop $0
101 2961 mdecorde
	!verbose pop
102 2961 mdecorde
!macroend
103 2961 mdecorde
104 2961 mdecorde
!macro GetSizeCall _PATH _OPTIONS _RESULT1 _RESULT2 _RESULT3
105 2961 mdecorde
	!verbose push
106 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
107 2961 mdecorde
	Push `${_PATH}`
108 2961 mdecorde
	Push `${_OPTIONS}`
109 2961 mdecorde
	${CallArtificialFunction} GetSize_
110 2961 mdecorde
	Pop ${_RESULT1}
111 2961 mdecorde
	Pop ${_RESULT2}
112 2961 mdecorde
	Pop ${_RESULT3}
113 2961 mdecorde
	!verbose pop
114 2961 mdecorde
!macroend
115 2961 mdecorde
116 2961 mdecorde
!macro DriveSpaceCall _DRIVE _OPTIONS _RESULT
117 2961 mdecorde
	!verbose push
118 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
119 2961 mdecorde
	Push `${_DRIVE}`
120 2961 mdecorde
	Push `${_OPTIONS}`
121 2961 mdecorde
	${CallArtificialFunction} DriveSpace_
122 2961 mdecorde
	Pop ${_RESULT}
123 2961 mdecorde
	!verbose pop
124 2961 mdecorde
!macroend
125 2961 mdecorde
126 2961 mdecorde
!macro GetDrivesCall _DRV _FUNC
127 2961 mdecorde
	!verbose push
128 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
129 2961 mdecorde
	Push $0
130 2961 mdecorde
	Push `${_DRV}`
131 2961 mdecorde
	GetFunctionAddress $0 `${_FUNC}`
132 2961 mdecorde
	Push `$0`
133 2961 mdecorde
	${CallArtificialFunction} GetDrives_
134 2961 mdecorde
	Pop $0
135 2961 mdecorde
	!verbose pop
136 2961 mdecorde
!macroend
137 2961 mdecorde
138 2961 mdecorde
!macro GetTimeCall _FILE _OPTION _RESULT1 _RESULT2 _RESULT3 _RESULT4 _RESULT5 _RESULT6 _RESULT7
139 2961 mdecorde
	!verbose push
140 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
141 2961 mdecorde
	Push `${_FILE}`
142 2961 mdecorde
	Push `${_OPTION}`
143 2961 mdecorde
	${CallArtificialFunction} GetTime_
144 2961 mdecorde
	Pop ${_RESULT1}
145 2961 mdecorde
	Pop ${_RESULT2}
146 2961 mdecorde
	Pop ${_RESULT3}
147 2961 mdecorde
	Pop ${_RESULT4}
148 2961 mdecorde
	Pop ${_RESULT5}
149 2961 mdecorde
	Pop ${_RESULT6}
150 2961 mdecorde
	Pop ${_RESULT7}
151 2961 mdecorde
	!verbose pop
152 2961 mdecorde
!macroend
153 2961 mdecorde
154 2961 mdecorde
!macro GetFileAttributesCall _PATH _ATTR _RESULT
155 2961 mdecorde
	!verbose push
156 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
157 2961 mdecorde
	Push `${_PATH}`
158 2961 mdecorde
	Push `${_ATTR}`
159 2961 mdecorde
	${CallArtificialFunction} GetFileAttributes_
160 2961 mdecorde
	Pop ${_RESULT}
161 2961 mdecorde
	!verbose pop
162 2961 mdecorde
!macroend
163 2961 mdecorde
164 2961 mdecorde
!macro GetFileVersionCall _FILE _RESULT
165 2961 mdecorde
	!verbose push
166 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
167 2961 mdecorde
	Push `${_FILE}`
168 2961 mdecorde
	${CallArtificialFunction} GetFileVersion_
169 2961 mdecorde
	Pop ${_RESULT}
170 2961 mdecorde
	!verbose pop
171 2961 mdecorde
!macroend
172 2961 mdecorde
173 2961 mdecorde
!macro GetExeNameCall _RESULT
174 2961 mdecorde
	!verbose push
175 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
176 2961 mdecorde
	${CallArtificialFunction} GetExeName_
177 2961 mdecorde
	Pop ${_RESULT}
178 2961 mdecorde
	!verbose pop
179 2961 mdecorde
!macroend
180 2961 mdecorde
181 2961 mdecorde
!macro GetExePathCall _RESULT
182 2961 mdecorde
	!verbose push
183 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
184 2961 mdecorde
	${CallArtificialFunction} GetExePath_
185 2961 mdecorde
	Pop ${_RESULT}
186 2961 mdecorde
	!verbose pop
187 2961 mdecorde
!macroend
188 2961 mdecorde
189 2961 mdecorde
!macro GetParametersCall _RESULT
190 2961 mdecorde
	!verbose push
191 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
192 2961 mdecorde
	${CallArtificialFunction} GetParameters_
193 2961 mdecorde
	Pop ${_RESULT}
194 2961 mdecorde
	!verbose pop
195 2961 mdecorde
!macroend
196 2961 mdecorde
197 2961 mdecorde
!macro GetOptionsCall _PARAMETERS _OPTION _RESULT
198 2961 mdecorde
	!verbose push
199 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
200 2961 mdecorde
	Push `${_PARAMETERS}`
201 2961 mdecorde
	Push `${_OPTION}`
202 2961 mdecorde
	${CallArtificialFunction} GetOptions_
203 2961 mdecorde
	Pop ${_RESULT}
204 2961 mdecorde
	!verbose pop
205 2961 mdecorde
!macroend
206 2961 mdecorde
207 2961 mdecorde
!macro GetOptionsSCall _PARAMETERS _OPTION _RESULT
208 2961 mdecorde
	!verbose push
209 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
210 2961 mdecorde
	Push `${_PARAMETERS}`
211 2961 mdecorde
	Push `${_OPTION}`
212 2961 mdecorde
	${CallArtificialFunction} GetOptionsS_
213 2961 mdecorde
	Pop ${_RESULT}
214 2961 mdecorde
	!verbose pop
215 2961 mdecorde
!macroend
216 2961 mdecorde
217 2961 mdecorde
!macro GetRootCall _FULLPATH _RESULT
218 2961 mdecorde
	!verbose push
219 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
220 2961 mdecorde
	Push `${_FULLPATH}`
221 2961 mdecorde
	${CallArtificialFunction} GetRoot_
222 2961 mdecorde
	Pop ${_RESULT}
223 2961 mdecorde
	!verbose pop
224 2961 mdecorde
!macroend
225 2961 mdecorde
226 2961 mdecorde
!macro GetParentCall _PATHSTRING _RESULT
227 2961 mdecorde
	!verbose push
228 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
229 2961 mdecorde
	Push `${_PATHSTRING}`
230 2961 mdecorde
	${CallArtificialFunction} GetParent_
231 2961 mdecorde
	Pop ${_RESULT}
232 2961 mdecorde
	!verbose pop
233 2961 mdecorde
!macroend
234 2961 mdecorde
235 2961 mdecorde
!macro GetFileNameCall _PATHSTRING _RESULT
236 2961 mdecorde
	!verbose push
237 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
238 2961 mdecorde
	Push `${_PATHSTRING}`
239 2961 mdecorde
	${CallArtificialFunction} GetFileName_
240 2961 mdecorde
	Pop ${_RESULT}
241 2961 mdecorde
	!verbose pop
242 2961 mdecorde
!macroend
243 2961 mdecorde
244 2961 mdecorde
!macro GetBaseNameCall _FILESTRING _RESULT
245 2961 mdecorde
	!verbose push
246 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
247 2961 mdecorde
	Push `${_FILESTRING}`
248 2961 mdecorde
	${CallArtificialFunction} GetBaseName_
249 2961 mdecorde
	Pop ${_RESULT}
250 2961 mdecorde
	!verbose pop
251 2961 mdecorde
!macroend
252 2961 mdecorde
253 2961 mdecorde
!macro GetFileExtCall _FILESTRING _RESULT
254 2961 mdecorde
	!verbose push
255 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
256 2961 mdecorde
	Push `${_FILESTRING}`
257 2961 mdecorde
	${CallArtificialFunction} GetFileExt_
258 2961 mdecorde
	Pop ${_RESULT}
259 2961 mdecorde
	!verbose pop
260 2961 mdecorde
!macroend
261 2961 mdecorde
262 2961 mdecorde
!macro BannerTrimPathCall _PATH _LENGHT _RESULT
263 2961 mdecorde
	!verbose push
264 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
265 2961 mdecorde
	Push `${_PATH}`
266 2961 mdecorde
	Push `${_LENGHT}`
267 2961 mdecorde
	${CallArtificialFunction} BannerTrimPath_
268 2961 mdecorde
	Pop ${_RESULT}
269 2961 mdecorde
	!verbose pop
270 2961 mdecorde
!macroend
271 2961 mdecorde
272 2961 mdecorde
!macro DirStateCall _PATH _RESULT
273 2961 mdecorde
	!verbose push
274 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
275 2961 mdecorde
	Push `${_PATH}`
276 2961 mdecorde
	${CallArtificialFunction} DirState_
277 2961 mdecorde
	Pop ${_RESULT}
278 2961 mdecorde
	!verbose pop
279 2961 mdecorde
!macroend
280 2961 mdecorde
281 2961 mdecorde
!macro RefreshShellIconsCall
282 2961 mdecorde
	!verbose push
283 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
284 2961 mdecorde
	${CallArtificialFunction} RefreshShellIcons_
285 2961 mdecorde
	!verbose pop
286 2961 mdecorde
!macroend
287 2961 mdecorde
288 2961 mdecorde
!define Locate `!insertmacro LocateCall`
289 2961 mdecorde
!define un.Locate `!insertmacro LocateCall`
290 2961 mdecorde
291 2961 mdecorde
!macro Locate
292 2961 mdecorde
!macroend
293 2961 mdecorde
294 2961 mdecorde
!macro un.Locate
295 2961 mdecorde
!macroend
296 2961 mdecorde
297 2961 mdecorde
!macro Locate_
298 2961 mdecorde
	!verbose push
299 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
300 2961 mdecorde
301 2961 mdecorde
	Exch $2
302 2961 mdecorde
	Exch
303 2961 mdecorde
	Exch $1
304 2961 mdecorde
	Exch
305 2961 mdecorde
	Exch 2
306 2961 mdecorde
	Exch $0
307 2961 mdecorde
	Exch 2
308 2961 mdecorde
	Push $3
309 2961 mdecorde
	Push $4
310 2961 mdecorde
	Push $5
311 2961 mdecorde
	Push $6
312 2961 mdecorde
	Push $7
313 2961 mdecorde
	Push $8
314 2961 mdecorde
	Push $9
315 2961 mdecorde
	Push $R6
316 2961 mdecorde
	Push $R7
317 2961 mdecorde
	Push $R8
318 2961 mdecorde
	Push $R9
319 2961 mdecorde
	ClearErrors
320 2961 mdecorde
321 2961 mdecorde
	StrCpy $3 ''
322 2961 mdecorde
	StrCpy $4 ''
323 2961 mdecorde
	StrCpy $5 ''
324 2961 mdecorde
	StrCpy $6 ''
325 2961 mdecorde
	StrCpy $7 ''
326 2961 mdecorde
	StrCpy $8 0
327 2961 mdecorde
	StrCpy $R7 ''
328 2961 mdecorde
329 2961 mdecorde
	StrCpy $R9 $0 1 -1
330 2961 mdecorde
	StrCmp $R9 '\' 0 +3
331 2961 mdecorde
	StrCpy $0 $0 -1
332 2961 mdecorde
	goto -3
333 2961 mdecorde
	IfFileExists '$0\*.*' 0 FileFunc_Locate_error
334 2961 mdecorde
335 2961 mdecorde
	FileFunc_Locate_option:
336 2961 mdecorde
	StrCpy $R9 $1 1
337 2961 mdecorde
	StrCpy $1 $1 '' 1
338 2961 mdecorde
	StrCmp $R9 ' ' -2
339 2961 mdecorde
	StrCmp $R9 '' FileFunc_Locate_sizeset
340 2961 mdecorde
	StrCmp $R9 '/' 0 -4
341 2961 mdecorde
	StrCpy $9 -1
342 2961 mdecorde
	IntOp $9 $9 + 1
343 2961 mdecorde
	StrCpy $R9 $1 1 $9
344 2961 mdecorde
	StrCmp $R9 '' +2
345 2961 mdecorde
	StrCmp $R9 '/' 0 -3
346 2961 mdecorde
	StrCpy $R8 $1 $9
347 2961 mdecorde
	StrCpy $R8 $R8 '' 2
348 2961 mdecorde
	StrCpy $R9 $R8 '' -1
349 2961 mdecorde
	StrCmp $R9 ' ' 0 +3
350 2961 mdecorde
	StrCpy $R8 $R8 -1
351 2961 mdecorde
	goto -3
352 2961 mdecorde
	StrCpy $R9 $1 2
353 2961 mdecorde
	StrCpy $1 $1 '' $9
354 2961 mdecorde
355 2961 mdecorde
	StrCmp $R9 'L=' 0 FileFunc_Locate_mask
356 2961 mdecorde
	StrCpy $3 $R8
357 2961 mdecorde
	StrCmp $3 '' +6
358 2961 mdecorde
	StrCmp $3 'FD' +5
359 2961 mdecorde
	StrCmp $3 'F' +4
360 2961 mdecorde
	StrCmp $3 'D' +3
361 2961 mdecorde
	StrCmp $3 'DE' +2
362 2961 mdecorde
	StrCmp $3 'FDE' 0 FileFunc_Locate_error
363 2961 mdecorde
	goto FileFunc_Locate_option
364 2961 mdecorde
365 2961 mdecorde
	FileFunc_Locate_mask:
366 2961 mdecorde
	StrCmp $R9 'M=' 0 FileFunc_Locate_size
367 2961 mdecorde
	StrCpy $4 $R8
368 2961 mdecorde
	goto FileFunc_Locate_option
369 2961 mdecorde
370 2961 mdecorde
	FileFunc_Locate_size:
371 2961 mdecorde
	StrCmp $R9 'S=' 0 FileFunc_Locate_gotosubdir
372 2961 mdecorde
	StrCpy $6 $R8
373 2961 mdecorde
	goto FileFunc_Locate_option
374 2961 mdecorde
375 2961 mdecorde
	FileFunc_Locate_gotosubdir:
376 2961 mdecorde
	StrCmp $R9 'G=' 0 FileFunc_Locate_banner
377 2961 mdecorde
	StrCpy $7 $R8
378 2961 mdecorde
	StrCmp $7 '' +3
379 2961 mdecorde
	StrCmp $7 '1' +2
380 2961 mdecorde
	StrCmp $7 '0' 0 FileFunc_Locate_error
381 2961 mdecorde
	goto FileFunc_Locate_option
382 2961 mdecorde
383 2961 mdecorde
	FileFunc_Locate_banner:
384 2961 mdecorde
	StrCmp $R9 'B=' 0 FileFunc_Locate_error
385 2961 mdecorde
	StrCpy $R7 $R8
386 2961 mdecorde
	StrCmp $R7 '' +3
387 2961 mdecorde
	StrCmp $R7 '1' +2
388 2961 mdecorde
	StrCmp $R7 '0' 0 FileFunc_Locate_error
389 2961 mdecorde
	goto FileFunc_Locate_option
390 2961 mdecorde
391 2961 mdecorde
	FileFunc_Locate_sizeset:
392 2961 mdecorde
	StrCmp $6 '' FileFunc_Locate_default
393 2961 mdecorde
	StrCpy $9 0
394 2961 mdecorde
	StrCpy $R9 $6 1 $9
395 2961 mdecorde
	StrCmp $R9 '' +4
396 2961 mdecorde
	StrCmp $R9 ':' +3
397 2961 mdecorde
	IntOp $9 $9 + 1
398 2961 mdecorde
	goto -4
399 2961 mdecorde
	StrCpy $5 $6 $9
400 2961 mdecorde
	IntOp $9 $9 + 1
401 2961 mdecorde
	StrCpy $1 $6 1 -1
402 2961 mdecorde
	StrCpy $6 $6 -1 $9
403 2961 mdecorde
	StrCmp $5 '' +2
404 2961 mdecorde
	IntOp $5 $5 + 0
405 2961 mdecorde
	StrCmp $6 '' +2
406 2961 mdecorde
	IntOp $6 $6 + 0
407 2961 mdecorde
408 2961 mdecorde
	StrCmp $1 'B' 0 +3
409 2961 mdecorde
	StrCpy $1 1
410 2961 mdecorde
	goto FileFunc_Locate_default
411 2961 mdecorde
	StrCmp $1 'K' 0 +3
412 2961 mdecorde
	StrCpy $1 1024
413 2961 mdecorde
	goto FileFunc_Locate_default
414 2961 mdecorde
	StrCmp $1 'M' 0 +3
415 2961 mdecorde
	StrCpy $1 1048576
416 2961 mdecorde
	goto FileFunc_Locate_default
417 2961 mdecorde
	StrCmp $1 'G' 0 FileFunc_Locate_error
418 2961 mdecorde
	StrCpy $1 1073741824
419 2961 mdecorde
420 2961 mdecorde
	FileFunc_Locate_default:
421 2961 mdecorde
	StrCmp $3 '' 0 +2
422 2961 mdecorde
	StrCpy $3 'FD'
423 2961 mdecorde
	StrCmp $4 '' 0 +2
424 2961 mdecorde
	StrCpy $4 '*.*'
425 2961 mdecorde
	StrCmp $7 '' 0 +2
426 2961 mdecorde
	StrCpy $7 '1'
427 2961 mdecorde
	StrCmp $R7 '' 0 +2
428 2961 mdecorde
	StrCpy $R7 '0'
429 2961 mdecorde
	StrCpy $7 'G$7B$R7'
430 2961 mdecorde
431 2961 mdecorde
	StrCpy $8 1
432 2961 mdecorde
	Push $0
433 2961 mdecorde
	SetDetailsPrint textonly
434 2961 mdecorde
435 2961 mdecorde
	FileFunc_Locate_nextdir:
436 2961 mdecorde
	IntOp $8 $8 - 1
437 2961 mdecorde
	Pop $R8
438 2961 mdecorde
439 2961 mdecorde
	StrCpy $9 $7 2 2
440 2961 mdecorde
	StrCmp $9 'B0' +3
441 2961 mdecorde
	GetLabelAddress $9 FileFunc_Locate_findfirst
442 2961 mdecorde
	goto call
443 2961 mdecorde
	DetailPrint 'Search in: $R8'
444 2961 mdecorde
445 2961 mdecorde
	FileFunc_Locate_findfirst:
446 2961 mdecorde
	FindFirst $0 $R7 '$R8\$4'
447 2961 mdecorde
	IfErrors FileFunc_Locate_subdir
448 2961 mdecorde
	StrCmp $R7 '.' 0 FileFunc_Locate_dir
449 2961 mdecorde
	FindNext $0 $R7
450 2961 mdecorde
	StrCmp $R7 '..' 0 FileFunc_Locate_dir
451 2961 mdecorde
	FindNext $0 $R7
452 2961 mdecorde
	IfErrors 0 FileFunc_Locate_dir
453 2961 mdecorde
	FindClose $0
454 2961 mdecorde
	goto FileFunc_Locate_subdir
455 2961 mdecorde
456 2961 mdecorde
	FileFunc_Locate_dir:
457 2961 mdecorde
	IfFileExists '$R8\$R7\*.*' 0 FileFunc_Locate_file
458 2961 mdecorde
	StrCpy $R6 ''
459 2961 mdecorde
	StrCmp $3 'DE' +4
460 2961 mdecorde
	StrCmp $3 'FDE' +3
461 2961 mdecorde
	StrCmp $3 'FD' FileFunc_Locate_precall
462 2961 mdecorde
	StrCmp $3 'F' FileFunc_Locate_findnext FileFunc_Locate_precall
463 2961 mdecorde
	FindFirst $9 $R9 '$R8\$R7\*.*'
464 2961 mdecorde
	StrCmp $R9 '.' 0 +4
465 2961 mdecorde
	FindNext $9 $R9
466 2961 mdecorde
	StrCmp $R9 '..' 0 +2
467 2961 mdecorde
	FindNext $9 $R9
468 2961 mdecorde
	FindClose $9
469 2961 mdecorde
	IfErrors FileFunc_Locate_precall FileFunc_Locate_findnext
470 2961 mdecorde
471 2961 mdecorde
	FileFunc_Locate_file:
472 2961 mdecorde
	StrCmp $3 'FDE' +3
473 2961 mdecorde
	StrCmp $3 'FD' +2
474 2961 mdecorde
	StrCmp $3 'F' 0 FileFunc_Locate_findnext
475 2961 mdecorde
	StrCpy $R6 0
476 2961 mdecorde
	StrCmp $5$6 '' FileFunc_Locate_precall
477 2961 mdecorde
	FileOpen $9 '$R8\$R7' r
478 2961 mdecorde
	IfErrors +3
479 2961 mdecorde
	FileSeek $9 0 END $R6
480 2961 mdecorde
	FileClose $9
481 2961 mdecorde
	System::Int64Op $R6 / $1
482 2961 mdecorde
	Pop $R6
483 2961 mdecorde
	StrCmp $5 '' +2
484 2961 mdecorde
	IntCmp $R6 $5 0 FileFunc_Locate_findnext
485 2961 mdecorde
	StrCmp $6 '' +2
486 2961 mdecorde
	IntCmp $R6 $6 0 0 FileFunc_Locate_findnext
487 2961 mdecorde
488 2961 mdecorde
	FileFunc_Locate_precall:
489 2961 mdecorde
	StrCpy $9 0
490 2961 mdecorde
	StrCpy $R9 '$R8\$R7'
491 2961 mdecorde
492 2961 mdecorde
	call:
493 2961 mdecorde
	Push $0
494 2961 mdecorde
	Push $1
495 2961 mdecorde
	Push $2
496 2961 mdecorde
	Push $3
497 2961 mdecorde
	Push $4
498 2961 mdecorde
	Push $5
499 2961 mdecorde
	Push $6
500 2961 mdecorde
	Push $7
501 2961 mdecorde
	Push $8
502 2961 mdecorde
	Push $9
503 2961 mdecorde
	Push $R7
504 2961 mdecorde
	Push $R8
505 2961 mdecorde
	StrCmp $9 0 +4
506 2961 mdecorde
	StrCpy $R6 ''
507 2961 mdecorde
	StrCpy $R7 ''
508 2961 mdecorde
	StrCpy $R9 ''
509 2961 mdecorde
	Call $2
510 2961 mdecorde
	Pop $R9
511 2961 mdecorde
	Pop $R8
512 2961 mdecorde
	Pop $R7
513 2961 mdecorde
	Pop $9
514 2961 mdecorde
	Pop $8
515 2961 mdecorde
	Pop $7
516 2961 mdecorde
	Pop $6
517 2961 mdecorde
	Pop $5
518 2961 mdecorde
	Pop $4
519 2961 mdecorde
	Pop $3
520 2961 mdecorde
	Pop $2
521 2961 mdecorde
	Pop $1
522 2961 mdecorde
	Pop $0
523 2961 mdecorde
524 2961 mdecorde
	IfErrors 0 +3
525 2961 mdecorde
	FindClose $0
526 2961 mdecorde
	goto FileFunc_Locate_error
527 2961 mdecorde
	StrCmp $R9 'StopLocate' 0 +3
528 2961 mdecorde
	FindClose $0
529 2961 mdecorde
	goto FileFunc_Locate_clearstack
530 2961 mdecorde
	goto $9
531 2961 mdecorde
532 2961 mdecorde
	FileFunc_Locate_findnext:
533 2961 mdecorde
	FindNext $0 $R7
534 2961 mdecorde
	IfErrors 0 FileFunc_Locate_dir
535 2961 mdecorde
	FindClose $0
536 2961 mdecorde
537 2961 mdecorde
	FileFunc_Locate_subdir:
538 2961 mdecorde
	StrCpy $9 $7 2
539 2961 mdecorde
	StrCmp $9 'G0' FileFunc_Locate_end
540 2961 mdecorde
	FindFirst $0 $R7 '$R8\*.*'
541 2961 mdecorde
	StrCmp $R7 '.' 0 FileFunc_Locate_pushdir
542 2961 mdecorde
	FindNext $0 $R7
543 2961 mdecorde
	StrCmp $R7 '..' 0 FileFunc_Locate_pushdir
544 2961 mdecorde
	FindNext $0 $R7
545 2961 mdecorde
	IfErrors 0 FileFunc_Locate_pushdir
546 2961 mdecorde
	FindClose $0
547 2961 mdecorde
	StrCmp $8 0 FileFunc_Locate_end FileFunc_Locate_nextdir
548 2961 mdecorde
549 2961 mdecorde
	FileFunc_Locate_pushdir:
550 2961 mdecorde
	IfFileExists '$R8\$R7\*.*' 0 +3
551 2961 mdecorde
	Push '$R8\$R7'
552 2961 mdecorde
	IntOp $8 $8 + 1
553 2961 mdecorde
	FindNext $0 $R7
554 2961 mdecorde
	IfErrors 0 FileFunc_Locate_pushdir
555 2961 mdecorde
	FindClose $0
556 2961 mdecorde
	StrCmp $8 0 FileFunc_Locate_end FileFunc_Locate_nextdir
557 2961 mdecorde
558 2961 mdecorde
	FileFunc_Locate_error:
559 2961 mdecorde
	SetErrors
560 2961 mdecorde
561 2961 mdecorde
	FileFunc_Locate_clearstack:
562 2961 mdecorde
	StrCmp $8 0 FileFunc_Locate_end
563 2961 mdecorde
	IntOp $8 $8 - 1
564 2961 mdecorde
	Pop $R8
565 2961 mdecorde
	goto FileFunc_Locate_clearstack
566 2961 mdecorde
567 2961 mdecorde
	FileFunc_Locate_end:
568 2961 mdecorde
	SetDetailsPrint both
569 2961 mdecorde
	Pop $R9
570 2961 mdecorde
	Pop $R8
571 2961 mdecorde
	Pop $R7
572 2961 mdecorde
	Pop $R6
573 2961 mdecorde
	Pop $9
574 2961 mdecorde
	Pop $8
575 2961 mdecorde
	Pop $7
576 2961 mdecorde
	Pop $6
577 2961 mdecorde
	Pop $5
578 2961 mdecorde
	Pop $4
579 2961 mdecorde
	Pop $3
580 2961 mdecorde
	Pop $2
581 2961 mdecorde
	Pop $1
582 2961 mdecorde
	Pop $0
583 2961 mdecorde
584 2961 mdecorde
	!verbose pop
585 2961 mdecorde
!macroend
586 2961 mdecorde
587 2961 mdecorde
!define GetSize `!insertmacro GetSizeCall`
588 2961 mdecorde
!define un.GetSize `!insertmacro GetSizeCall`
589 2961 mdecorde
590 2961 mdecorde
!macro GetSize
591 2961 mdecorde
!macroend
592 2961 mdecorde
593 2961 mdecorde
!macro un.GetSize
594 2961 mdecorde
!macroend
595 2961 mdecorde
596 2961 mdecorde
!macro GetSize_
597 2961 mdecorde
	!verbose push
598 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
599 2961 mdecorde
600 2961 mdecorde
	Exch $1
601 2961 mdecorde
	Exch
602 2961 mdecorde
	Exch $0
603 2961 mdecorde
	Exch
604 2961 mdecorde
	Push $2
605 2961 mdecorde
	Push $3
606 2961 mdecorde
	Push $4
607 2961 mdecorde
	Push $5
608 2961 mdecorde
	Push $6
609 2961 mdecorde
	Push $7
610 2961 mdecorde
	Push $8
611 2961 mdecorde
	Push $9
612 2961 mdecorde
	Push $R3
613 2961 mdecorde
	Push $R4
614 2961 mdecorde
	Push $R5
615 2961 mdecorde
	Push $R6
616 2961 mdecorde
	Push $R7
617 2961 mdecorde
	Push $R8
618 2961 mdecorde
	Push $R9
619 2961 mdecorde
	ClearErrors
620 2961 mdecorde
621 2961 mdecorde
	StrCpy $R9 $0 1 -1
622 2961 mdecorde
	StrCmp $R9 '\' 0 +3
623 2961 mdecorde
	StrCpy $0 $0 -1
624 2961 mdecorde
	goto -3
625 2961 mdecorde
	IfFileExists '$0\*.*' 0 FileFunc_GetSize_error
626 2961 mdecorde
627 2961 mdecorde
	StrCpy $3 ''
628 2961 mdecorde
	StrCpy $4 ''
629 2961 mdecorde
	StrCpy $5 ''
630 2961 mdecorde
	StrCpy $6 ''
631 2961 mdecorde
	StrCpy $8 0
632 2961 mdecorde
	StrCpy $R3 ''
633 2961 mdecorde
	StrCpy $R4 ''
634 2961 mdecorde
	StrCpy $R5 ''
635 2961 mdecorde
636 2961 mdecorde
	FileFunc_GetSize_option:
637 2961 mdecorde
	StrCpy $R9 $1 1
638 2961 mdecorde
	StrCpy $1 $1 '' 1
639 2961 mdecorde
	StrCmp $R9 ' ' -2
640 2961 mdecorde
	StrCmp $R9 '' FileFunc_GetSize_sizeset
641 2961 mdecorde
	StrCmp $R9 '/' 0 -4
642 2961 mdecorde
643 2961 mdecorde
	StrCpy $9 -1
644 2961 mdecorde
	IntOp $9 $9 + 1
645 2961 mdecorde
	StrCpy $R9 $1 1 $9
646 2961 mdecorde
	StrCmp $R9 '' +2
647 2961 mdecorde
	StrCmp $R9 '/' 0 -3
648 2961 mdecorde
	StrCpy $8 $1 $9
649 2961 mdecorde
	StrCpy $8 $8 '' 2
650 2961 mdecorde
	StrCpy $R9 $8 '' -1
651 2961 mdecorde
	StrCmp $R9 ' ' 0 +3
652 2961 mdecorde
	StrCpy $8 $8 -1
653 2961 mdecorde
	goto -3
654 2961 mdecorde
	StrCpy $R9 $1 2
655 2961 mdecorde
	StrCpy $1 $1 '' $9
656 2961 mdecorde
657 2961 mdecorde
	StrCmp $R9 'M=' 0 FileFunc_GetSize_size
658 2961 mdecorde
	StrCpy $4 $8
659 2961 mdecorde
	goto FileFunc_GetSize_option
660 2961 mdecorde
661 2961 mdecorde
	FileFunc_GetSize_size:
662 2961 mdecorde
	StrCmp $R9 'S=' 0 FileFunc_GetSize_gotosubdir
663 2961 mdecorde
	StrCpy $6 $8
664 2961 mdecorde
	goto FileFunc_GetSize_option
665 2961 mdecorde
666 2961 mdecorde
	FileFunc_GetSize_gotosubdir:
667 2961 mdecorde
	StrCmp $R9 'G=' 0 FileFunc_GetSize_error
668 2961 mdecorde
	StrCpy $7 $8
669 2961 mdecorde
	StrCmp $7 '' +3
670 2961 mdecorde
	StrCmp $7 '1' +2
671 2961 mdecorde
	StrCmp $7 '0' 0 FileFunc_GetSize_error
672 2961 mdecorde
	goto FileFunc_GetSize_option
673 2961 mdecorde
674 2961 mdecorde
	FileFunc_GetSize_sizeset:
675 2961 mdecorde
	StrCmp $6 '' FileFunc_GetSize_default
676 2961 mdecorde
	StrCpy $9 0
677 2961 mdecorde
	StrCpy $R9 $6 1 $9
678 2961 mdecorde
	StrCmp $R9 '' +4
679 2961 mdecorde
	StrCmp $R9 ':' +3
680 2961 mdecorde
	IntOp $9 $9 + 1
681 2961 mdecorde
	goto -4
682 2961 mdecorde
	StrCpy $5 $6 $9
683 2961 mdecorde
	IntOp $9 $9 + 1
684 2961 mdecorde
	StrCpy $1 $6 1 -1
685 2961 mdecorde
	StrCpy $6 $6 -1 $9
686 2961 mdecorde
	StrCmp $5 '' +2
687 2961 mdecorde
	IntOp $5 $5 + 0
688 2961 mdecorde
	StrCmp $6 '' +2
689 2961 mdecorde
	IntOp $6 $6 + 0
690 2961 mdecorde
691 2961 mdecorde
	StrCmp $1 'B' 0 +4
692 2961 mdecorde
	StrCpy $1 1
693 2961 mdecorde
	StrCpy $2 bytes
694 2961 mdecorde
	goto FileFunc_GetSize_default
695 2961 mdecorde
	StrCmp $1 'K' 0 +4
696 2961 mdecorde
	StrCpy $1 1024
697 2961 mdecorde
	StrCpy $2 Kb
698 2961 mdecorde
	goto FileFunc_GetSize_default
699 2961 mdecorde
	StrCmp $1 'M' 0 +4
700 2961 mdecorde
	StrCpy $1 1048576
701 2961 mdecorde
	StrCpy $2 Mb
702 2961 mdecorde
	goto FileFunc_GetSize_default
703 2961 mdecorde
	StrCmp $1 'G' 0 FileFunc_GetSize_error
704 2961 mdecorde
	StrCpy $1 1073741824
705 2961 mdecorde
	StrCpy $2 Gb
706 2961 mdecorde
707 2961 mdecorde
	FileFunc_GetSize_default:
708 2961 mdecorde
	StrCmp $4 '' 0 +2
709 2961 mdecorde
	StrCpy $4 '*.*'
710 2961 mdecorde
	StrCmp $7 '' 0 +2
711 2961 mdecorde
	StrCpy $7 '1'
712 2961 mdecorde
713 2961 mdecorde
	StrCpy $8 1
714 2961 mdecorde
	Push $0
715 2961 mdecorde
	SetDetailsPrint textonly
716 2961 mdecorde
717 2961 mdecorde
	FileFunc_GetSize_nextdir:
718 2961 mdecorde
	IntOp $8 $8 - 1
719 2961 mdecorde
	Pop $R8
720 2961 mdecorde
	FindFirst $0 $R7 '$R8\$4'
721 2961 mdecorde
	IfErrors FileFunc_GetSize_show
722 2961 mdecorde
	StrCmp $R7 '.' 0 FileFunc_GetSize_dir
723 2961 mdecorde
	FindNext $0 $R7
724 2961 mdecorde
	StrCmp $R7 '..' 0 FileFunc_GetSize_dir
725 2961 mdecorde
	FindNext $0 $R7
726 2961 mdecorde
	IfErrors 0 FileFunc_GetSize_dir
727 2961 mdecorde
	FindClose $0
728 2961 mdecorde
	goto FileFunc_GetSize_show
729 2961 mdecorde
730 2961 mdecorde
	FileFunc_GetSize_dir:
731 2961 mdecorde
	IfFileExists '$R8\$R7\*.*' 0 FileFunc_GetSize_file
732 2961 mdecorde
	IntOp $R5 $R5 + 1
733 2961 mdecorde
	goto FileFunc_GetSize_findnext
734 2961 mdecorde
735 2961 mdecorde
	FileFunc_GetSize_file:
736 2961 mdecorde
	StrCpy $R6 0
737 2961 mdecorde
	StrCmp $5$6 '' 0 +3
738 2961 mdecorde
	IntOp $R4 $R4 + 1
739 2961 mdecorde
	goto FileFunc_GetSize_findnext
740 2961 mdecorde
	FileOpen $9 '$R8\$R7' r
741 2961 mdecorde
	IfErrors +3
742 2961 mdecorde
	FileSeek $9 0 END $R6
743 2961 mdecorde
	FileClose $9
744 2961 mdecorde
	StrCmp $5 '' +2
745 2961 mdecorde
	IntCmp $R6 $5 0 FileFunc_GetSize_findnext
746 2961 mdecorde
	StrCmp $6 '' +2
747 2961 mdecorde
	IntCmp $R6 $6 0 0 FileFunc_GetSize_findnext
748 2961 mdecorde
	IntOp $R4 $R4 + 1
749 2961 mdecorde
	System::Int64Op $R3 + $R6
750 2961 mdecorde
	Pop $R3
751 2961 mdecorde
752 2961 mdecorde
	FileFunc_GetSize_findnext:
753 2961 mdecorde
	FindNext $0 $R7
754 2961 mdecorde
	IfErrors 0 FileFunc_GetSize_dir
755 2961 mdecorde
	FindClose $0
756 2961 mdecorde
757 2961 mdecorde
	FileFunc_GetSize_show:
758 2961 mdecorde
	StrCmp $5$6 '' FileFunc_GetSize_nosize
759 2961 mdecorde
	System::Int64Op $R3 / $1
760 2961 mdecorde
	Pop $9
761 2961 mdecorde
	DetailPrint 'Size:$9 $2  Files:$R4  Folders:$R5'
762 2961 mdecorde
	goto FileFunc_GetSize_subdir
763 2961 mdecorde
	FileFunc_GetSize_nosize:
764 2961 mdecorde
	DetailPrint 'Files:$R4  Folders:$R5'
765 2961 mdecorde
766 2961 mdecorde
	FileFunc_GetSize_subdir:
767 2961 mdecorde
	StrCmp $7 0 FileFunc_GetSize_preend
768 2961 mdecorde
	FindFirst $0 $R7 '$R8\*.*'
769 2961 mdecorde
	StrCmp $R7 '.' 0 FileFunc_GetSize_pushdir
770 2961 mdecorde
	FindNext $0 $R7
771 2961 mdecorde
	StrCmp $R7 '..' 0 FileFunc_GetSize_pushdir
772 2961 mdecorde
	FindNext $0 $R7
773 2961 mdecorde
	IfErrors 0 FileFunc_GetSize_pushdir
774 2961 mdecorde
	FindClose $0
775 2961 mdecorde
	StrCmp $8 0 FileFunc_GetSize_preend FileFunc_GetSize_nextdir
776 2961 mdecorde
777 2961 mdecorde
	FileFunc_GetSize_pushdir:
778 2961 mdecorde
	IfFileExists '$R8\$R7\*.*' 0 +3
779 2961 mdecorde
	Push '$R8\$R7'
780 2961 mdecorde
	IntOp $8 $8 + 1
781 2961 mdecorde
	FindNext $0 $R7
782 2961 mdecorde
	IfErrors 0 FileFunc_GetSize_pushdir
783 2961 mdecorde
	FindClose $0
784 2961 mdecorde
	StrCmp $8 0 FileFunc_GetSize_preend FileFunc_GetSize_nextdir
785 2961 mdecorde
786 2961 mdecorde
	FileFunc_GetSize_preend:
787 2961 mdecorde
	StrCmp $R3 '' FileFunc_GetSize_nosizeend
788 2961 mdecorde
	System::Int64Op $R3 / $1
789 2961 mdecorde
	Pop $R3
790 2961 mdecorde
	FileFunc_GetSize_nosizeend:
791 2961 mdecorde
	StrCpy $2 $R4
792 2961 mdecorde
	StrCpy $1 $R5
793 2961 mdecorde
	StrCpy $0 $R3
794 2961 mdecorde
	goto FileFunc_GetSize_end
795 2961 mdecorde
796 2961 mdecorde
	FileFunc_GetSize_error:
797 2961 mdecorde
	SetErrors
798 2961 mdecorde
	StrCpy $0 ''
799 2961 mdecorde
	StrCpy $1 ''
800 2961 mdecorde
	StrCpy $2 ''
801 2961 mdecorde
802 2961 mdecorde
	FileFunc_GetSize_end:
803 2961 mdecorde
	SetDetailsPrint both
804 2961 mdecorde
	Pop $R9
805 2961 mdecorde
	Pop $R8
806 2961 mdecorde
	Pop $R7
807 2961 mdecorde
	Pop $R6
808 2961 mdecorde
	Pop $R5
809 2961 mdecorde
	Pop $R4
810 2961 mdecorde
	Pop $R3
811 2961 mdecorde
	Pop $9
812 2961 mdecorde
	Pop $8
813 2961 mdecorde
	Pop $7
814 2961 mdecorde
	Pop $6
815 2961 mdecorde
	Pop $5
816 2961 mdecorde
	Pop $4
817 2961 mdecorde
	Pop $3
818 2961 mdecorde
	Exch $2
819 2961 mdecorde
	Exch
820 2961 mdecorde
	Exch $1
821 2961 mdecorde
	Exch 2
822 2961 mdecorde
	Exch $0
823 2961 mdecorde
824 2961 mdecorde
	!verbose pop
825 2961 mdecorde
!macroend
826 2961 mdecorde
827 2961 mdecorde
!define DriveSpace `!insertmacro DriveSpaceCall`
828 2961 mdecorde
!define un.DriveSpace `!insertmacro DriveSpaceCall`
829 2961 mdecorde
830 2961 mdecorde
!macro DriveSpace
831 2961 mdecorde
!macroend
832 2961 mdecorde
833 2961 mdecorde
!macro un.DriveSpace
834 2961 mdecorde
!macroend
835 2961 mdecorde
836 2961 mdecorde
!macro DriveSpace_
837 2961 mdecorde
	!verbose push
838 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
839 2961 mdecorde
840 2961 mdecorde
	Exch $1
841 2961 mdecorde
	Exch
842 2961 mdecorde
	Exch $0
843 2961 mdecorde
	Exch
844 2961 mdecorde
	Push $2
845 2961 mdecorde
	Push $3
846 2961 mdecorde
	Push $4
847 2961 mdecorde
	Push $5
848 2961 mdecorde
	Push $6
849 2961 mdecorde
	ClearErrors
850 2961 mdecorde
851 2961 mdecorde
	StrCpy $2 $0 1 -1
852 2961 mdecorde
	StrCmp $2 '\' 0 +3
853 2961 mdecorde
	StrCpy $0 $0 -1
854 2961 mdecorde
	goto -3
855 2961 mdecorde
	IfFileExists '$0\NUL' 0 FileFunc_DriveSpace_error
856 2961 mdecorde
857 2961 mdecorde
	StrCpy $5 ''
858 2961 mdecorde
	StrCpy $6 ''
859 2961 mdecorde
860 2961 mdecorde
	FileFunc_DriveSpace_option:
861 2961 mdecorde
	StrCpy $2 $1 1
862 2961 mdecorde
	StrCpy $1 $1 '' 1
863 2961 mdecorde
	StrCmp $2 ' ' -2
864 2961 mdecorde
	StrCmp $2 '' FileFunc_DriveSpace_default
865 2961 mdecorde
	StrCmp $2 '/' 0 -4
866 2961 mdecorde
	StrCpy $3 -1
867 2961 mdecorde
	IntOp $3 $3 + 1
868 2961 mdecorde
	StrCpy $2 $1 1 $3
869 2961 mdecorde
	StrCmp $2 '' +2
870 2961 mdecorde
	StrCmp $2 '/' 0 -3
871 2961 mdecorde
	StrCpy $4 $1 $3
872 2961 mdecorde
	StrCpy $4 $4 '' 2
873 2961 mdecorde
	StrCpy $2 $4 1 -1
874 2961 mdecorde
	StrCmp $2 ' ' 0 +3
875 2961 mdecorde
	StrCpy $4 $4 -1
876 2961 mdecorde
	goto -3
877 2961 mdecorde
	StrCpy $2 $1 2
878 2961 mdecorde
	StrCpy $1 $1 '' $3
879 2961 mdecorde
880 2961 mdecorde
	StrCmp $2 'D=' 0 FileFunc_DriveSpace_unit
881 2961 mdecorde
	StrCpy $5 $4
882 2961 mdecorde
	StrCmp $5 '' +4
883 2961 mdecorde
	StrCmp $5 'T' +3
884 2961 mdecorde
	StrCmp $5 'O' +2
885 2961 mdecorde
	StrCmp $5 'F' 0 FileFunc_DriveSpace_error
886 2961 mdecorde
	goto FileFunc_DriveSpace_option
887 2961 mdecorde
888 2961 mdecorde
	FileFunc_DriveSpace_unit:
889 2961 mdecorde
	StrCmp $2 'S=' 0 FileFunc_DriveSpace_error
890 2961 mdecorde
	StrCpy $6 $4
891 2961 mdecorde
	goto FileFunc_DriveSpace_option
892 2961 mdecorde
893 2961 mdecorde
	FileFunc_DriveSpace_default:
894 2961 mdecorde
	StrCmp $5 '' 0 +2
895 2961 mdecorde
	StrCpy $5 'T'
896 2961 mdecorde
	StrCmp $6 '' 0 +3
897 2961 mdecorde
	StrCpy $6 '1'
898 2961 mdecorde
	goto FileFunc_DriveSpace_getspace
899 2961 mdecorde
900 2961 mdecorde
	StrCmp $6 'B' 0 +3
901 2961 mdecorde
	StrCpy $6 1
902 2961 mdecorde
	goto FileFunc_DriveSpace_getspace
903 2961 mdecorde
	StrCmp $6 'K' 0 +3
904 2961 mdecorde
	StrCpy $6 1024
905 2961 mdecorde
	goto FileFunc_DriveSpace_getspace
906 2961 mdecorde
	StrCmp $6 'M' 0 +3
907 2961 mdecorde
	StrCpy $6 1048576
908 2961 mdecorde
	goto FileFunc_DriveSpace_getspace
909 2961 mdecorde
	StrCmp $6 'G' 0 FileFunc_DriveSpace_error
910 2961 mdecorde
	StrCpy $6 1073741824
911 2961 mdecorde
912 2961 mdecorde
	FileFunc_DriveSpace_getspace:
913 2961 mdecorde
	System::Call 'kernel32::GetDiskFreeSpaceExA(t, *l, *l, *l)i(r0,.r2,.r3,.)'
914 2961 mdecorde
915 2961 mdecorde
	StrCmp $5 T 0 +3
916 2961 mdecorde
	StrCpy $0 $3
917 2961 mdecorde
	goto FileFunc_DriveSpace_getsize
918 2961 mdecorde
	StrCmp $5 O 0 +4
919 2961 mdecorde
	System::Int64Op $3 - $2
920 2961 mdecorde
	Pop $0
921 2961 mdecorde
	goto FileFunc_DriveSpace_getsize
922 2961 mdecorde
	StrCmp $5 F 0 +2
923 2961 mdecorde
	StrCpy $0 $2
924 2961 mdecorde
925 2961 mdecorde
	FileFunc_DriveSpace_getsize:
926 2961 mdecorde
	System::Int64Op $0 / $6
927 2961 mdecorde
	Pop $0
928 2961 mdecorde
	goto FileFunc_DriveSpace_end
929 2961 mdecorde
930 2961 mdecorde
	FileFunc_DriveSpace_error:
931 2961 mdecorde
	SetErrors
932 2961 mdecorde
	StrCpy $0 ''
933 2961 mdecorde
934 2961 mdecorde
	FileFunc_DriveSpace_end:
935 2961 mdecorde
	Pop $6
936 2961 mdecorde
	Pop $5
937 2961 mdecorde
	Pop $4
938 2961 mdecorde
	Pop $3
939 2961 mdecorde
	Pop $2
940 2961 mdecorde
	Pop $1
941 2961 mdecorde
	Exch $0
942 2961 mdecorde
943 2961 mdecorde
	!verbose pop
944 2961 mdecorde
!macroend
945 2961 mdecorde
946 2961 mdecorde
!define GetDrives `!insertmacro GetDrivesCall`
947 2961 mdecorde
!define un.GetDrives `!insertmacro GetDrivesCall`
948 2961 mdecorde
949 2961 mdecorde
!macro GetDrives
950 2961 mdecorde
!macroend
951 2961 mdecorde
952 2961 mdecorde
!macro un.GetDrives
953 2961 mdecorde
!macroend
954 2961 mdecorde
955 2961 mdecorde
!macro GetDrives_
956 2961 mdecorde
	!verbose push
957 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
958 2961 mdecorde
959 2961 mdecorde
	Exch $1
960 2961 mdecorde
	Exch
961 2961 mdecorde
	Exch $0
962 2961 mdecorde
	Exch
963 2961 mdecorde
	Push $2
964 2961 mdecorde
	Push $3
965 2961 mdecorde
	Push $4
966 2961 mdecorde
	Push $5
967 2961 mdecorde
	Push $6
968 2961 mdecorde
	Push $8
969 2961 mdecorde
	Push $9
970 2961 mdecorde
971 2961 mdecorde
	System::Alloc 1024
972 2961 mdecorde
	Pop $2
973 2961 mdecorde
	System::Call 'kernel32::GetLogicalDriveStringsA(i,i) i(1024, r2)'
974 2961 mdecorde
975 2961 mdecorde
	StrCmp $0 ALL FileFunc_GetDrives_drivestring
976 2961 mdecorde
	StrCmp $0 '' 0 FileFunc_GetDrives_typeset
977 2961 mdecorde
	StrCpy $0 ALL
978 2961 mdecorde
	goto FileFunc_GetDrives_drivestring
979 2961 mdecorde
980 2961 mdecorde
	FileFunc_GetDrives_typeset:
981 2961 mdecorde
	StrCpy $6 -1
982 2961 mdecorde
	IntOp $6 $6 + 1
983 2961 mdecorde
	StrCpy $8 $0 1 $6
984 2961 mdecorde
	StrCmp $8$0 '' FileFunc_GetDrives_enumex
985 2961 mdecorde
	StrCmp $8 '' +2
986 2961 mdecorde
	StrCmp $8 '+' 0 -4
987 2961 mdecorde
	StrCpy $8 $0 $6
988 2961 mdecorde
	IntOp $6 $6 + 1
989 2961 mdecorde
	StrCpy $0 $0 '' $6
990 2961 mdecorde
991 2961 mdecorde
	StrCmp $8 'FDD' 0 +3
992 2961 mdecorde
	StrCpy $6 2
993 2961 mdecorde
	goto FileFunc_GetDrives_drivestring
994 2961 mdecorde
	StrCmp $8 'HDD' 0 +3
995 2961 mdecorde
	StrCpy $6 3
996 2961 mdecorde
	goto FileFunc_GetDrives_drivestring
997 2961 mdecorde
	StrCmp $8 'NET' 0 +3
998 2961 mdecorde
	StrCpy $6 4
999 2961 mdecorde
	goto FileFunc_GetDrives_drivestring
1000 2961 mdecorde
	StrCmp $8 'CDROM' 0 +3
1001 2961 mdecorde
	StrCpy $6 5
1002 2961 mdecorde
	goto FileFunc_GetDrives_drivestring
1003 2961 mdecorde
	StrCmp $8 'RAM' 0 FileFunc_GetDrives_typeset
1004 2961 mdecorde
	StrCpy $6 6
1005 2961 mdecorde
1006 2961 mdecorde
	FileFunc_GetDrives_drivestring:
1007 2961 mdecorde
	StrCpy $3 $2
1008 2961 mdecorde
1009 2961 mdecorde
	FileFunc_GetDrives_enumok:
1010 2961 mdecorde
	System::Call 'kernel32::lstrlenA(t) i(i r3) .r4'
1011 2961 mdecorde
	StrCmp $4$0 '0ALL' FileFunc_GetDrives_enumex
1012 2961 mdecorde
	StrCmp $4 0 FileFunc_GetDrives_typeset
1013 2961 mdecorde
	System::Call 'kernel32::GetDriveTypeA(t) i(i r3) .r5'
1014 2961 mdecorde
1015 2961 mdecorde
	StrCmp $0 ALL +2
1016 2961 mdecorde
	StrCmp $5 $6 FileFunc_GetDrives_letter FileFunc_GetDrives_enumnext
1017 2961 mdecorde
	StrCmp $5 2 0 +3
1018 2961 mdecorde
	StrCpy $8 FDD
1019 2961 mdecorde
	goto FileFunc_GetDrives_letter
1020 2961 mdecorde
	StrCmp $5 3 0 +3
1021 2961 mdecorde
	StrCpy $8 HDD
1022 2961 mdecorde
	goto FileFunc_GetDrives_letter
1023 2961 mdecorde
	StrCmp $5 4 0 +3
1024 2961 mdecorde
	StrCpy $8 NET
1025 2961 mdecorde
	goto FileFunc_GetDrives_letter
1026 2961 mdecorde
	StrCmp $5 5 0 +3
1027 2961 mdecorde
	StrCpy $8 CDROM
1028 2961 mdecorde
	goto FileFunc_GetDrives_letter
1029 2961 mdecorde
	StrCmp $5 6 0 FileFunc_GetDrives_enumex
1030 2961 mdecorde
	StrCpy $8 RAM
1031 2961 mdecorde
1032 2961 mdecorde
	FileFunc_GetDrives_letter:
1033 2961 mdecorde
	System::Call '*$3(&t1024 .r9)'
1034 2961 mdecorde
1035 2961 mdecorde
	Push $0
1036 2961 mdecorde
	Push $1
1037 2961 mdecorde
	Push $2
1038 2961 mdecorde
	Push $3
1039 2961 mdecorde
	Push $4
1040 2961 mdecorde
	Push $5
1041 2961 mdecorde
	Push $6
1042 2961 mdecorde
	Push $8
1043 2961 mdecorde
	Call $1
1044 2961 mdecorde
	Pop $9
1045 2961 mdecorde
	Pop $8
1046 2961 mdecorde
	Pop $6
1047 2961 mdecorde
	Pop $5
1048 2961 mdecorde
	Pop $4
1049 2961 mdecorde
	Pop $3
1050 2961 mdecorde
	Pop $2
1051 2961 mdecorde
	Pop $1
1052 2961 mdecorde
	Pop $0
1053 2961 mdecorde
	StrCmp $9 'StopGetDrives' FileFunc_GetDrives_enumex
1054 2961 mdecorde
1055 2961 mdecorde
	FileFunc_GetDrives_enumnext:
1056 2961 mdecorde
	IntOp $3 $3 + $4
1057 2961 mdecorde
	IntOp $3 $3 + 1
1058 2961 mdecorde
	goto FileFunc_GetDrives_enumok
1059 2961 mdecorde
1060 2961 mdecorde
	FileFunc_GetDrives_enumex:
1061 2961 mdecorde
	System::Free $2
1062 2961 mdecorde
1063 2961 mdecorde
	Pop $9
1064 2961 mdecorde
	Pop $8
1065 2961 mdecorde
	Pop $6
1066 2961 mdecorde
	Pop $5
1067 2961 mdecorde
	Pop $4
1068 2961 mdecorde
	Pop $3
1069 2961 mdecorde
	Pop $2
1070 2961 mdecorde
	Pop $1
1071 2961 mdecorde
	Pop $0
1072 2961 mdecorde
1073 2961 mdecorde
	!verbose pop
1074 2961 mdecorde
!macroend
1075 2961 mdecorde
1076 2961 mdecorde
!define GetTime `!insertmacro GetTimeCall`
1077 2961 mdecorde
!define un.GetTime `!insertmacro GetTimeCall`
1078 2961 mdecorde
1079 2961 mdecorde
!macro GetTime
1080 2961 mdecorde
!macroend
1081 2961 mdecorde
1082 2961 mdecorde
!macro un.GetTime
1083 2961 mdecorde
!macroend
1084 2961 mdecorde
1085 2961 mdecorde
!macro GetTime_
1086 2961 mdecorde
	!verbose push
1087 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
1088 2961 mdecorde
1089 2961 mdecorde
	Exch $1
1090 2961 mdecorde
	Exch
1091 2961 mdecorde
	Exch $0
1092 2961 mdecorde
	Exch
1093 2961 mdecorde
	Push $2
1094 2961 mdecorde
	Push $3
1095 2961 mdecorde
	Push $4
1096 2961 mdecorde
	Push $5
1097 2961 mdecorde
	Push $6
1098 2961 mdecorde
	Push $7
1099 2961 mdecorde
	ClearErrors
1100 2961 mdecorde
1101 2961 mdecorde
	StrCmp $1 'L' FileFunc_GetTime_gettime
1102 2961 mdecorde
	StrCmp $1 'A' FileFunc_GetTime_getfile
1103 2961 mdecorde
	StrCmp $1 'C' FileFunc_GetTime_getfile
1104 2961 mdecorde
	StrCmp $1 'M' FileFunc_GetTime_getfile
1105 2961 mdecorde
	StrCmp $1 'LS' FileFunc_GetTime_gettime
1106 2961 mdecorde
	StrCmp $1 'AS' FileFunc_GetTime_getfile
1107 2961 mdecorde
	StrCmp $1 'CS' FileFunc_GetTime_getfile
1108 2961 mdecorde
	StrCmp $1 'MS' FileFunc_GetTime_getfile
1109 2961 mdecorde
	goto FileFunc_GetTime_error
1110 2961 mdecorde
1111 2961 mdecorde
	FileFunc_GetTime_getfile:
1112 2961 mdecorde
	IfFileExists $0 0 FileFunc_GetTime_error
1113 2961 mdecorde
	System::Call '*(i,l,l,l,i,i,i,i,&t260,&t14) i .r6'
1114 2961 mdecorde
	System::Call 'kernel32::FindFirstFileA(t,i)i(r0,r6) .r2'
1115 2961 mdecorde
	System::Call 'kernel32::FindClose(i)i(r2)'
1116 2961 mdecorde
1117 2961 mdecorde
	FileFunc_GetTime_gettime:
1118 2961 mdecorde
	System::Call '*(&i2,&i2,&i2,&i2,&i2,&i2,&i2,&i2) i .r7'
1119 2961 mdecorde
	StrCmp $1 'L' 0 FileFunc_GetTime_systemtime
1120 2961 mdecorde
	System::Call 'kernel32::GetLocalTime(i)i(r7)'
1121 2961 mdecorde
	goto FileFunc_GetTime_convert
1122 2961 mdecorde
	FileFunc_GetTime_systemtime:
1123 2961 mdecorde
	StrCmp $1 'LS' 0 FileFunc_GetTime_filetime
1124 2961 mdecorde
	System::Call 'kernel32::GetSystemTime(i)i(r7)'
1125 2961 mdecorde
	goto FileFunc_GetTime_convert
1126 2961 mdecorde
1127 2961 mdecorde
	FileFunc_GetTime_filetime:
1128 2961 mdecorde
	System::Call '*$6(i,l,l,l,i,i,i,i,&t260,&t14)i(,.r4,.r3,.r2)'
1129 2961 mdecorde
	System::Free $6
1130 2961 mdecorde
	StrCmp $1 'A' 0 +3
1131 2961 mdecorde
	StrCpy $2 $3
1132 2961 mdecorde
	goto FileFunc_GetTime_tolocal
1133 2961 mdecorde
	StrCmp $1 'C' 0 +3
1134 2961 mdecorde
	StrCpy $2 $4
1135 2961 mdecorde
	goto FileFunc_GetTime_tolocal
1136 2961 mdecorde
	StrCmp $1 'M' FileFunc_GetTime_tolocal
1137 2961 mdecorde
1138 2961 mdecorde
	StrCmp $1 'AS' FileFunc_GetTime_tosystem
1139 2961 mdecorde
	StrCmp $1 'CS' 0 +3
1140 2961 mdecorde
	StrCpy $3 $4
1141 2961 mdecorde
	goto FileFunc_GetTime_tosystem
1142 2961 mdecorde
	StrCmp $1 'MS' 0 +3
1143 2961 mdecorde
	StrCpy $3 $2
1144 2961 mdecorde
	goto FileFunc_GetTime_tosystem
1145 2961 mdecorde
1146 2961 mdecorde
	FileFunc_GetTime_tolocal:
1147 2961 mdecorde
	System::Call 'kernel32::FileTimeToLocalFileTime(*l,*l)i(r2,.r3)'
1148 2961 mdecorde
	FileFunc_GetTime_tosystem:
1149 2961 mdecorde
	System::Call 'kernel32::FileTimeToSystemTime(*l,i)i(r3,r7)'
1150 2961 mdecorde
1151 2961 mdecorde
	FileFunc_GetTime_convert:
1152 2961 mdecorde
	System::Call '*$7(&i2,&i2,&i2,&i2,&i2,&i2,&i2,&i2)i(.r5,.r6,.r4,.r0,.r3,.r2,.r1,)'
1153 2961 mdecorde
	System::Free $7
1154 2961 mdecorde
1155 2961 mdecorde
	IntCmp $0 9 0 0 +2
1156 2961 mdecorde
	StrCpy $0 '0$0'
1157 2961 mdecorde
	IntCmp $1 9 0 0 +2
1158 2961 mdecorde
	StrCpy $1 '0$1'
1159 2961 mdecorde
	IntCmp $2 9 0 0 +2
1160 2961 mdecorde
	StrCpy $2 '0$2'
1161 2961 mdecorde
	IntCmp $6 9 0 0 +2
1162 2961 mdecorde
	StrCpy $6 '0$6'
1163 2961 mdecorde
1164 2961 mdecorde
	StrCmp $4 0 0 +3
1165 2961 mdecorde
	StrCpy $4 Sunday
1166 2961 mdecorde
	goto FileFunc_GetTime_end
1167 2961 mdecorde
	StrCmp $4 1 0 +3
1168 2961 mdecorde
	StrCpy $4 Monday
1169 2961 mdecorde
	goto FileFunc_GetTime_end
1170 2961 mdecorde
	StrCmp $4 2 0 +3
1171 2961 mdecorde
	StrCpy $4 Tuesday
1172 2961 mdecorde
	goto FileFunc_GetTime_end
1173 2961 mdecorde
	StrCmp $4 3 0 +3
1174 2961 mdecorde
	StrCpy $4 Wednesday
1175 2961 mdecorde
	goto FileFunc_GetTime_end
1176 2961 mdecorde
	StrCmp $4 4 0 +3
1177 2961 mdecorde
	StrCpy $4 Thursday
1178 2961 mdecorde
	goto FileFunc_GetTime_end
1179 2961 mdecorde
	StrCmp $4 5 0 +3
1180 2961 mdecorde
	StrCpy $4 Friday
1181 2961 mdecorde
	goto FileFunc_GetTime_end
1182 2961 mdecorde
	StrCmp $4 6 0 FileFunc_GetTime_error
1183 2961 mdecorde
	StrCpy $4 Saturday
1184 2961 mdecorde
	goto FileFunc_GetTime_end
1185 2961 mdecorde
1186 2961 mdecorde
	FileFunc_GetTime_error:
1187 2961 mdecorde
	SetErrors
1188 2961 mdecorde
	StrCpy $0 ''
1189 2961 mdecorde
	StrCpy $1 ''
1190 2961 mdecorde
	StrCpy $2 ''
1191 2961 mdecorde
	StrCpy $3 ''
1192 2961 mdecorde
	StrCpy $4 ''
1193 2961 mdecorde
	StrCpy $5 ''
1194 2961 mdecorde
	StrCpy $6 ''
1195 2961 mdecorde
1196 2961 mdecorde
	FileFunc_GetTime_end:
1197 2961 mdecorde
	Pop $7
1198 2961 mdecorde
	Exch $6
1199 2961 mdecorde
	Exch
1200 2961 mdecorde
	Exch $5
1201 2961 mdecorde
	Exch 2
1202 2961 mdecorde
	Exch $4
1203 2961 mdecorde
	Exch 3
1204 2961 mdecorde
	Exch $3
1205 2961 mdecorde
	Exch 4
1206 2961 mdecorde
	Exch $2
1207 2961 mdecorde
	Exch 5
1208 2961 mdecorde
	Exch $1
1209 2961 mdecorde
	Exch 6
1210 2961 mdecorde
	Exch $0
1211 2961 mdecorde
1212 2961 mdecorde
	!verbose pop
1213 2961 mdecorde
!macroend
1214 2961 mdecorde
1215 2961 mdecorde
!define GetFileAttributes `!insertmacro GetFileAttributesCall`
1216 2961 mdecorde
!define un.GetFileAttributes `!insertmacro GetFileAttributesCall`
1217 2961 mdecorde
1218 2961 mdecorde
!macro GetFileAttributes
1219 2961 mdecorde
!macroend
1220 2961 mdecorde
1221 2961 mdecorde
!macro un.GetFileAttributes
1222 2961 mdecorde
!macroend
1223 2961 mdecorde
1224 2961 mdecorde
!macro GetFileAttributes_
1225 2961 mdecorde
	!verbose push
1226 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
1227 2961 mdecorde
1228 2961 mdecorde
	Exch $1
1229 2961 mdecorde
	Exch
1230 2961 mdecorde
	Exch $0
1231 2961 mdecorde
	Exch
1232 2961 mdecorde
	Push $2
1233 2961 mdecorde
	Push $3
1234 2961 mdecorde
	Push $4
1235 2961 mdecorde
	Push $5
1236 2961 mdecorde
1237 2961 mdecorde
	System::Call 'kernel32::GetFileAttributes(t r0)i .r2'
1238 2961 mdecorde
	StrCmp $2 -1 FileFunc_GetFileAttributes_error
1239 2961 mdecorde
	StrCpy $3 ''
1240 2961 mdecorde
1241 2961 mdecorde
	IntOp $0 $2 & 0x4000
1242 2961 mdecorde
	IntCmp $0 0 +2
1243 2961 mdecorde
	StrCpy $3 'ENCRYPTED|'
1244 2961 mdecorde
1245 2961 mdecorde
	IntOp $0 $2 & 0x2000
1246 2961 mdecorde
	IntCmp $0 0 +2
1247 2961 mdecorde
	StrCpy $3 'NOT_CONTENT_INDEXED|$3'
1248 2961 mdecorde
1249 2961 mdecorde
	IntOp $0 $2 & 0x1000
1250 2961 mdecorde
	IntCmp $0 0 +2
1251 2961 mdecorde
	StrCpy $3 'OFFLINE|$3'
1252 2961 mdecorde
1253 2961 mdecorde
	IntOp $0 $2 & 0x0800
1254 2961 mdecorde
	IntCmp $0 0 +2
1255 2961 mdecorde
	StrCpy $3 'COMPRESSED|$3'
1256 2961 mdecorde
1257 2961 mdecorde
	IntOp $0 $2 & 0x0400
1258 2961 mdecorde
	IntCmp $0 0 +2
1259 2961 mdecorde
	StrCpy $3 'REPARSE_POINT|$3'
1260 2961 mdecorde
1261 2961 mdecorde
	IntOp $0 $2 & 0x0200
1262 2961 mdecorde
	IntCmp $0 0 +2
1263 2961 mdecorde
	StrCpy $3 'SPARSE_FILE|$3'
1264 2961 mdecorde
1265 2961 mdecorde
	IntOp $0 $2 & 0x0100
1266 2961 mdecorde
	IntCmp $0 0 +2
1267 2961 mdecorde
	StrCpy $3 'TEMPORARY|$3'
1268 2961 mdecorde
1269 2961 mdecorde
	IntOp $0 $2 & 0x0080
1270 2961 mdecorde
	IntCmp $0 0 +2
1271 2961 mdecorde
	StrCpy $3 'NORMAL|$3'
1272 2961 mdecorde
1273 2961 mdecorde
	IntOp $0 $2 & 0x0040
1274 2961 mdecorde
	IntCmp $0 0 +2
1275 2961 mdecorde
	StrCpy $3 'DEVICE|$3'
1276 2961 mdecorde
1277 2961 mdecorde
	IntOp $0 $2 & 0x0020
1278 2961 mdecorde
	IntCmp $0 0 +2
1279 2961 mdecorde
	StrCpy $3 'ARCHIVE|$3'
1280 2961 mdecorde
1281 2961 mdecorde
	IntOp $0 $2 & 0x0010
1282 2961 mdecorde
	IntCmp $0 0 +2
1283 2961 mdecorde
	StrCpy $3 'DIRECTORY|$3'
1284 2961 mdecorde
1285 2961 mdecorde
	IntOp $0 $2 & 0x0004
1286 2961 mdecorde
	IntCmp $0 0 +2
1287 2961 mdecorde
	StrCpy $3 'SYSTEM|$3'
1288 2961 mdecorde
1289 2961 mdecorde
	IntOp $0 $2 & 0x0002
1290 2961 mdecorde
	IntCmp $0 0 +2
1291 2961 mdecorde
	StrCpy $3 'HIDDEN|$3'
1292 2961 mdecorde
1293 2961 mdecorde
	IntOp $0 $2 & 0x0001
1294 2961 mdecorde
	IntCmp $0 0 +2
1295 2961 mdecorde
	StrCpy $3 'READONLY|$3'
1296 2961 mdecorde
1297 2961 mdecorde
	StrCpy $0 $3 -1
1298 2961 mdecorde
	StrCmp $1 '' FileFunc_GetFileAttributes_end
1299 2961 mdecorde
	StrCmp $1 'ALL' FileFunc_GetFileAttributes_end
1300 2961 mdecorde
1301 2961 mdecorde
	FileFunc_GetFileAttributes_attrcmp:
1302 2961 mdecorde
	StrCpy $5 0
1303 2961 mdecorde
	IntOp $5 $5 + 1
1304 2961 mdecorde
	StrCpy $4 $1 1 $5
1305 2961 mdecorde
	StrCmp $4 '' +2
1306 2961 mdecorde
	StrCmp $4 '|'  0 -3
1307 2961 mdecorde
	StrCpy $2 $1 $5
1308 2961 mdecorde
	IntOp $5 $5 + 1
1309 2961 mdecorde
	StrCpy $1 $1 '' $5
1310 2961 mdecorde
	StrLen $3 $2
1311 2961 mdecorde
	StrCpy $5 -1
1312 2961 mdecorde
	IntOp $5 $5 + 1
1313 2961 mdecorde
	StrCpy $4 $0 $3 $5
1314 2961 mdecorde
	StrCmp $4 '' FileFunc_GetFileAttributes_notfound
1315 2961 mdecorde
	StrCmp $4 $2 0 -3
1316 2961 mdecorde
	StrCmp $1 '' 0 FileFunc_GetFileAttributes_attrcmp
1317 2961 mdecorde
	StrCpy $0 1
1318 2961 mdecorde
	goto FileFunc_GetFileAttributes_end
1319 2961 mdecorde
1320 2961 mdecorde
	FileFunc_GetFileAttributes_notfound:
1321 2961 mdecorde
	StrCpy $0 0
1322 2961 mdecorde
	goto FileFunc_GetFileAttributes_end
1323 2961 mdecorde
1324 2961 mdecorde
	FileFunc_GetFileAttributes_error:
1325 2961 mdecorde
	SetErrors
1326 2961 mdecorde
	StrCpy $0 ''
1327 2961 mdecorde
1328 2961 mdecorde
	FileFunc_GetFileAttributes_end:
1329 2961 mdecorde
	Pop $5
1330 2961 mdecorde
	Pop $4
1331 2961 mdecorde
	Pop $3
1332 2961 mdecorde
	Pop $2
1333 2961 mdecorde
	Pop $1
1334 2961 mdecorde
	Exch $0
1335 2961 mdecorde
1336 2961 mdecorde
	!verbose pop
1337 2961 mdecorde
!macroend
1338 2961 mdecorde
1339 2961 mdecorde
!define GetFileVersion `!insertmacro GetFileVersionCall`
1340 2961 mdecorde
!define un.GetFileVersion `!insertmacro GetFileVersionCall`
1341 2961 mdecorde
1342 2961 mdecorde
!macro GetFileVersion
1343 2961 mdecorde
!macroend
1344 2961 mdecorde
1345 2961 mdecorde
!macro un.GetFileVersion
1346 2961 mdecorde
!macroend
1347 2961 mdecorde
1348 2961 mdecorde
!macro GetFileVersion_
1349 2961 mdecorde
	!verbose push
1350 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
1351 2961 mdecorde
1352 2961 mdecorde
	Exch $0
1353 2961 mdecorde
	Push $1
1354 2961 mdecorde
	Push $2
1355 2961 mdecorde
	Push $3
1356 2961 mdecorde
	Push $4
1357 2961 mdecorde
	Push $5
1358 2961 mdecorde
	Push $6
1359 2961 mdecorde
	ClearErrors
1360 2961 mdecorde
1361 2961 mdecorde
	GetDllVersion '$0' $1 $2
1362 2961 mdecorde
	IfErrors FileFunc_GetFileVersion_error
1363 2961 mdecorde
	IntOp $3 $1 >> 16
1364 2961 mdecorde
	IntOp $3 $3 & 0x0000FFFF
1365 2961 mdecorde
	IntOp $4 $1 & 0x0000FFFF
1366 2961 mdecorde
	IntOp $5 $2 >> 16
1367 2961 mdecorde
	IntOp $5 $5 & 0x0000FFFF
1368 2961 mdecorde
	IntOp $6 $2 & 0x0000FFFF
1369 2961 mdecorde
	StrCpy $0 '$3.$4.$5.$6'
1370 2961 mdecorde
	goto FileFunc_GetFileVersion_end
1371 2961 mdecorde
1372 2961 mdecorde
	FileFunc_GetFileVersion_error:
1373 2961 mdecorde
	SetErrors
1374 2961 mdecorde
	StrCpy $0 ''
1375 2961 mdecorde
1376 2961 mdecorde
	FileFunc_GetFileVersion_end:
1377 2961 mdecorde
	Pop $6
1378 2961 mdecorde
	Pop $5
1379 2961 mdecorde
	Pop $4
1380 2961 mdecorde
	Pop $3
1381 2961 mdecorde
	Pop $2
1382 2961 mdecorde
	Pop $1
1383 2961 mdecorde
	Exch $0
1384 2961 mdecorde
1385 2961 mdecorde
	!verbose pop
1386 2961 mdecorde
!macroend
1387 2961 mdecorde
1388 2961 mdecorde
!define GetExeName `!insertmacro GetExeNameCall`
1389 2961 mdecorde
!define un.GetExeName `!insertmacro GetExeNameCall`
1390 2961 mdecorde
1391 2961 mdecorde
!macro GetExeName
1392 2961 mdecorde
!macroend
1393 2961 mdecorde
1394 2961 mdecorde
!macro un.GetExeName
1395 2961 mdecorde
!macroend
1396 2961 mdecorde
1397 2961 mdecorde
!macro GetExeName_
1398 2961 mdecorde
	!verbose push
1399 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
1400 2961 mdecorde
1401 2961 mdecorde
	Push $0
1402 2961 mdecorde
	Push $1
1403 2961 mdecorde
	Push $2
1404 2961 mdecorde
	System::Call 'kernel32::GetModuleFileNameA(i 0, t .r0, i 1024)'
1405 2961 mdecorde
	System::Call 'kernel32::GetLongPathNameA(t r0, t .r1, i 1024)i .r2'
1406 2961 mdecorde
	StrCmp $2 error +2
1407 2961 mdecorde
	StrCpy $0 $1
1408 2961 mdecorde
	Pop $2
1409 2961 mdecorde
	Pop $1
1410 2961 mdecorde
	Exch $0
1411 2961 mdecorde
1412 2961 mdecorde
	!verbose pop
1413 2961 mdecorde
!macroend
1414 2961 mdecorde
1415 2961 mdecorde
!define GetExePath `!insertmacro GetExePathCall`
1416 2961 mdecorde
!define un.GetExePath `!insertmacro GetExePathCall`
1417 2961 mdecorde
1418 2961 mdecorde
!macro GetExePath
1419 2961 mdecorde
!macroend
1420 2961 mdecorde
1421 2961 mdecorde
!macro un.GetExePath
1422 2961 mdecorde
!macroend
1423 2961 mdecorde
1424 2961 mdecorde
!macro GetExePath_
1425 2961 mdecorde
	!verbose push
1426 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
1427 2961 mdecorde
1428 2961 mdecorde
	Push $0
1429 2961 mdecorde
	Push $1
1430 2961 mdecorde
	Push $2
1431 2961 mdecorde
	StrCpy $0 $EXEDIR
1432 2961 mdecorde
	System::Call 'kernel32::GetLongPathNameA(t r0, t .r1, i 1024)i .r2'
1433 2961 mdecorde
	StrCmp $2 error +2
1434 2961 mdecorde
	StrCpy $0 $1
1435 2961 mdecorde
	Pop $2
1436 2961 mdecorde
	Pop $1
1437 2961 mdecorde
	Exch $0
1438 2961 mdecorde
1439 2961 mdecorde
	!verbose pop
1440 2961 mdecorde
!macroend
1441 2961 mdecorde
1442 2961 mdecorde
!define GetParameters `!insertmacro GetParametersCall`
1443 2961 mdecorde
!define un.GetParameters `!insertmacro GetParametersCall`
1444 2961 mdecorde
1445 2961 mdecorde
!macro GetParameters
1446 2961 mdecorde
!macroend
1447 2961 mdecorde
1448 2961 mdecorde
!macro un.GetParameters
1449 2961 mdecorde
!macroend
1450 2961 mdecorde
1451 2961 mdecorde
!macro GetParameters_
1452 2961 mdecorde
	!verbose push
1453 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
1454 2961 mdecorde
1455 2961 mdecorde
	;cmdline-check
1456 2961 mdecorde
	StrCmp $CMDLINE "" 0 +3
1457 2961 mdecorde
	Push ""
1458 2961 mdecorde
	Return
1459 2961 mdecorde
1460 2961 mdecorde
	;vars
1461 2961 mdecorde
	Push $0  ;tmp
1462 2961 mdecorde
	Push $1  ;length
1463 2961 mdecorde
	Push $2  ;parameter offset
1464 2961 mdecorde
	Push $3  ;separator
1465 2961 mdecorde
1466 2961 mdecorde
	;length/offset
1467 2961 mdecorde
	StrLen $1 $CMDLINE
1468 2961 mdecorde
	StrCpy $2 2  ;start with third character
1469 2961 mdecorde
1470 2961 mdecorde
	;separator
1471 2961 mdecorde
	StrCpy $3 $CMDLINE 1 ;first character
1472 2961 mdecorde
	StrCmp $3 '"' +2
1473 2961 mdecorde
	StrCpy $3 ' '
1474 2961 mdecorde
1475 2961 mdecorde
	FileFunc_GetParameters_token:  ;finding second separator
1476 2961 mdecorde
	IntCmp $2 $1 FileFunc_GetParameters_strip 0 FileFunc_GetParameters_strip
1477 2961 mdecorde
	StrCpy $0 $CMDLINE 1 $2
1478 2961 mdecorde
	IntOp $2 $2 + 1
1479 2961 mdecorde
	StrCmp $3 $0 0 FileFunc_GetParameters_token
1480 2961 mdecorde
1481 2961 mdecorde
	FileFunc_GetParameters_strip:  ;strip white space
1482 2961 mdecorde
	IntCmp $2 $1 FileFunc_GetParameters_copy 0 FileFunc_GetParameters_copy
1483 2961 mdecorde
	StrCpy $0 $CMDLINE 1 $2
1484 2961 mdecorde
	StrCmp $0 ' ' 0 FileFunc_GetParameters_copy
1485 2961 mdecorde
	IntOp $2 $2 + 1
1486 2961 mdecorde
	Goto FileFunc_GetParameters_strip
1487 2961 mdecorde
1488 2961 mdecorde
	FileFunc_GetParameters_copy:
1489 2961 mdecorde
	StrCpy $0 $CMDLINE "" $2
1490 2961 mdecorde
1491 2961 mdecorde
	;strip white spaces from end
1492 2961 mdecorde
	FileFunc_GetParameters_rstrip:
1493 2961 mdecorde
	StrCpy $1 $0 1 -1
1494 2961 mdecorde
	StrCmp $1 ' ' 0 FileFunc_GetParameters_done
1495 2961 mdecorde
	StrCpy $0 $0 -1
1496 2961 mdecorde
	Goto FileFunc_GetParameters_rstrip
1497 2961 mdecorde
1498 2961 mdecorde
	FileFunc_GetParameters_done:
1499 2961 mdecorde
	Pop $3
1500 2961 mdecorde
	Pop $2
1501 2961 mdecorde
	Pop $1
1502 2961 mdecorde
	Exch $0
1503 2961 mdecorde
1504 2961 mdecorde
	!verbose pop
1505 2961 mdecorde
!macroend
1506 2961 mdecorde
1507 2961 mdecorde
!macro GetOptionsBody _FILEFUNC_S
1508 2961 mdecorde
1509 2961 mdecorde
	Exch $1
1510 2961 mdecorde
	Exch
1511 2961 mdecorde
	Exch $0
1512 2961 mdecorde
	Exch
1513 2961 mdecorde
	Push $2
1514 2961 mdecorde
	Push $3
1515 2961 mdecorde
	Push $4
1516 2961 mdecorde
	Push $5
1517 2961 mdecorde
	Push $6
1518 2961 mdecorde
	Push $7
1519 2961 mdecorde
	ClearErrors
1520 2961 mdecorde
1521 2961 mdecorde
	StrCpy $2 $1 '' 1
1522 2961 mdecorde
	StrCpy $1 $1 1
1523 2961 mdecorde
	StrLen $3 $2
1524 2961 mdecorde
	StrCpy $7 0
1525 2961 mdecorde
1526 2961 mdecorde
	FileFunc_GetOptions${_FILEFUNC_S}_begin:
1527 2961 mdecorde
	StrCpy $4 -1
1528 2961 mdecorde
	StrCpy $6 ''
1529 2961 mdecorde
1530 2961 mdecorde
	FileFunc_GetOptions${_FILEFUNC_S}_quote:
1531 2961 mdecorde
	IntOp $4 $4 + 1
1532 2961 mdecorde
	StrCpy $5 $0 1 $4
1533 2961 mdecorde
	StrCmp${_FILEFUNC_S} $5$7 '0' FileFunc_GetOptions${_FILEFUNC_S}_notfound
1534 2961 mdecorde
	StrCmp${_FILEFUNC_S} $5 '' FileFunc_GetOptions${_FILEFUNC_S}_trimright
1535 2961 mdecorde
	StrCmp${_FILEFUNC_S} $5 '"' 0 +7
1536 2961 mdecorde
	StrCmp${_FILEFUNC_S} $6 '' 0 +3
1537 2961 mdecorde
	StrCpy $6 '"'
1538 2961 mdecorde
	goto FileFunc_GetOptions${_FILEFUNC_S}_quote
1539 2961 mdecorde
	StrCmp${_FILEFUNC_S} $6 '"' 0 +3
1540 2961 mdecorde
	StrCpy $6 ''
1541 2961 mdecorde
	goto FileFunc_GetOptions${_FILEFUNC_S}_quote
1542 2961 mdecorde
	StrCmp${_FILEFUNC_S} $5 `'` 0 +7
1543 2961 mdecorde
	StrCmp${_FILEFUNC_S} $6 `` 0 +3
1544 2961 mdecorde
	StrCpy $6 `'`
1545 2961 mdecorde
	goto FileFunc_GetOptions${_FILEFUNC_S}_quote
1546 2961 mdecorde
	StrCmp${_FILEFUNC_S} $6 `'` 0 +3
1547 2961 mdecorde
	StrCpy $6 ``
1548 2961 mdecorde
	goto FileFunc_GetOptions${_FILEFUNC_S}_quote
1549 2961 mdecorde
	StrCmp${_FILEFUNC_S} $5 '`' 0 +7
1550 2961 mdecorde
	StrCmp${_FILEFUNC_S} $6 '' 0 +3
1551 2961 mdecorde
	StrCpy $6 '`'
1552 2961 mdecorde
	goto FileFunc_GetOptions${_FILEFUNC_S}_quote
1553 2961 mdecorde
	StrCmp${_FILEFUNC_S} $6 '`' 0 +3
1554 2961 mdecorde
	StrCpy $6 ''
1555 2961 mdecorde
	goto FileFunc_GetOptions${_FILEFUNC_S}_quote
1556 2961 mdecorde
	StrCmp${_FILEFUNC_S} $6 '"' FileFunc_GetOptions${_FILEFUNC_S}_quote
1557 2961 mdecorde
	StrCmp${_FILEFUNC_S} $6 `'` FileFunc_GetOptions${_FILEFUNC_S}_quote
1558 2961 mdecorde
	StrCmp${_FILEFUNC_S} $6 '`' FileFunc_GetOptions${_FILEFUNC_S}_quote
1559 2961 mdecorde
	StrCmp${_FILEFUNC_S} $5 $1 0 FileFunc_GetOptions${_FILEFUNC_S}_quote
1560 2961 mdecorde
	StrCmp${_FILEFUNC_S} $7 0 FileFunc_GetOptions${_FILEFUNC_S}_trimleft FileFunc_GetOptions${_FILEFUNC_S}_trimright
1561 2961 mdecorde
1562 2961 mdecorde
	FileFunc_GetOptions${_FILEFUNC_S}_trimleft:
1563 2961 mdecorde
	IntOp $4 $4 + 1
1564 2961 mdecorde
	StrCpy $5 $0 $3 $4
1565 2961 mdecorde
	StrCmp${_FILEFUNC_S} $5 '' FileFunc_GetOptions${_FILEFUNC_S}_notfound
1566 2961 mdecorde
	StrCmp${_FILEFUNC_S} $5 $2 0 FileFunc_GetOptions${_FILEFUNC_S}_quote
1567 2961 mdecorde
	IntOp $4 $4 + $3
1568 2961 mdecorde
	StrCpy $0 $0 '' $4
1569 2961 mdecorde
	StrCpy $4 $0 1
1570 2961 mdecorde
	StrCmp${_FILEFUNC_S} $4 ' ' 0 +3
1571 2961 mdecorde
	StrCpy $0 $0 '' 1
1572 2961 mdecorde
	goto -3
1573 2961 mdecorde
	StrCpy $7 1
1574 2961 mdecorde
	goto FileFunc_GetOptions${_FILEFUNC_S}_begin
1575 2961 mdecorde
1576 2961 mdecorde
	FileFunc_GetOptions${_FILEFUNC_S}_trimright:
1577 2961 mdecorde
	StrCpy $0 $0 $4
1578 2961 mdecorde
	StrCpy $4 $0 1 -1
1579 2961 mdecorde
	StrCmp${_FILEFUNC_S} $4 ' ' 0 +3
1580 2961 mdecorde
	StrCpy $0 $0 -1
1581 2961 mdecorde
	goto -3
1582 2961 mdecorde
	StrCpy $3 $0 1
1583 2961 mdecorde
	StrCpy $4 $0 1 -1
1584 2961 mdecorde
	StrCmp${_FILEFUNC_S} $3 $4 0 FileFunc_GetOptions${_FILEFUNC_S}_end
1585 2961 mdecorde
	StrCmp${_FILEFUNC_S} $3 '"' +3
1586 2961 mdecorde
	StrCmp${_FILEFUNC_S} $3 `'` +2
1587 2961 mdecorde
	StrCmp${_FILEFUNC_S} $3 '`' 0 FileFunc_GetOptions${_FILEFUNC_S}_end
1588 2961 mdecorde
	StrCpy $0 $0 -1 1
1589 2961 mdecorde
	goto FileFunc_GetOptions${_FILEFUNC_S}_end
1590 2961 mdecorde
1591 2961 mdecorde
	FileFunc_GetOptions${_FILEFUNC_S}_notfound:
1592 2961 mdecorde
	SetErrors
1593 2961 mdecorde
	StrCpy $0 ''
1594 2961 mdecorde
1595 2961 mdecorde
	FileFunc_GetOptions${_FILEFUNC_S}_end:
1596 2961 mdecorde
	Pop $7
1597 2961 mdecorde
	Pop $6
1598 2961 mdecorde
	Pop $5
1599 2961 mdecorde
	Pop $4
1600 2961 mdecorde
	Pop $3
1601 2961 mdecorde
	Pop $2
1602 2961 mdecorde
	Pop $1
1603 2961 mdecorde
	Exch $0
1604 2961 mdecorde
1605 2961 mdecorde
!macroend
1606 2961 mdecorde
1607 2961 mdecorde
!define GetOptions `!insertmacro GetOptionsCall`
1608 2961 mdecorde
!define un.GetOptions `!insertmacro GetOptionsCall`
1609 2961 mdecorde
1610 2961 mdecorde
!macro GetOptions
1611 2961 mdecorde
!macroend
1612 2961 mdecorde
1613 2961 mdecorde
!macro un.GetOptions
1614 2961 mdecorde
!macroend
1615 2961 mdecorde
1616 2961 mdecorde
!macro GetOptions_
1617 2961 mdecorde
	!verbose push
1618 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
1619 2961 mdecorde
1620 2961 mdecorde
	!insertmacro GetOptionsBody ''
1621 2961 mdecorde
1622 2961 mdecorde
	!verbose pop
1623 2961 mdecorde
!macroend
1624 2961 mdecorde
1625 2961 mdecorde
!define GetOptionsS `!insertmacro GetOptionsSCall`
1626 2961 mdecorde
!define un.GetOptionsS `!insertmacro GetOptionsSCall`
1627 2961 mdecorde
1628 2961 mdecorde
!macro GetOptionsS
1629 2961 mdecorde
!macroend
1630 2961 mdecorde
1631 2961 mdecorde
!macro un.GetOptionsS
1632 2961 mdecorde
!macroend
1633 2961 mdecorde
1634 2961 mdecorde
!macro GetOptionsS_
1635 2961 mdecorde
	!verbose push
1636 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
1637 2961 mdecorde
1638 2961 mdecorde
	!insertmacro GetOptionsBody 'S'
1639 2961 mdecorde
1640 2961 mdecorde
	!verbose pop
1641 2961 mdecorde
!macroend
1642 2961 mdecorde
1643 2961 mdecorde
!define GetRoot `!insertmacro GetRootCall`
1644 2961 mdecorde
!define un.GetRoot `!insertmacro GetRootCall`
1645 2961 mdecorde
1646 2961 mdecorde
!macro GetRoot
1647 2961 mdecorde
!macroend
1648 2961 mdecorde
1649 2961 mdecorde
!macro un.GetRoot
1650 2961 mdecorde
!macroend
1651 2961 mdecorde
1652 2961 mdecorde
!macro GetRoot_
1653 2961 mdecorde
	!verbose push
1654 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
1655 2961 mdecorde
1656 2961 mdecorde
	Exch $0
1657 2961 mdecorde
	Push $1
1658 2961 mdecorde
	Push $2
1659 2961 mdecorde
	Push $3
1660 2961 mdecorde
1661 2961 mdecorde
	StrCpy $1 $0 2
1662 2961 mdecorde
	StrCmp $1 '\\' FileFunc_GetRoot_UNC
1663 2961 mdecorde
	StrCpy $2 $1 1 1
1664 2961 mdecorde
	StrCmp $2 ':' 0 FileFunc_GetRoot_empty
1665 2961 mdecorde
	StrCpy $0 $1
1666 2961 mdecorde
	goto FileFunc_GetRoot_end
1667 2961 mdecorde
1668 2961 mdecorde
	FileFunc_GetRoot_UNC:
1669 2961 mdecorde
	StrCpy $2 1
1670 2961 mdecorde
	StrCpy $3 ''
1671 2961 mdecorde
1672 2961 mdecorde
	FileFunc_GetRoot_loop:
1673 2961 mdecorde
	IntOp $2 $2 + 1
1674 2961 mdecorde
	StrCpy $1 $0 1 $2
1675 2961 mdecorde
	StrCmp $1$3 '' FileFunc_GetRoot_empty
1676 2961 mdecorde
	StrCmp $1 '' +5
1677 2961 mdecorde
	StrCmp $1 '\' 0 FileFunc_GetRoot_loop
1678 2961 mdecorde
	StrCmp $3 '1' +3
1679 2961 mdecorde
	StrCpy $3 '1'
1680 2961 mdecorde
	goto FileFunc_GetRoot_loop
1681 2961 mdecorde
	StrCpy $0 $0 $2
1682 2961 mdecorde
	StrCpy $2 $0 1 -1
1683 2961 mdecorde
	StrCmp $2 '\' 0 FileFunc_GetRoot_end
1684 2961 mdecorde
1685 2961 mdecorde
	FileFunc_GetRoot_empty:
1686 2961 mdecorde
	StrCpy $0 ''
1687 2961 mdecorde
1688 2961 mdecorde
	FileFunc_GetRoot_end:
1689 2961 mdecorde
	Pop $3
1690 2961 mdecorde
	Pop $2
1691 2961 mdecorde
	Pop $1
1692 2961 mdecorde
	Exch $0
1693 2961 mdecorde
1694 2961 mdecorde
	!verbose pop
1695 2961 mdecorde
!macroend
1696 2961 mdecorde
1697 2961 mdecorde
!define GetParent `!insertmacro GetParentCall`
1698 2961 mdecorde
!define un.GetParent `!insertmacro GetParentCall`
1699 2961 mdecorde
1700 2961 mdecorde
!macro GetParent
1701 2961 mdecorde
!macroend
1702 2961 mdecorde
1703 2961 mdecorde
!macro un.GetParent
1704 2961 mdecorde
!macroend
1705 2961 mdecorde
1706 2961 mdecorde
!macro GetParent_
1707 2961 mdecorde
	!verbose push
1708 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
1709 2961 mdecorde
1710 2961 mdecorde
	Exch $0
1711 2961 mdecorde
	Push $1
1712 2961 mdecorde
	Push $2
1713 2961 mdecorde
1714 2961 mdecorde
	StrCpy $2 $0 1 -1
1715 2961 mdecorde
	StrCmp $2 '\' 0 +3
1716 2961 mdecorde
	StrCpy $0 $0 -1
1717 2961 mdecorde
	goto -3
1718 2961 mdecorde
1719 2961 mdecorde
	StrCpy $1 0
1720 2961 mdecorde
	IntOp $1 $1 - 1
1721 2961 mdecorde
	StrCpy $2 $0 1 $1
1722 2961 mdecorde
	StrCmp $2 '\' +2
1723 2961 mdecorde
	StrCmp $2 '' 0 -3
1724 2961 mdecorde
	StrCpy $0 $0 $1
1725 2961 mdecorde
1726 2961 mdecorde
	Pop $2
1727 2961 mdecorde
	Pop $1
1728 2961 mdecorde
	Exch $0
1729 2961 mdecorde
1730 2961 mdecorde
	!verbose pop
1731 2961 mdecorde
!macroend
1732 2961 mdecorde
1733 2961 mdecorde
!define GetFileName `!insertmacro GetFileNameCall`
1734 2961 mdecorde
!define un.GetFileName `!insertmacro GetFileNameCall`
1735 2961 mdecorde
1736 2961 mdecorde
!macro GetFileName
1737 2961 mdecorde
!macroend
1738 2961 mdecorde
1739 2961 mdecorde
!macro un.GetFileName
1740 2961 mdecorde
!macroend
1741 2961 mdecorde
1742 2961 mdecorde
!macro GetFileName_
1743 2961 mdecorde
	!verbose push
1744 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
1745 2961 mdecorde
1746 2961 mdecorde
	Exch $0
1747 2961 mdecorde
	Push $1
1748 2961 mdecorde
	Push $2
1749 2961 mdecorde
1750 2961 mdecorde
	StrCpy $2 $0 1 -1
1751 2961 mdecorde
	StrCmp $2 '\' 0 +3
1752 2961 mdecorde
	StrCpy $0 $0 -1
1753 2961 mdecorde
	goto -3
1754 2961 mdecorde
1755 2961 mdecorde
	StrCpy $1 0
1756 2961 mdecorde
	IntOp $1 $1 - 1
1757 2961 mdecorde
	StrCpy $2 $0 1 $1
1758 2961 mdecorde
	StrCmp $2 '' FileFunc_GetFileName_end
1759 2961 mdecorde
	StrCmp $2 '\' 0 -3
1760 2961 mdecorde
	IntOp $1 $1 + 1
1761 2961 mdecorde
	StrCpy $0 $0 '' $1
1762 2961 mdecorde
1763 2961 mdecorde
	FileFunc_GetFileName_end:
1764 2961 mdecorde
	Pop $2
1765 2961 mdecorde
	Pop $1
1766 2961 mdecorde
	Exch $0
1767 2961 mdecorde
1768 2961 mdecorde
	!verbose pop
1769 2961 mdecorde
!macroend
1770 2961 mdecorde
1771 2961 mdecorde
!define GetBaseName `!insertmacro GetBaseNameCall`
1772 2961 mdecorde
!define un.GetBaseName `!insertmacro GetBaseNameCall`
1773 2961 mdecorde
1774 2961 mdecorde
!macro GetBaseName
1775 2961 mdecorde
!macroend
1776 2961 mdecorde
1777 2961 mdecorde
!macro un.GetBaseName
1778 2961 mdecorde
!macroend
1779 2961 mdecorde
1780 2961 mdecorde
!macro GetBaseName_
1781 2961 mdecorde
	!verbose push
1782 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
1783 2961 mdecorde
1784 2961 mdecorde
	Exch $0
1785 2961 mdecorde
	Push $1
1786 2961 mdecorde
	Push $2
1787 2961 mdecorde
	Push $3
1788 2961 mdecorde
1789 2961 mdecorde
	StrCpy $1 0
1790 2961 mdecorde
	StrCpy $3 ''
1791 2961 mdecorde
1792 2961 mdecorde
	FileFunc_GetBaseName_loop:
1793 2961 mdecorde
	IntOp $1 $1 - 1
1794 2961 mdecorde
	StrCpy $2 $0 1 $1
1795 2961 mdecorde
	StrCmp $2 '' FileFunc_GetBaseName_trimpath
1796 2961 mdecorde
	StrCmp $2 '\' FileFunc_GetBaseName_trimpath
1797 2961 mdecorde
	StrCmp $3 'noext' FileFunc_GetBaseName_loop
1798 2961 mdecorde
	StrCmp $2 '.' 0 FileFunc_GetBaseName_loop
1799 2961 mdecorde
	StrCpy $0 $0 $1
1800 2961 mdecorde
	StrCpy $3 'noext'
1801 2961 mdecorde
	StrCpy $1 0
1802 2961 mdecorde
	goto FileFunc_GetBaseName_loop
1803 2961 mdecorde
1804 2961 mdecorde
	FileFunc_GetBaseName_trimpath:
1805 2961 mdecorde
	StrCmp $1 -1 FileFunc_GetBaseName_empty
1806 2961 mdecorde
	IntOp $1 $1 + 1
1807 2961 mdecorde
	StrCpy $0 $0 '' $1
1808 2961 mdecorde
	goto FileFunc_GetBaseName_end
1809 2961 mdecorde
1810 2961 mdecorde
	FileFunc_GetBaseName_empty:
1811 2961 mdecorde
	StrCpy $0 ''
1812 2961 mdecorde
1813 2961 mdecorde
	FileFunc_GetBaseName_end:
1814 2961 mdecorde
	Pop $3
1815 2961 mdecorde
	Pop $2
1816 2961 mdecorde
	Pop $1
1817 2961 mdecorde
	Exch $0
1818 2961 mdecorde
1819 2961 mdecorde
	!verbose pop
1820 2961 mdecorde
!macroend
1821 2961 mdecorde
1822 2961 mdecorde
!define GetFileExt `!insertmacro GetFileExtCall`
1823 2961 mdecorde
!define un.GetFileExt `!insertmacro GetFileExtCall`
1824 2961 mdecorde
1825 2961 mdecorde
!macro GetFileExt
1826 2961 mdecorde
!macroend
1827 2961 mdecorde
1828 2961 mdecorde
!macro un.GetFileExt
1829 2961 mdecorde
!macroend
1830 2961 mdecorde
1831 2961 mdecorde
!macro GetFileExt_
1832 2961 mdecorde
	!verbose push
1833 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
1834 2961 mdecorde
1835 2961 mdecorde
	Exch $0
1836 2961 mdecorde
	Push $1
1837 2961 mdecorde
	Push $2
1838 2961 mdecorde
1839 2961 mdecorde
	StrCpy $1 0
1840 2961 mdecorde
1841 2961 mdecorde
	FileFunc_GetFileExt_loop:
1842 2961 mdecorde
	IntOp $1 $1 - 1
1843 2961 mdecorde
	StrCpy $2 $0 1 $1
1844 2961 mdecorde
	StrCmp $2 '' FileFunc_GetFileExt_empty
1845 2961 mdecorde
	StrCmp $2 '\' FileFunc_GetFileExt_empty
1846 2961 mdecorde
	StrCmp $2 '.' 0 FileFunc_GetFileExt_loop
1847 2961 mdecorde
1848 2961 mdecorde
	StrCmp $1 -1 FileFunc_GetFileExt_empty
1849 2961 mdecorde
	IntOp $1 $1 + 1
1850 2961 mdecorde
	StrCpy $0 $0 '' $1
1851 2961 mdecorde
	goto FileFunc_GetFileExt_end
1852 2961 mdecorde
1853 2961 mdecorde
	FileFunc_GetFileExt_empty:
1854 2961 mdecorde
	StrCpy $0 ''
1855 2961 mdecorde
1856 2961 mdecorde
	FileFunc_GetFileExt_end:
1857 2961 mdecorde
	Pop $2
1858 2961 mdecorde
	Pop $1
1859 2961 mdecorde
	Exch $0
1860 2961 mdecorde
1861 2961 mdecorde
	!verbose pop
1862 2961 mdecorde
!macroend
1863 2961 mdecorde
1864 2961 mdecorde
!define BannerTrimPath `!insertmacro BannerTrimPathCall`
1865 2961 mdecorde
!define un.BannerTrimPath `!insertmacro BannerTrimPathCall`
1866 2961 mdecorde
1867 2961 mdecorde
!macro BannerTrimPath
1868 2961 mdecorde
!macroend
1869 2961 mdecorde
1870 2961 mdecorde
!macro un.BannerTrimPath
1871 2961 mdecorde
!macroend
1872 2961 mdecorde
1873 2961 mdecorde
!macro BannerTrimPath_
1874 2961 mdecorde
	!verbose push
1875 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
1876 2961 mdecorde
1877 2961 mdecorde
	Exch $1
1878 2961 mdecorde
	Exch
1879 2961 mdecorde
	Exch $0
1880 2961 mdecorde
	Exch
1881 2961 mdecorde
	Push $2
1882 2961 mdecorde
	Push $3
1883 2961 mdecorde
	Push $4
1884 2961 mdecorde
1885 2961 mdecorde
	StrCpy $3 $1 1 -1
1886 2961 mdecorde
	IntOp $1 $1 + 0
1887 2961 mdecorde
	StrLen $2 $0
1888 2961 mdecorde
	IntCmp $2 $1 FileFunc_BannerTrimPath_end FileFunc_BannerTrimPath_end
1889 2961 mdecorde
	IntOp $1 $1 - 3
1890 2961 mdecorde
	IntCmp $1 0 FileFunc_BannerTrimPath_empty FileFunc_BannerTrimPath_empty
1891 2961 mdecorde
	StrCmp $3 'A' FileFunc_BannerTrimPath_A-trim
1892 2961 mdecorde
	StrCmp $3 'B' FileFunc_BannerTrimPath_B-trim
1893 2961 mdecorde
	StrCmp $3 'C' FileFunc_BannerTrimPath_C-trim
1894 2961 mdecorde
	StrCmp $3 'D' FileFunc_BannerTrimPath_D-trim
1895 2961 mdecorde
1896 2961 mdecorde
	FileFunc_BannerTrimPath_A-trim:
1897 2961 mdecorde
	StrCpy $3 $0 1 1
1898 2961 mdecorde
	StrCpy $2 0
1899 2961 mdecorde
	StrCmp $3 ':' 0 +2
1900 2961 mdecorde
	IntOp $2 $2 + 2
1901 2961 mdecorde
1902 2961 mdecorde
	FileFunc_BannerTrimPath_loopleft:
1903 2961 mdecorde
	IntOp $2 $2 + 1
1904 2961 mdecorde
	StrCpy $3 $0 1 $2
1905 2961 mdecorde
	StrCmp $2 $1 FileFunc_BannerTrimPath_C-trim
1906 2961 mdecorde
	StrCmp $3 '\' 0 FileFunc_BannerTrimPath_loopleft
1907 2961 mdecorde
	StrCpy $3 $0 $2
1908 2961 mdecorde
	IntOp $2 $2 - $1
1909 2961 mdecorde
	IntCmp $2 0 FileFunc_BannerTrimPath_B-trim 0 FileFunc_BannerTrimPath_B-trim
1910 2961 mdecorde
1911 2961 mdecorde
	FileFunc_BannerTrimPath_loopright:
1912 2961 mdecorde
	IntOp $2 $2 + 1
1913 2961 mdecorde
	StrCpy $4 $0 1 $2
1914 2961 mdecorde
	StrCmp $2 0 FileFunc_BannerTrimPath_B-trim
1915 2961 mdecorde
	StrCmp $4 '\' 0 FileFunc_BannerTrimPath_loopright
1916 2961 mdecorde
	StrCpy $4 $0 '' $2
1917 2961 mdecorde
	StrCpy $0 '$3\...$4'
1918 2961 mdecorde
	goto FileFunc_BannerTrimPath_end
1919 2961 mdecorde
1920 2961 mdecorde
	FileFunc_BannerTrimPath_B-trim:
1921 2961 mdecorde
	StrCpy $2 $1
1922 2961 mdecorde
	IntOp $2 $2 - 1
1923 2961 mdecorde
	StrCmp $2 -1 FileFunc_BannerTrimPath_C-trim
1924 2961 mdecorde
	StrCpy $3 $0 1 $2
1925 2961 mdecorde
	StrCmp $3 '\' 0 -3
1926 2961 mdecorde
	StrCpy $0 $0 $2
1927 2961 mdecorde
	StrCpy $0 '$0\...'
1928 2961 mdecorde
	goto FileFunc_BannerTrimPath_end
1929 2961 mdecorde
1930 2961 mdecorde
	FileFunc_BannerTrimPath_C-trim:
1931 2961 mdecorde
	StrCpy $0 $0 $1
1932 2961 mdecorde
	StrCpy $0 '$0...'
1933 2961 mdecorde
	goto FileFunc_BannerTrimPath_end
1934 2961 mdecorde
1935 2961 mdecorde
	FileFunc_BannerTrimPath_D-trim:
1936 2961 mdecorde
	StrCpy $3 -1
1937 2961 mdecorde
	IntOp $3 $3 - 1
1938 2961 mdecorde
	StrCmp $3 -$2 FileFunc_BannerTrimPath_C-trim
1939 2961 mdecorde
	StrCpy $4 $0 1 $3
1940 2961 mdecorde
	StrCmp $4 '\' 0 -3
1941 2961 mdecorde
	StrCpy $4 $0 '' $3
1942 2961 mdecorde
	IntOp $3 $1 + $3
1943 2961 mdecorde
	IntCmp $3 2 FileFunc_BannerTrimPath_C-trim FileFunc_BannerTrimPath_C-trim
1944 2961 mdecorde
	StrCpy $0 $0 $3
1945 2961 mdecorde
	StrCpy $0 '$0...$4'
1946 2961 mdecorde
	goto FileFunc_BannerTrimPath_end
1947 2961 mdecorde
1948 2961 mdecorde
	FileFunc_BannerTrimPath_empty:
1949 2961 mdecorde
	StrCpy $0 ''
1950 2961 mdecorde
1951 2961 mdecorde
	FileFunc_BannerTrimPath_end:
1952 2961 mdecorde
	Pop $4
1953 2961 mdecorde
	Pop $3
1954 2961 mdecorde
	Pop $2
1955 2961 mdecorde
	Pop $1
1956 2961 mdecorde
	Exch $0
1957 2961 mdecorde
1958 2961 mdecorde
	!verbose pop
1959 2961 mdecorde
!macroend
1960 2961 mdecorde
1961 2961 mdecorde
!define DirState `!insertmacro DirStateCall`
1962 2961 mdecorde
!define un.DirState `!insertmacro DirStateCall`
1963 2961 mdecorde
1964 2961 mdecorde
!macro DirState
1965 2961 mdecorde
!macroend
1966 2961 mdecorde
1967 2961 mdecorde
!macro un.DirState
1968 2961 mdecorde
!macroend
1969 2961 mdecorde
1970 2961 mdecorde
!macro DirState_
1971 2961 mdecorde
	!verbose push
1972 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
1973 2961 mdecorde
1974 2961 mdecorde
	Exch $0
1975 2961 mdecorde
	Push $1
1976 2961 mdecorde
	ClearErrors
1977 2961 mdecorde
1978 2961 mdecorde
	FindFirst $1 $0 '$0\*.*'
1979 2961 mdecorde
	IfErrors 0 +3
1980 2961 mdecorde
	StrCpy $0 -1
1981 2961 mdecorde
	goto FileFunc_DirState_end
1982 2961 mdecorde
	StrCmp $0 '.' 0 +4
1983 2961 mdecorde
	FindNext $1 $0
1984 2961 mdecorde
	StrCmp $0 '..' 0 +2
1985 2961 mdecorde
	FindNext $1 $0
1986 2961 mdecorde
	FindClose $1
1987 2961 mdecorde
	IfErrors 0 +3
1988 2961 mdecorde
	StrCpy $0 0
1989 2961 mdecorde
	goto FileFunc_DirState_end
1990 2961 mdecorde
	StrCpy $0 1
1991 2961 mdecorde
1992 2961 mdecorde
	FileFunc_DirState_end:
1993 2961 mdecorde
	Pop $1
1994 2961 mdecorde
	Exch $0
1995 2961 mdecorde
1996 2961 mdecorde
	!verbose pop
1997 2961 mdecorde
!macroend
1998 2961 mdecorde
1999 2961 mdecorde
!define RefreshShellIcons `!insertmacro RefreshShellIconsCall`
2000 2961 mdecorde
!define un.RefreshShellIcons `!insertmacro RefreshShellIconsCall`
2001 2961 mdecorde
2002 2961 mdecorde
!macro RefreshShellIcons
2003 2961 mdecorde
!macroend
2004 2961 mdecorde
2005 2961 mdecorde
!macro un.RefreshShellIcons
2006 2961 mdecorde
!macroend
2007 2961 mdecorde
2008 2961 mdecorde
!macro RefreshShellIcons_
2009 2961 mdecorde
	!verbose push
2010 2961 mdecorde
	!verbose ${_FILEFUNC_VERBOSE}
2011 2961 mdecorde
2012 2961 mdecorde
	System::Call 'shell32::SHChangeNotify(i 0x08000000, i 0, i 0, i 0)'
2013 2961 mdecorde
2014 2961 mdecorde
	!verbose pop
2015 2961 mdecorde
!macroend
2016 2961 mdecorde
2017 2961 mdecorde
!endif