root / tmp / org.txm.setups / nsis-2.5 / Include / x64.nsh @ 3101
Historique | Voir | Annoter | Télécharger (1,33 ko)
1 |
; --------------------- |
---|---|
2 |
; x64.nsh |
3 |
; --------------------- |
4 |
; |
5 |
; A few simple macros to handle installations on x64 machines. |
6 |
; |
7 |
; RunningX64 checks if the installer is running on x64. |
8 |
; |
9 |
; ${If} ${RunningX64} |
10 |
; MessageBox MB_OK "running on x64" |
11 |
; ${EndIf} |
12 |
; |
13 |
; DisableX64FSRedirection disables file system redirection. |
14 |
; EnableX64FSRedirection enables file system redirection. |
15 |
; |
16 |
; SetOutPath $SYSDIR |
17 |
; ${DisableX64FSRedirection} |
18 |
; File some.dll # extracts to C:\Windows\System32 |
19 |
; ${EnableX64FSRedirection} |
20 |
; File some.dll # extracts to C:\Windows\SysWOW64 |
21 |
; |
22 |
|
23 |
!ifndef ___X64__NSH___ |
24 |
!define ___X64__NSH___ |
25 |
|
26 |
!include LogicLib.nsh |
27 |
|
28 |
!macro _RunningX64 _a _b _t _f |
29 |
!insertmacro _LOGICLIB_TEMP |
30 |
System::Call kernel32::GetCurrentProcess()i.s |
31 |
System::Call kernel32::IsWow64Process(is,*i.s) |
32 |
Pop $_LOGICLIB_TEMP |
33 |
!insertmacro _!= $_LOGICLIB_TEMP 0 `${_t}` `${_f}` |
34 |
!macroend |
35 |
|
36 |
!define RunningX64 `"" RunningX64 ""` |
37 |
|
38 |
!macro DisableX64FSRedirection |
39 |
|
40 |
System::Call kernel32::Wow64EnableWow64FsRedirection(i0) |
41 |
|
42 |
!macroend |
43 |
|
44 |
!define DisableX64FSRedirection "!insertmacro DisableX64FSRedirection" |
45 |
|
46 |
!macro EnableX64FSRedirection |
47 |
|
48 |
System::Call kernel32::Wow64EnableWow64FsRedirection(i1) |
49 |
|
50 |
!macroend |
51 |
|
52 |
!define EnableX64FSRedirection "!insertmacro EnableX64FSRedirection" |
53 |
|
54 |
!endif # !___X64__NSH___ |