Statistiques
| Révision :

root / tmp / org.txm.setups / nsis / Include / Library.nsh @ 3101

Historique | Voir | Annoter | Télécharger (21,28 ko)

1 728 mdecorde
#
2 728 mdecorde
# Library.nsh
3 728 mdecorde
#
4 728 mdecorde
# A system for the installation and uninstallation of dynamic
5 728 mdecorde
# link libraries (DLL) and type libraries (TLB). Using this
6 728 mdecorde
# system you can handle the complete setup with one single
7 728 mdecorde
# line of code:
8 728 mdecorde
#
9 728 mdecorde
#  * File copying
10 728 mdecorde
#  * File copying on reboot
11 728 mdecorde
#  * Version checks
12 728 mdecorde
#  * Registration and unregistration
13 728 mdecorde
#  * Registration and unregistration on reboot
14 728 mdecorde
#  * Shared DLL counting
15 728 mdecorde
#  * Windows File Protection checks
16 728 mdecorde
#
17 728 mdecorde
# For more information, read appendix B in the documentation.
18 728 mdecorde
#
19 728 mdecorde
20 728 mdecorde
!verbose push
21 728 mdecorde
!verbose 3
22 728 mdecorde
23 728 mdecorde
!ifndef LIB_INCLUDED
24 728 mdecorde
25 728 mdecorde
!define LIB_INCLUDED
26 728 mdecorde
27 728 mdecorde
!ifndef SHCNE_ASSOCCHANGED
28 728 mdecorde
  !define SHCNE_ASSOCCHANGED 0x08000000
29 728 mdecorde
!endif
30 728 mdecorde
!ifndef SHCNF_IDLIST
31 728 mdecorde
  !define SHCNF_IDLIST 0x0000
32 728 mdecorde
!endif
33 728 mdecorde
34 728 mdecorde
!define REGTOOL_VERSION v3
35 728 mdecorde
!define REGTOOL_KEY NSIS.Library.RegTool.${REGTOOL_VERSION}
36 728 mdecorde
37 728 mdecorde
!include LogicLib.nsh
38 728 mdecorde
!include x64.nsh
39 728 mdecorde
40 728 mdecorde
### GetParent macro, don't pass $1 or $2 as INTPUT or OUTPUT
41 728 mdecorde
!macro __InstallLib_Helper_GetParent INPUT OUTPUT
42 728 mdecorde
43 728 mdecorde
  # Copied from FileFunc.nsh
44 728 mdecorde
45 728 mdecorde
  StrCpy ${OUTPUT} ${INPUT}
46 728 mdecorde
47 728 mdecorde
  Push $1
48 728 mdecorde
  Push $2
49 728 mdecorde
50 728 mdecorde
  StrCpy $2 ${OUTPUT} 1 -1
51 728 mdecorde
  StrCmp $2 '\' 0 +3
52 728 mdecorde
  StrCpy ${OUTPUT} ${OUTPUT} -1
53 728 mdecorde
  goto -3
54 728 mdecorde
55 728 mdecorde
  StrCpy $1 0
56 728 mdecorde
  IntOp $1 $1 - 1
57 728 mdecorde
  StrCpy $2 ${OUTPUT} 1 $1
58 728 mdecorde
  StrCmp $2 '\' +2
59 728 mdecorde
  StrCmp $2 '' 0 -3
60 728 mdecorde
  StrCpy ${OUTPUT} ${OUTPUT} $1
61 728 mdecorde
62 728 mdecorde
  Pop $2
63 728 mdecorde
  Pop $1
64 728 mdecorde
65 728 mdecorde
!macroend
66 728 mdecorde
67 728 mdecorde
### Initialize session id (GUID)
68 728 mdecorde
!macro __InstallLib_Helper_InitSession
69 728 mdecorde
70 728 mdecorde
  !ifndef __InstallLib_SessionGUID_Defined
71 728 mdecorde
72 728 mdecorde
    !define __InstallLib_SessionGUID_Defined
73 728 mdecorde
74 728 mdecorde
    Var /GLOBAL __INSTALLLLIB_SESSIONGUID
75 728 mdecorde
76 728 mdecorde
  !endif
77 728 mdecorde
78 728 mdecorde
  !define __InstallLib_Helper_InitSession_Label "Library_${__FILE__}${__LINE__}"
79 728 mdecorde
80 728 mdecorde
  StrCmp $__INSTALLLLIB_SESSIONGUID '' 0 "${__InstallLib_Helper_InitSession_Label}"
81 728 mdecorde
82 728 mdecorde
    System::Call 'ole32::CoCreateGuid(g .s)'
83 728 mdecorde
    Pop $__INSTALLLLIB_SESSIONGUID
84 728 mdecorde
85 728 mdecorde
  "${__InstallLib_Helper_InitSession_Label}:"
86 728 mdecorde
87 728 mdecorde
  !undef __InstallLib_Helper_InitSession_Label
88 728 mdecorde
89 728 mdecorde
!macroend
90 728 mdecorde
91 728 mdecorde
### Add a RegTool entry to register after reboot
92 728 mdecorde
!macro __InstallLib_Helper_AddRegToolEntry mode filename tempdir
93 728 mdecorde
94 728 mdecorde
  Push $R0
95 728 mdecorde
  Push $R1
96 728 mdecorde
  Push $R2
97 728 mdecorde
  Push $R3
98 728 mdecorde
99 728 mdecorde
  ;------------------------
100 728 mdecorde
  ;Copy the parameters
101 728 mdecorde
102 728 mdecorde
  Push "${filename}"
103 728 mdecorde
  Push "${tempdir}"
104 728 mdecorde
105 728 mdecorde
  Pop $R2 ; temporary directory
106 728 mdecorde
  Pop $R1 ; file name to register
107 728 mdecorde
108 728 mdecorde
  ;------------------------
109 728 mdecorde
  ;Initialize session id
110 728 mdecorde
111 728 mdecorde
  !insertmacro __InstallLib_Helper_InitSession
112 728 mdecorde
113 728 mdecorde
  ;------------------------
114 728 mdecorde
  ;Advance counter
115 728 mdecorde
116 728 mdecorde
  StrCpy $R0 0
117 728 mdecorde
  ReadRegDWORD $R0 HKLM "Software\${REGTOOL_KEY}\$__INSTALLLLIB_SESSIONGUID" "count"
118 728 mdecorde
  IntOp $R0 $R0 + 1
119 728 mdecorde
  WriteRegDWORD HKLM "Software\${REGTOOL_KEY}\$__INSTALLLLIB_SESSIONGUID" "count" "$R0"
120 728 mdecorde
121 728 mdecorde
  ;------------------------
122 728 mdecorde
  ;Setup RegTool
123 728 mdecorde
124 2956 mdecorde
  !if ! /FileExists "${NSISDIR}\Bin\RegTool-${NSIS_CPU}.bin"
125 2956 mdecorde
    !error "Missing RegTool for ${NSIS_CPU}!"
126 2956 mdecorde
  !endif
127 2956 mdecorde
128 728 mdecorde
  ReadRegStr $R3 HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" "${REGTOOL_KEY}"
129 728 mdecorde
  StrCpy $R3 $R3 -4 1
130 728 mdecorde
  IfFileExists $R3 +3
131 728 mdecorde
132 2956 mdecorde
    File /oname=$R2\${REGTOOL_KEY}.$__INSTALLLLIB_SESSIONGUID.exe "${NSISDIR}\Bin\RegTool-${NSIS_CPU}.bin"
133 728 mdecorde
    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" \
134 728 mdecorde
      "${REGTOOL_KEY}" '"$R2\${REGTOOL_KEY}.$__INSTALLLLIB_SESSIONGUID.exe" /S'
135 728 mdecorde
136 728 mdecorde
  ;------------------------
137 728 mdecorde
  ;Add RegTool entry
138 728 mdecorde
139 728 mdecorde
  WriteRegStr HKLM "Software\${REGTOOL_KEY}\$__INSTALLLLIB_SESSIONGUID" "$R0.file" "$R1"
140 728 mdecorde
  WriteRegStr HKLM "Software\${REGTOOL_KEY}\$__INSTALLLLIB_SESSIONGUID" "$R0.mode" "${mode}"
141 728 mdecorde
142 728 mdecorde
  Pop $R3
143 728 mdecorde
  Pop $R2
144 728 mdecorde
  Pop $R1
145 728 mdecorde
  Pop $R0
146 728 mdecorde
147 728 mdecorde
!macroend
148 728 mdecorde
149 2956 mdecorde
!macro __InstallLib_Helper_CmpPackedVer64 oldhi oldlo newhi newlo jeq jle jgt
150 728 mdecorde
151 2956 mdecorde
  IntCmpU ${oldhi} ${newhi} "0"      "${jle}" "${jgt}"
152 2956 mdecorde
  IntCmpU ${oldlo} ${newlo} "${jeq}" "${jle}" "${jgt}"
153 728 mdecorde
154 2956 mdecorde
!macroend
155 728 mdecorde
156 2956 mdecorde
### Get library version
157 2956 mdecorde
!macro __InstallLib_Helper_GetVersion TYPE FILE
158 728 mdecorde
159 2956 mdecorde
  !if "${TYPE}" == "D"
160 2956 mdecorde
   !getdllversion /NoErrors /Packed "${FILE}" LIBRARY_VERSION_
161 2956 mdecorde
  !else if "${TYPE}" == "T"
162 2956 mdecorde
    !gettlbversion /NoErrors /Packed "${FILE}" LIBRARY_VERSION_
163 2956 mdecorde
  !endif
164 728 mdecorde
165 2956 mdecorde
  ; Emulate the old LibraryLocal defines
166 2956 mdecorde
  !ifndef LIBRARY_VERSION_HIGH
167 2956 mdecorde
    !define LIBRARY_VERSION_FILENOTFOUND
168 2956 mdecorde
  !else if "${LIBRARY_VERSION_HIGH}" == ""
169 2956 mdecorde
    !define LIBRARY_VERSION_NONE
170 2956 mdecorde
    !undef LIBRARY_VERSION_HIGH
171 2956 mdecorde
    !undef LIBRARY_VERSION_LOW
172 728 mdecorde
  !endif
173 728 mdecorde
174 728 mdecorde
!macroend
175 728 mdecorde
176 728 mdecorde
### Install library
177 728 mdecorde
!macro InstallLib libtype shared install localfile destfile tempbasedir
178 728 mdecorde
179 728 mdecorde
  !verbose push
180 728 mdecorde
  !verbose 3
181 728 mdecorde
182 728 mdecorde
  Push $R0
183 728 mdecorde
  Push $R1
184 728 mdecorde
  Push $R2
185 728 mdecorde
  Push $R3
186 728 mdecorde
  Push $R4
187 728 mdecorde
  Push $R5
188 728 mdecorde
189 728 mdecorde
  ;------------------------
190 728 mdecorde
  ;Define
191 728 mdecorde
192 728 mdecorde
  !define INSTALLLIB_UNIQUE "${__FILE__}${__LINE__}"
193 728 mdecorde
194 728 mdecorde
  !define INSTALLLIB_LIBTYPE_${libtype}
195 728 mdecorde
  !define INSTALLLIB_LIBTYPE_SET INSTALLLIB_LIBTYPE_${libtype}
196 728 mdecorde
  !define INSTALLLIB_SHARED_${shared}
197 728 mdecorde
  !define INSTALLLIB_SHARED_SET INSTALLLIB_SHARED_${shared}
198 728 mdecorde
  !define INSTALLLIB_INSTALL_${install}
199 728 mdecorde
  !define INSTALLLIB_INSTALL_SET INSTALLLIB_INSTALL_${install}
200 728 mdecorde
201 728 mdecorde
  ;------------------------
202 728 mdecorde
  ;Validate
203 728 mdecorde
204 728 mdecorde
  !ifndef INSTALLLIB_LIBTYPE_DLL & INSTALLLIB_LIBTYPE_REGDLL & INSTALLLIB_LIBTYPE_TLB & \
205 728 mdecorde
    INSTALLLIB_LIBTYPE_REGDLLTLB & INSTALLLIB_LIBTYPE_REGEXE
206 728 mdecorde
    !error "InstallLib: Incorrect setting for parameter: libtype"
207 728 mdecorde
  !endif
208 728 mdecorde
209 728 mdecorde
  !ifndef INSTALLLIB_INSTALL_REBOOT_PROTECTED & INSTALLLIB_INSTALL_REBOOT_NOTPROTECTED & \
210 728 mdecorde
    INSTALLLIB_INSTALL_NOREBOOT_PROTECTED & INSTALLLIB_INSTALL_NOREBOOT_NOTPROTECTED
211 728 mdecorde
    !error "InstallLib: Incorrect setting for parameter: install"
212 728 mdecorde
  !endif
213 728 mdecorde
214 728 mdecorde
  ;------------------------
215 728 mdecorde
  ;x64 settings
216 728 mdecorde
217 728 mdecorde
  !ifdef LIBRARY_X64
218 728 mdecorde
219 728 mdecorde
    ${DisableX64FSRedirection}
220 728 mdecorde
221 728 mdecorde
  !endif
222 728 mdecorde
223 728 mdecorde
  ;------------------------
224 728 mdecorde
  ;Copy the parameters used on run-time to a variable
225 728 mdecorde
  ;This allows the usage of variables as parameter
226 728 mdecorde
227 728 mdecorde
  StrCpy $R4 "${destfile}"
228 728 mdecorde
  StrCpy $R5 "${tempbasedir}"
229 728 mdecorde
230 728 mdecorde
  ;------------------------
231 728 mdecorde
  ;Shared library count
232 728 mdecorde
233 728 mdecorde
  !ifndef INSTALLLIB_SHARED_NOTSHARED
234 728 mdecorde
235 728 mdecorde
    StrCmp ${shared} "" 0 "installlib.noshareddllincrease_${INSTALLLIB_UNIQUE}"
236 728 mdecorde
237 728 mdecorde
      !ifdef LIBRARY_X64
238 728 mdecorde
239 728 mdecorde
        SetRegView 64
240 728 mdecorde
241 728 mdecorde
      !endif
242 728 mdecorde
243 728 mdecorde
      ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R4
244 728 mdecorde
      ClearErrors
245 728 mdecorde
      IntOp $R0 $R0 + 1
246 728 mdecorde
      WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R4 $R0
247 728 mdecorde
248 728 mdecorde
      !ifdef LIBRARY_X64
249 728 mdecorde
250 728 mdecorde
        SetRegView lastused
251 728 mdecorde
252 728 mdecorde
      !endif
253 728 mdecorde
254 728 mdecorde
    "installlib.noshareddllincrease_${INSTALLLIB_UNIQUE}:"
255 728 mdecorde
256 728 mdecorde
  !endif
257 728 mdecorde
258 728 mdecorde
  ;------------------------
259 728 mdecorde
  ;Check Windows File Protection
260 728 mdecorde
261 728 mdecorde
  !ifdef INSTALLLIB_INSTALL_REBOOT_PROTECTED | INSTALLLIB_INSTALL_NOREBOOT_PROTECTED
262 728 mdecorde
263 728 mdecorde
    !define LIBRARY_DEFINE_DONE_LABEL
264 728 mdecorde
265 728 mdecorde
    System::Call "sfc::SfcIsFileProtected(i 0, w R4) i.R0"
266 728 mdecorde
267 728 mdecorde
      StrCmp $R0 "error" "installlib.notprotected_${INSTALLLIB_UNIQUE}"
268 728 mdecorde
      StrCmp $R0 "0" "installlib.notprotected_${INSTALLLIB_UNIQUE}"
269 728 mdecorde
270 728 mdecorde
    Goto "installlib.done_${INSTALLLIB_UNIQUE}"
271 728 mdecorde
272 728 mdecorde
    "installlib.notprotected_${INSTALLLIB_UNIQUE}:"
273 728 mdecorde
274 728 mdecorde
  !endif
275 728 mdecorde
276 728 mdecorde
  ;------------------------
277 728 mdecorde
  ;Check file
278 728 mdecorde
279 728 mdecorde
  IfFileExists $R4 0 "installlib.copy_${INSTALLLIB_UNIQUE}"
280 728 mdecorde
281 728 mdecorde
  ;------------------------
282 728 mdecorde
  ;Get version information
283 728 mdecorde
284 728 mdecorde
  !ifndef LIBRARY_IGNORE_VERSION
285 728 mdecorde
286 728 mdecorde
    !insertmacro __InstallLib_Helper_GetVersion D "${LOCALFILE}"
287 728 mdecorde
288 728 mdecorde
    !ifdef LIBRARY_VERSION_FILENOTFOUND
289 728 mdecorde
      !error "InstallLib: The library ${LOCALFILE} could not be found."
290 728 mdecorde
    !endif
291 728 mdecorde
292 728 mdecorde
    !ifndef LIBRARY_VERSION_NONE
293 728 mdecorde
294 728 mdecorde
      !define LIBRARY_DEFINE_UPGRADE_LABEL
295 728 mdecorde
      !define LIBRARY_DEFINE_REGISTER_LABEL
296 728 mdecorde
297 728 mdecorde
      StrCpy $R0 ${LIBRARY_VERSION_HIGH}
298 728 mdecorde
      StrCpy $R1 ${LIBRARY_VERSION_LOW}
299 728 mdecorde
300 728 mdecorde
      GetDLLVersion $R4 $R2 $R3
301 728 mdecorde
302 728 mdecorde
      !undef LIBRARY_VERSION_HIGH
303 728 mdecorde
      !undef LIBRARY_VERSION_LOW
304 728 mdecorde
305 728 mdecorde
      !ifndef INSTALLLIB_LIBTYPE_TLB & INSTALLLIB_LIBTYPE_REGDLLTLB
306 728 mdecorde
307 2956 mdecorde
        !ifdef LIBRARY_INSTALL_EQUAL_VERSION
308 2956 mdecorde
          !insertmacro __InstallLib_Helper_CmpPackedVer64 $R0 $R1 $R2 $R3 "installlib.upgrade_${INSTALLLIB_UNIQUE}" \
309 2956 mdecorde
            "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
310 2956 mdecorde
        !else
311 2956 mdecorde
          !insertmacro __InstallLib_Helper_CmpPackedVer64 $R0 $R1 $R2 $R3 "installlib.register_${INSTALLLIB_UNIQUE}" \
312 2956 mdecorde
            "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
313 2956 mdecorde
        !endif
314 728 mdecorde
315 728 mdecorde
      !else
316 728 mdecorde
317 728 mdecorde
        !insertmacro __InstallLib_Helper_GetVersion T "${LOCALFILE}"
318 728 mdecorde
319 728 mdecorde
        !ifdef LIBRARY_VERSION_FILENOTFOUND
320 728 mdecorde
          !error "InstallLib: The library ${LOCALFILE} could not be found."
321 728 mdecorde
        !endif
322 728 mdecorde
323 728 mdecorde
        !ifndef LIBRARY_VERSION_NONE
324 728 mdecorde
325 2956 mdecorde
          !insertmacro __InstallLib_Helper_CmpPackedVer64 $R0 $R1 $R2 $R3 0 \
326 2956 mdecorde
            "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
327 728 mdecorde
328 728 mdecorde
        !else
329 728 mdecorde
330 2956 mdecorde
          !ifdef LIBRARY_INSTALL_EQUAL_VERSION
331 2956 mdecorde
            !insertmacro __InstallLib_Helper_CmpPackedVer64 $R0 $R1 $R2 $R3 "installlib.upgrade_${INSTALLLIB_UNIQUE}" \
332 2956 mdecorde
              "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
333 2956 mdecorde
          !else
334 2956 mdecorde
            !insertmacro __InstallLib_Helper_CmpPackedVer64 $R0 $R1 $R2 $R3 "installlib.register_${INSTALLLIB_UNIQUE}" \
335 2956 mdecorde
              "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
336 2956 mdecorde
          !endif
337 728 mdecorde
338 728 mdecorde
        !endif
339 728 mdecorde
340 728 mdecorde
      !endif
341 728 mdecorde
342 728 mdecorde
    !else
343 728 mdecorde
344 728 mdecorde
      !undef LIBRARY_VERSION_NONE
345 728 mdecorde
346 728 mdecorde
      !ifdef INSTALLLIB_LIBTYPE_TLB | INSTALLLIB_LIBTYPE_REGDLLTLB
347 728 mdecorde
348 728 mdecorde
        !insertmacro __InstallLib_Helper_GetVersion T "${LOCALFILE}"
349 728 mdecorde
350 728 mdecorde
      !endif
351 728 mdecorde
352 728 mdecorde
    !endif
353 728 mdecorde
354 728 mdecorde
    !ifdef INSTALLLIB_LIBTYPE_TLB | INSTALLLIB_LIBTYPE_REGDLLTLB
355 728 mdecorde
356 728 mdecorde
      !ifndef LIBRARY_VERSION_NONE
357 728 mdecorde
358 728 mdecorde
        !ifndef LIBRARY_DEFINE_UPGRADE_LABEL
359 728 mdecorde
360 728 mdecorde
          !define LIBRARY_DEFINE_UPGRADE_LABEL
361 728 mdecorde
362 728 mdecorde
        !endif
363 728 mdecorde
364 728 mdecorde
        !ifndef LIBRARY_DEFINE_REGISTER_LABEL
365 728 mdecorde
366 728 mdecorde
          !define LIBRARY_DEFINE_REGISTER_LABEL
367 728 mdecorde
368 728 mdecorde
        !endif
369 728 mdecorde
370 728 mdecorde
        StrCpy $R0 ${LIBRARY_VERSION_HIGH}
371 728 mdecorde
        StrCpy $R1 ${LIBRARY_VERSION_LOW}
372 728 mdecorde
373 728 mdecorde
        TypeLib::GetLibVersion $R4
374 728 mdecorde
        Pop $R3
375 728 mdecorde
        Pop $R2
376 728 mdecorde
377 2956 mdecorde
        !ifdef LIBRARY_INSTALL_EQUAL_VERSION
378 2956 mdecorde
          !insertmacro __InstallLib_Helper_CmpPackedVer64 $R0 $R1 $R2 $R3 "installlib.upgrade_${INSTALLLIB_UNIQUE}" \
379 2956 mdecorde
            "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
380 2956 mdecorde
        !else
381 2956 mdecorde
          !insertmacro __InstallLib_Helper_CmpPackedVer64 $R0 $R1 $R2 $R3 "installlib.register_${INSTALLLIB_UNIQUE}" \
382 2956 mdecorde
            "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
383 2956 mdecorde
        !endif
384 728 mdecorde
385 728 mdecorde
        !undef LIBRARY_VERSION_HIGH
386 728 mdecorde
        !undef LIBRARY_VERSION_LOW
387 728 mdecorde
388 728 mdecorde
      !else
389 728 mdecorde
390 728 mdecorde
        !undef LIBRARY_VERSION_NONE
391 728 mdecorde
392 728 mdecorde
      !endif
393 728 mdecorde
394 728 mdecorde
    !endif
395 728 mdecorde
396 2956 mdecorde
  !endif ;~LIBRARY_IGNORE_VERSION
397 728 mdecorde
398 728 mdecorde
  ;------------------------
399 728 mdecorde
  ;Upgrade
400 728 mdecorde
401 728 mdecorde
  !ifdef LIBRARY_DEFINE_UPGRADE_LABEL
402 728 mdecorde
403 728 mdecorde
    !undef LIBRARY_DEFINE_UPGRADE_LABEL
404 728 mdecorde
405 728 mdecorde
    "installlib.upgrade_${INSTALLLIB_UNIQUE}:"
406 728 mdecorde
407 728 mdecorde
  !endif
408 728 mdecorde
409 728 mdecorde
  ;------------------------
410 728 mdecorde
  ;Copy
411 728 mdecorde
412 728 mdecorde
  !ifdef INSTALLLIB_INSTALL_NOREBOOT_PROTECTED | INSTALLLIB_INSTALL_NOREBOOT_NOTPROTECTED
413 728 mdecorde
414 728 mdecorde
    "installlib.copy_${INSTALLLIB_UNIQUE}:"
415 728 mdecorde
416 728 mdecorde
    StrCpy $R0 $R4
417 728 mdecorde
    Call ":installlib.file_${INSTALLLIB_UNIQUE}"
418 728 mdecorde
419 728 mdecorde
  !else
420 728 mdecorde
421 728 mdecorde
    !ifndef LIBRARY_DEFINE_REGISTER_LABEL
422 728 mdecorde
423 728 mdecorde
      !define LIBRARY_DEFINE_REGISTER_LABEL
424 728 mdecorde
425 728 mdecorde
    !endif
426 728 mdecorde
427 728 mdecorde
    !ifndef LIBRARY_DEFINE_DONE_LABEL
428 728 mdecorde
429 728 mdecorde
      !define LIBRARY_DEFINE_DONE_LABEL
430 728 mdecorde
431 728 mdecorde
    !endif
432 728 mdecorde
433 728 mdecorde
    ClearErrors
434 728 mdecorde
435 728 mdecorde
    StrCpy $R0 $R4
436 728 mdecorde
    Call ":installlib.file_${INSTALLLIB_UNIQUE}"
437 728 mdecorde
438 728 mdecorde
    IfErrors 0 "installlib.register_${INSTALLLIB_UNIQUE}"
439 728 mdecorde
440 728 mdecorde
    SetOverwrite lastused
441 728 mdecorde
442 728 mdecorde
    ;------------------------
443 728 mdecorde
    ;Copy on reboot
444 728 mdecorde
445 728 mdecorde
    GetTempFileName $R0 $R5
446 728 mdecorde
    Call ":installlib.file_${INSTALLLIB_UNIQUE}"
447 728 mdecorde
    Rename /REBOOTOK $R0 $R4
448 728 mdecorde
449 728 mdecorde
    ;------------------------
450 728 mdecorde
    ;Register on reboot
451 728 mdecorde
452 728 mdecorde
    Call ":installlib.regonreboot_${INSTALLLIB_UNIQUE}"
453 728 mdecorde
454 728 mdecorde
    Goto "installlib.done_${INSTALLLIB_UNIQUE}"
455 728 mdecorde
456 728 mdecorde
    "installlib.copy_${INSTALLLIB_UNIQUE}:"
457 728 mdecorde
      StrCpy $R0 $R4
458 728 mdecorde
      Call ":installlib.file_${INSTALLLIB_UNIQUE}"
459 728 mdecorde
460 728 mdecorde
  !endif
461 728 mdecorde
462 728 mdecorde
  ;------------------------
463 728 mdecorde
  ;Register
464 728 mdecorde
465 728 mdecorde
  !ifdef LIBRARY_DEFINE_REGISTER_LABEL
466 728 mdecorde
467 728 mdecorde
    !undef LIBRARY_DEFINE_REGISTER_LABEL
468 728 mdecorde
469 728 mdecorde
    "installlib.register_${INSTALLLIB_UNIQUE}:"
470 728 mdecorde
471 728 mdecorde
  !endif
472 728 mdecorde
473 728 mdecorde
  !ifdef INSTALLLIB_LIBTYPE_REGDLL | INSTALLLIB_LIBTYPE_TLB | INSTALLLIB_LIBTYPE_REGDLLTLB | INSTALLLIB_LIBTYPE_REGEXE
474 728 mdecorde
475 728 mdecorde
    !ifdef INSTALLLIB_INSTALL_REBOOT_PROTECTED | INSTALLLIB_INSTALL_REBOOT_NOTPROTECTED
476 728 mdecorde
477 728 mdecorde
      IfRebootFlag 0 "installlib.regnoreboot_${INSTALLLIB_UNIQUE}"
478 728 mdecorde
479 728 mdecorde
        Call ":installlib.regonreboot_${INSTALLLIB_UNIQUE}"
480 728 mdecorde
481 728 mdecorde
        Goto "installlib.registerfinish_${INSTALLLIB_UNIQUE}"
482 728 mdecorde
483 728 mdecorde
      "installlib.regnoreboot_${INSTALLLIB_UNIQUE}:"
484 728 mdecorde
485 728 mdecorde
    !endif
486 728 mdecorde
487 728 mdecorde
    !ifdef INSTALLLIB_LIBTYPE_TLB | INSTALLLIB_LIBTYPE_REGDLLTLB
488 728 mdecorde
489 728 mdecorde
      TypeLib::Register $R4
490 728 mdecorde
491 728 mdecorde
    !endif
492 728 mdecorde
493 728 mdecorde
    !ifdef INSTALLLIB_LIBTYPE_REGDLL | INSTALLLIB_LIBTYPE_REGDLLTLB
494 728 mdecorde
495 728 mdecorde
      !ifndef LIBRARY_X64
496 728 mdecorde
497 728 mdecorde
        RegDll $R4
498 728 mdecorde
499 728 mdecorde
      !else
500 728 mdecorde
501 728 mdecorde
        ExecWait '"$SYSDIR\regsvr32.exe" /s "$R4"'
502 728 mdecorde
503 728 mdecorde
      !endif
504 728 mdecorde
505 728 mdecorde
    !endif
506 728 mdecorde
507 728 mdecorde
    !ifdef INSTALLLIB_LIBTYPE_REGEXE
508 728 mdecorde
509 728 mdecorde
      ExecWait '"$R4" /regserver'
510 728 mdecorde
511 728 mdecorde
    !endif
512 728 mdecorde
513 728 mdecorde
    !ifdef INSTALLLIB_INSTALL_REBOOT_PROTECTED | INSTALLLIB_INSTALL_REBOOT_NOTPROTECTED
514 728 mdecorde
515 728 mdecorde
      "installlib.registerfinish_${INSTALLLIB_UNIQUE}:"
516 728 mdecorde
517 728 mdecorde
    !endif
518 728 mdecorde
519 728 mdecorde
  !endif
520 728 mdecorde
521 728 mdecorde
  !ifdef LIBRARY_SHELL_EXTENSION
522 728 mdecorde
523 728 mdecorde
    System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
524 728 mdecorde
525 728 mdecorde
  !endif
526 728 mdecorde
527 728 mdecorde
  !ifdef LIBRARY_COM
528 728 mdecorde
529 728 mdecorde
    System::Call 'Ole32::CoFreeUnusedLibraries()'
530 728 mdecorde
531 728 mdecorde
  !endif
532 728 mdecorde
533 728 mdecorde
  ;------------------------
534 728 mdecorde
  ;Done
535 728 mdecorde
536 728 mdecorde
  !ifdef LIBRARY_DEFINE_DONE_LABEL
537 728 mdecorde
538 728 mdecorde
    !undef LIBRARY_DEFINE_DONE_LABEL
539 728 mdecorde
540 728 mdecorde
  "installlib.done_${INSTALLLIB_UNIQUE}:"
541 728 mdecorde
542 728 mdecorde
  !endif
543 728 mdecorde
544 728 mdecorde
  Pop $R5
545 728 mdecorde
  Pop $R4
546 728 mdecorde
  Pop $R3
547 728 mdecorde
  Pop $R2
548 728 mdecorde
  Pop $R1
549 728 mdecorde
  Pop $R0
550 728 mdecorde
551 728 mdecorde
  ;------------------------
552 728 mdecorde
  ;End
553 728 mdecorde
554 728 mdecorde
  Goto "installlib.end_${INSTALLLIB_UNIQUE}"
555 728 mdecorde
556 728 mdecorde
  ;------------------------
557 728 mdecorde
  ;Extract
558 728 mdecorde
559 728 mdecorde
  !ifdef INSTALLLIB_INSTALL_REBOOT_PROTECTED | INSTALLLIB_INSTALL_REBOOT_NOTPROTECTED
560 728 mdecorde
561 728 mdecorde
    SetOverwrite try
562 728 mdecorde
563 728 mdecorde
  !else
564 728 mdecorde
565 728 mdecorde
    SetOverwrite on
566 728 mdecorde
567 728 mdecorde
  !endif
568 728 mdecorde
569 728 mdecorde
  "installlib.file_${INSTALLLIB_UNIQUE}:"
570 728 mdecorde
    SetFileAttributes $R0 FILE_ATTRIBUTE_NORMAL
571 728 mdecorde
    ClearErrors
572 728 mdecorde
    File /oname=$R0 "${LOCALFILE}"
573 728 mdecorde
    Return
574 728 mdecorde
575 728 mdecorde
  SetOverwrite lastused
576 728 mdecorde
577 728 mdecorde
  ;------------------------
578 728 mdecorde
  ;Register on reboot
579 728 mdecorde
580 728 mdecorde
  !ifdef INSTALLLIB_INSTALL_REBOOT_PROTECTED | INSTALLLIB_INSTALL_REBOOT_NOTPROTECTED
581 728 mdecorde
582 728 mdecorde
    "installlib.regonreboot_${INSTALLLIB_UNIQUE}:"
583 728 mdecorde
584 728 mdecorde
      !ifdef INSTALLLIB_LIBTYPE_REGDLL | INSTALLLIB_LIBTYPE_REGDLLTLB
585 728 mdecorde
        !ifndef LIBRARY_X64
586 728 mdecorde
          !insertmacro __InstallLib_Helper_AddRegToolEntry 'D' "$R4" "$R5"
587 728 mdecorde
        !else
588 728 mdecorde
          !insertmacro __InstallLib_Helper_AddRegToolEntry 'DX' "$R4" "$R5"
589 728 mdecorde
        !endif
590 728 mdecorde
      !endif
591 728 mdecorde
592 728 mdecorde
      !ifdef INSTALLLIB_LIBTYPE_TLB | INSTALLLIB_LIBTYPE_REGDLLTLB
593 728 mdecorde
        !insertmacro __InstallLib_Helper_AddRegToolEntry 'T' "$R4" "$R5"
594 728 mdecorde
      !endif
595 728 mdecorde
596 728 mdecorde
      !ifdef INSTALLLIB_LIBTYPE_REGEXE
597 728 mdecorde
        !insertmacro __InstallLib_Helper_AddRegToolEntry 'E' "$R4" "$R5"
598 728 mdecorde
      !endif
599 728 mdecorde
600 728 mdecorde
      Return
601 728 mdecorde
602 728 mdecorde
  !endif
603 728 mdecorde
604 728 mdecorde
  ;------------------------
605 728 mdecorde
  ;End label
606 728 mdecorde
607 728 mdecorde
  "installlib.end_${INSTALLLIB_UNIQUE}:"
608 728 mdecorde
609 728 mdecorde
  !ifdef LIBRARY_X64
610 728 mdecorde
611 728 mdecorde
    ${EnableX64FSRedirection}
612 728 mdecorde
613 728 mdecorde
  !endif
614 728 mdecorde
615 728 mdecorde
  ;------------------------
616 728 mdecorde
  ;Undefine
617 728 mdecorde
618 728 mdecorde
  !undef INSTALLLIB_UNIQUE
619 728 mdecorde
620 728 mdecorde
  !undef ${INSTALLLIB_LIBTYPE_SET}
621 728 mdecorde
  !undef INSTALLLIB_LIBTYPE_SET
622 728 mdecorde
  !undef ${INSTALLLIB_SHARED_SET}
623 728 mdecorde
  !undef INSTALLLIB_SHARED_SET
624 728 mdecorde
  !undef ${INSTALLLIB_INSTALL_SET}
625 728 mdecorde
  !undef INSTALLLIB_INSTALL_SET
626 728 mdecorde
627 728 mdecorde
  !verbose pop
628 728 mdecorde
629 728 mdecorde
!macroend
630 728 mdecorde
631 728 mdecorde
### Uninstall library
632 728 mdecorde
!macro UnInstallLib libtype shared uninstall file
633 728 mdecorde
634 728 mdecorde
  !verbose push
635 728 mdecorde
  !verbose 3
636 728 mdecorde
637 728 mdecorde
  Push $R0
638 728 mdecorde
  Push $R1
639 728 mdecorde
640 728 mdecorde
  ;------------------------
641 728 mdecorde
  ;Define
642 728 mdecorde
643 728 mdecorde
  !define UNINSTALLLIB_UNIQUE "${__FILE__}${__LINE__}"
644 728 mdecorde
645 728 mdecorde
  !define UNINSTALLLIB_LIBTYPE_${libtype}
646 728 mdecorde
  !define UNINSTALLLIB_LIBTYPE_SET UNINSTALLLIB_LIBTYPE_${libtype}
647 728 mdecorde
  !define UNINSTALLLIB_SHARED_${shared}
648 728 mdecorde
  !define UNINSTALLLIB_SHARED_SET UNINSTALLLIB_SHARED_${shared}
649 728 mdecorde
  !define UNINSTALLLIB_UNINSTALL_${uninstall}
650 728 mdecorde
  !define UNINSTALLLIB_UNINSTALL_SET UNINSTALLLIB_UNINSTALL_${uninstall}
651 728 mdecorde
652 728 mdecorde
  ;------------------------
653 728 mdecorde
  ;Validate
654 728 mdecorde
655 728 mdecorde
  !ifndef UNINSTALLLIB_LIBTYPE_DLL & UNINSTALLLIB_LIBTYPE_REGDLL & UNINSTALLLIB_LIBTYPE_TLB & \
656 728 mdecorde
    UNINSTALLLIB_LIBTYPE_REGDLLTLB & UNINSTALLLIB_LIBTYPE_REGEXE
657 728 mdecorde
    !error "UnInstallLib: Incorrect setting for parameter: libtype"
658 728 mdecorde
  !endif
659 728 mdecorde
660 728 mdecorde
  !ifndef UNINSTALLLIB_SHARED_NOTSHARED & UNINSTALLLIB_SHARED_SHARED
661 728 mdecorde
    !error "UnInstallLib: Incorrect setting for parameter: shared"
662 728 mdecorde
  !endif
663 728 mdecorde
664 728 mdecorde
  !ifndef UNINSTALLLIB_UNINSTALL_NOREMOVE & UNINSTALLLIB_UNINSTALL_REBOOT_PROTECTED & \
665 728 mdecorde
    UNINSTALLLIB_UNINSTALL_REBOOT_NOTPROTECTED & UNINSTALLLIB_UNINSTALL_NOREBOOT_PROTECTED & \
666 728 mdecorde
    UNINSTALLLIB_UNINSTALL_NOREBOOT_NOTPROTECTED
667 728 mdecorde
    !error "UnInstallLib: Incorrect setting for parameter: uninstall"
668 728 mdecorde
  !endif
669 728 mdecorde
670 728 mdecorde
  ;------------------------
671 728 mdecorde
  ;x64 settings
672 728 mdecorde
673 728 mdecorde
  !ifdef LIBRARY_X64
674 728 mdecorde
675 728 mdecorde
    ${DisableX64FSRedirection}
676 728 mdecorde
677 728 mdecorde
  !endif
678 728 mdecorde
679 728 mdecorde
  ;------------------------
680 728 mdecorde
  ;Copy the parameters used on run-time to a variable
681 728 mdecorde
  ;This allows the usage of variables as parameter
682 728 mdecorde
683 728 mdecorde
  StrCpy $R1 "${file}"
684 728 mdecorde
685 728 mdecorde
  ;------------------------
686 728 mdecorde
  ;Shared library count
687 728 mdecorde
688 728 mdecorde
  !ifdef UNINSTALLLIB_SHARED_SHARED
689 728 mdecorde
690 728 mdecorde
    !define UNINSTALLLIB_DONE_LABEL
691 728 mdecorde
692 728 mdecorde
    !ifdef LIBRARY_X64
693 728 mdecorde
694 728 mdecorde
      SetRegView 64
695 728 mdecorde
696 728 mdecorde
    !endif
697 728 mdecorde
698 728 mdecorde
    ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
699 728 mdecorde
    StrCmp $R0 "" "uninstalllib.shareddlldone_${UNINSTALLLIB_UNIQUE}"
700 728 mdecorde
701 728 mdecorde
    IntOp $R0 $R0 - 1
702 728 mdecorde
    IntCmp $R0 0 "uninstalllib.shareddllremove_${UNINSTALLLIB_UNIQUE}" \
703 728 mdecorde
      "uninstalllib.shareddllremove_${UNINSTALLLIB_UNIQUE}" "uninstalllib.shareddllinuse_${UNINSTALLLIB_UNIQUE}"
704 728 mdecorde
705 728 mdecorde
    "uninstalllib.shareddllremove_${UNINSTALLLIB_UNIQUE}:"
706 728 mdecorde
      DeleteRegValue HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
707 728 mdecorde
      !ifndef UNINSTALLLIB_SHARED_SHAREDNOREMOVE
708 728 mdecorde
        Goto "uninstalllib.shareddlldone_${UNINSTALLLIB_UNIQUE}"
709 728 mdecorde
      !endif
710 728 mdecorde
711 728 mdecorde
    "uninstalllib.shareddllinuse_${UNINSTALLLIB_UNIQUE}:"
712 728 mdecorde
      WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0
713 728 mdecorde
714 728 mdecorde
        !ifdef LIBRARY_X64
715 728 mdecorde
716 728 mdecorde
          SetRegView lastused
717 728 mdecorde
718 728 mdecorde
        !endif
719 728 mdecorde
720 728 mdecorde
      Goto "uninstalllib.done_${UNINSTALLLIB_UNIQUE}"
721 728 mdecorde
722 728 mdecorde
    "uninstalllib.shareddlldone_${UNINSTALLLIB_UNIQUE}:"
723 728 mdecorde
724 728 mdecorde
    !ifdef LIBRARY_X64
725 728 mdecorde
726 728 mdecorde
      SetRegView lastused
727 728 mdecorde
728 728 mdecorde
    !endif
729 728 mdecorde
730 728 mdecorde
  !endif
731 728 mdecorde
732 728 mdecorde
  ;------------------------
733 728 mdecorde
  ;Remove
734 728 mdecorde
735 728 mdecorde
  !ifndef UNINSTALLLIB_UNINSTALL_NOREMOVE
736 728 mdecorde
737 728 mdecorde
    ;------------------------
738 728 mdecorde
    ;Check Windows File Protection
739 728 mdecorde
740 728 mdecorde
    !ifdef UNINSTALLLIB_UNINSTALL_REBOOT_PROTECTED | UNINSTALLLIB_UNINSTALL_NOREBOOT_PROTECTED
741 728 mdecorde
742 728 mdecorde
      !ifndef UNINSTALLLIB_DONE_LABEL
743 728 mdecorde
744 728 mdecorde
        !define UNINSTALLLIB_DONE_LABEL
745 728 mdecorde
746 728 mdecorde
      !endif
747 728 mdecorde
748 728 mdecorde
      System::Call "sfc::SfcIsFileProtected(i 0, w $R1) i.R0"
749 728 mdecorde
750 728 mdecorde
        StrCmp $R0 "error" "uninstalllib.notprotected_${UNINSTALLLIB_UNIQUE}"
751 728 mdecorde
        StrCmp $R0 "0" "uninstalllib.notprotected_${UNINSTALLLIB_UNIQUE}"
752 728 mdecorde
753 728 mdecorde
      Goto "uninstalllib.done_${UNINSTALLLIB_UNIQUE}"
754 728 mdecorde
755 728 mdecorde
      "uninstalllib.notprotected_${UNINSTALLLIB_UNIQUE}:"
756 728 mdecorde
757 728 mdecorde
    !endif
758 728 mdecorde
759 728 mdecorde
    ;------------------------
760 728 mdecorde
    ;Unregister
761 728 mdecorde
762 728 mdecorde
    !ifdef UNINSTALLLIB_LIBTYPE_REGDLL | UNINSTALLLIB_LIBTYPE_REGDLLTLB
763 728 mdecorde
764 728 mdecorde
      !ifndef LIBRARY_X64
765 728 mdecorde
766 728 mdecorde
        UnRegDLL $R1
767 728 mdecorde
768 728 mdecorde
      !else
769 728 mdecorde
770 728 mdecorde
        ExecWait '"$SYSDIR\regsvr32.exe" /s /u "$R1"'
771 728 mdecorde
772 728 mdecorde
      !endif
773 728 mdecorde
774 728 mdecorde
    !endif
775 728 mdecorde
776 728 mdecorde
    !ifdef UNINSTALLLIB_LIBTYPE_REGEXE
777 728 mdecorde
778 728 mdecorde
      ExecWait '"$R1" /unregserver'
779 728 mdecorde
780 728 mdecorde
    !endif
781 728 mdecorde
782 728 mdecorde
    !ifdef UNINSTALLLIB_LIBTYPE_TLB | UNINSTALLLIB_LIBTYPE_REGDLLTLB
783 728 mdecorde
784 728 mdecorde
      TypeLib::UnRegister $R1
785 728 mdecorde
786 728 mdecorde
    !endif
787 728 mdecorde
788 728 mdecorde
    !ifdef LIBRARY_SHELL_EXTENSION
789 728 mdecorde
790 728 mdecorde
      System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
791 728 mdecorde
792 728 mdecorde
    !endif
793 728 mdecorde
794 728 mdecorde
    !ifdef LIBRARY_COM
795 728 mdecorde
796 728 mdecorde
      System::Call 'Ole32::CoFreeUnusedLibraries()'
797 728 mdecorde
798 728 mdecorde
    !endif
799 728 mdecorde
800 728 mdecorde
    ;------------------------
801 728 mdecorde
    ;Delete
802 728 mdecorde
803 728 mdecorde
    Delete $R1
804 728 mdecorde
805 728 mdecorde
    !ifdef UNINSTALLLIB_UNINSTALL_REBOOT_PROTECTED | UNINSTALLLIB_UNINSTALL_REBOOT_NOTPROTECTED
806 728 mdecorde
807 728 mdecorde
      ${If} ${FileExists} $R1
808 728 mdecorde
        # File is in use, can't just delete.
809 728 mdecorde
        # Move file to another location before using Delete /REBOOTOK. This way, if
810 728 mdecorde
        #  the user installs a new version of the DLL, it won't be deleted after
811 728 mdecorde
        #  reboot. See bug #1097642 for more information on this.
812 728 mdecorde
813 728 mdecorde
        # Try moving to $TEMP.
814 728 mdecorde
        GetTempFileName $R0
815 728 mdecorde
        Delete $R0
816 728 mdecorde
        Rename $R1 $R0
817 728 mdecorde
818 728 mdecorde
        ${If} ${FileExists} $R1
819 728 mdecorde
          # Still here, delete temporary file, in case the file was copied
820 728 mdecorde
          #  and not deleted. This happens when moving from network drives,
821 728 mdecorde
          #  for example.
822 728 mdecorde
          Delete $R0
823 728 mdecorde
824 728 mdecorde
          # Try moving to directory containing the file.
825 728 mdecorde
          !insertmacro __InstallLib_Helper_GetParent $R1 $R0
826 728 mdecorde
          GetTempFileName $R0 $R0
827 728 mdecorde
          Delete $R0
828 728 mdecorde
          Rename $R1 $R0
829 728 mdecorde
830 728 mdecorde
          ${If} ${FileExists} $R1
831 728 mdecorde
            # Still here, delete temporary file.
832 728 mdecorde
            Delete $R0
833 728 mdecorde
834 728 mdecorde
            # Give up moving, simply Delete /REBOOTOK the file.
835 728 mdecorde
            StrCpy $R0 $R1
836 728 mdecorde
          ${EndIf}
837 728 mdecorde
        ${EndIf}
838 728 mdecorde
839 728 mdecorde
        # Delete the moved file.
840 728 mdecorde
        Delete /REBOOTOK $R0
841 728 mdecorde
      ${EndIf}
842 728 mdecorde
843 728 mdecorde
    !endif
844 728 mdecorde
845 728 mdecorde
  !endif
846 728 mdecorde
847 728 mdecorde
  ;------------------------
848 728 mdecorde
  ;Done
849 728 mdecorde
850 728 mdecorde
  !ifdef UNINSTALLLIB_DONE_LABEL
851 728 mdecorde
852 728 mdecorde
    !undef UNINSTALLLIB_DONE_LABEL
853 728 mdecorde
854 728 mdecorde
    "uninstalllib.done_${UNINSTALLLIB_UNIQUE}:"
855 728 mdecorde
856 728 mdecorde
  !endif
857 728 mdecorde
858 728 mdecorde
  !ifdef LIBRARY_X64
859 728 mdecorde
860 728 mdecorde
    ${EnableX64FSRedirection}
861 728 mdecorde
862 728 mdecorde
  !endif
863 728 mdecorde
864 728 mdecorde
  Pop $R1
865 728 mdecorde
  Pop $R0
866 728 mdecorde
867 728 mdecorde
  ;------------------------
868 728 mdecorde
  ;Undefine
869 728 mdecorde
870 728 mdecorde
  !undef UNINSTALLLIB_UNIQUE
871 728 mdecorde
872 728 mdecorde
  !undef ${UNINSTALLLIB_LIBTYPE_SET}
873 728 mdecorde
  !undef UNINSTALLLIB_LIBTYPE_SET
874 728 mdecorde
  !undef ${UNINSTALLLIB_SHARED_SET}
875 728 mdecorde
  !undef UNINSTALLLIB_SHARED_SET
876 728 mdecorde
  !undef ${UNINSTALLLIB_UNINSTALL_SET}
877 728 mdecorde
  !undef UNINSTALLLIB_UNINSTALL_SET
878 728 mdecorde
879 728 mdecorde
  !verbose pop
880 728 mdecorde
881 728 mdecorde
!macroend
882 728 mdecorde
883 728 mdecorde
!endif
884 728 mdecorde
885 728 mdecorde
!verbose pop