Advertisement
GordCaswell

PotPlayer Custom.nsh

Oct 1st, 2014
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ${SegmentFile}
  2.  
  3. ${Segment.OnInit}
  4.     ; Borrowed the following from PAL 2.2, Remove on release of PAL 2.2
  5.         ; Work out if it's 64-bit or 32-bit
  6.     System::Call kernel32::GetCurrentProcess()i.s
  7.     System::Call kernel32::IsWow64Process(is,*i.r0)
  8.     ${If} $0 == 0
  9.         StrCpy $Bits 32
  10.     ${Else}
  11.         StrCpy $Bits 64
  12.     ${EndIf}
  13. !macroend
  14.  
  15. ${SegmentInit}
  16.     ${If} $Bits == 64
  17.         ${SetEnvironmentVariablesPath} FullAppDir $EXEDIR\App\PotPlayer64
  18.     ${Else}
  19.         ${SetEnvironmentVariablesPath} FullAppDir $EXEDIR\App\PotPlayer
  20.     ${EndIf}
  21. !macroend
  22.  
  23. ${SegmentPre}
  24.     ${If} $Bits == 64
  25.         Rename "$EXEDIR\Data\PotPlayer.ini" "$EXEDIR\Data\PotPlayer64.ini"
  26.     ${EndIf}
  27. !macroend
  28.  
  29. ${SegmentPost}
  30.         ${If} $Bits == 64
  31.                 Rename "$EXEDIR\Data\PotPlayer64.ini" "$EXEDIR\Data\PotPlayer.ini"
  32.         ${EndIf}
  33. !macroend
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement