Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MP1-4869: Add ffmpeg x64 support for 64 bit OS (thx @regeszter)
- Loading branch information
1 parent
3d050ad
commit 2aa7959
Showing
5 changed files
with
78 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
; --------------------- | ||
; x64.nsh | ||
; --------------------- | ||
; | ||
; A few simple macros to handle installations on x64 machines. | ||
; | ||
; RunningX64 checks if the installer is running on a 64-bit OS. | ||
; IsWow64 checks if the installer is a 32-bit application running on a 64-bit OS. | ||
; | ||
; ${If} ${RunningX64} | ||
; MessageBox MB_OK "running on x64" | ||
; ${EndIf} | ||
; | ||
; DisableX64FSRedirection disables file system redirection. | ||
; EnableX64FSRedirection enables file system redirection. | ||
; | ||
; SetOutPath $SYSDIR | ||
; ${DisableX64FSRedirection} | ||
; File some.dll # extracts to C:\Windows\System32 | ||
; ${EnableX64FSRedirection} | ||
; File some.dll # extracts to C:\Windows\SysWOW64 | ||
; | ||
|
||
!ifndef ___X64__NSH___ | ||
!define ___X64__NSH___ | ||
|
||
!include LogicLib.nsh | ||
|
||
|
||
!define IsWow64 `"" IsWow64 ""` | ||
!macro _IsWow64 _a _b _t _f | ||
!insertmacro _LOGICLIB_TEMP | ||
System::Call kernel32::GetCurrentProcess()p.s | ||
System::Call kernel32::IsWow64Process(ps,*i0s) | ||
Pop $_LOGICLIB_TEMP | ||
!insertmacro _!= $_LOGICLIB_TEMP 0 `${_t}` `${_f}` | ||
!macroend | ||
|
||
|
||
!define RunningX64 `"" RunningX64 ""` | ||
!macro _RunningX64 _a _b _t _f | ||
!if ${NSIS_PTR_SIZE} > 4 | ||
!insertmacro LogicLib_JumpToBranch `${_t}` `${_f}` | ||
!else | ||
!insertmacro _IsWow64 `${_a}` `${_b}` `${_t}` `${_f}` | ||
!endif | ||
!macroend | ||
|
||
|
||
!define DisableX64FSRedirection "!insertmacro DisableX64FSRedirection" | ||
!macro DisableX64FSRedirection | ||
System::Call kernel32::Wow64EnableWow64FsRedirection(i0) | ||
!macroend | ||
|
||
!define EnableX64FSRedirection "!insertmacro EnableX64FSRedirection" | ||
!macro EnableX64FSRedirection | ||
System::Call kernel32::Wow64EnableWow64FsRedirection(i1) | ||
!macroend | ||
|
||
|
||
!endif # !___X64__NSH___ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters