Win64 fixes

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6413 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2013-09-06 23:48:59 +00:00
parent e23b3db418
commit e63fa6c53b
38 changed files with 389 additions and 331 deletions

View file

@ -1107,22 +1107,22 @@ RefreshShellIcons
FileFunc_GetTime_getfile:
IfFileExists $0 0 FileFunc_GetTime_error
System::Call '*(i,l,l,l,i,i,i,i,&t260,&t14) i .r6'
System::Call 'kernel32::FindFirstFile(t,i)i(r0,r6) .r2'
System::Call '*(i,l,l,l,i,i,i,i,&t260,&t14) p .r6'
System::Call 'kernel32::FindFirstFile(t,p)p(r0,r6) .r2'
System::Call 'kernel32::FindClose(i)i(r2)'
FileFunc_GetTime_gettime:
System::Call '*(&i2,&i2,&i2,&i2,&i2,&i2,&i2,&i2) i .r7'
System::Call '*(&i2,&i2,&i2,&i2,&i2,&i2,&i2,&i2) p .r7'
StrCmp $1 'L' 0 FileFunc_GetTime_systemtime
System::Call 'kernel32::GetLocalTime(i)i(r7)'
System::Call 'kernel32::GetLocalTime(p)i(r7)'
goto FileFunc_GetTime_convert
FileFunc_GetTime_systemtime:
StrCmp $1 'LS' 0 FileFunc_GetTime_filetime
System::Call 'kernel32::GetSystemTime(i)i(r7)'
System::Call 'kernel32::GetSystemTime(p)i(r7)'
goto FileFunc_GetTime_convert
FileFunc_GetTime_filetime:
System::Call '*$6(i,l,l,l,i,i,i,i,&t260,&t14)i(,.r4,.r3,.r2)'
System::Call '*$6(i,l,l,l,i,i,i,i,&t260,&t14)p(,.r4,.r3,.r2)'
System::Free $6
StrCmp $1 'A' 0 +3
StrCpy $2 $3
@ -1146,7 +1146,7 @@ RefreshShellIcons
System::Call 'kernel32::FileTimeToSystemTime(*l,i)i(r3,r7)'
FileFunc_GetTime_convert:
System::Call '*$7(&i2,&i2,&i2,&i2,&i2,&i2,&i2,&i2)i(.r5,.r6,.r4,.r0,.r3,.r2,.r1,)'
System::Call '*$7(&i2,&i2,&i2,&i2,&i2,&i2,&i2,&i2)p(.r5,.r6,.r4,.r0,.r3,.r2,.r1,)'
System::Free $7
IntCmp $0 9 0 0 +2
@ -1398,7 +1398,7 @@ RefreshShellIcons
Push $0
Push $1
Push $2
System::Call 'kernel32::GetModuleFileName(i 0, t .r0, i 1024)'
System::Call 'kernel32::GetModuleFileName(p 0, t .r0, i 1024)'
System::Call 'kernel32::GetLongPathName(t r0, t .r1, i 1024)i .r2'
StrCmp $2 error +2
StrCpy $0 $1

View file

@ -285,7 +285,7 @@ o-----------------------------------------------------------------------------o
; Else convert to lower case.
;Use "IsCharAlpha" for the job
System::Call "*(&t1 r7) i .r8"
System::Call "*(&t1 r7) p .r8"
System::Call "*$8(&i1 .r7)"
System::Free $8
System::Call "user32::IsCharAlpha(i r7) i .r8"
@ -325,7 +325,7 @@ o-----------------------------------------------------------------------------o
; Switch all characters cases to their inverse case.
;Use "IsCharUpper" for the job
System::Call "*(&t1 r6) i .r8"
System::Call "*(&t1 r6) p .r8"
System::Call "*$8(&i1 .r7)"
System::Free $8
System::Call "user32::IsCharUpper(i r7) i .r8"
@ -395,7 +395,7 @@ o-----------------------------------------------------------------------------o
StrCpy $4 ""
;Open the clipboard to do the operations the user chose (kichik's fix)
System::Call 'user32::OpenClipboard(i $HWNDPARENT)'
System::Call 'user32::OpenClipboard(p $HWNDPARENT)'
${If} $1 == ">" ;Set
@ -405,44 +405,44 @@ o-----------------------------------------------------------------------------o
;Step 2: Allocate global heap
StrLen $2 $0
IntOp $2 $2 + 1
IntOp $2 $2 * ${NSIS_CHAR_SIZE}
System::Call 'kernel32::GlobalAlloc(i 2, i r2) i.r2'
IntOp $2 $2 * ${NSIS_CHAR_SIZE}
System::Call 'kernel32::GlobalAlloc(i 2, i r2) p.r2'
;Step 3: Lock the handle
System::Call 'kernel32::GlobalLock(i r2) i.r3'
System::Call 'kernel32::GlobalLock(p r2) i.r3'
;Step 4: Copy the text to locked clipboard buffer
System::Call 'kernel32::lstrcpy(i r3, t r0)'
System::Call 'kernel32::lstrcpy(p r3, t r0)'
;Step 5: Unlock the handle again
System::Call 'kernel32::GlobalUnlock(i r2)'
System::Call 'kernel32::GlobalUnlock(p r2)'
;Step 6: Set the information to the clipboard
System::Call 'user32::SetClipboardData(i 1, i r2)'
System::Call 'user32::SetClipboardData(i 1, p r2)'
StrCpy $0 ""
${ElseIf} $1 == "<" ;Get
;Step 1: Get clipboard data
System::Call 'user32::GetClipboardData(i 1) i .r2'
System::Call 'user32::GetClipboardData(i 1) p .r2'
;Step 2: Lock and copy data (kichik's fix)
System::Call 'kernel32::GlobalLock(i r2) t .r0'
System::Call 'kernel32::GlobalLock(p r2) t .r0'
;Step 3: Unlock (kichik's fix)
System::Call 'kernel32::GlobalUnlock(i r2)'
System::Call 'kernel32::GlobalUnlock(p r2)'
${ElseIf} $1 == "<>" ;Swap
;Step 1: Get clipboard data
System::Call 'user32::GetClipboardData(i 1) i .r2'
System::Call 'user32::GetClipboardData(i 1) p .r2'
;Step 2: Lock and copy data (kichik's fix)
System::Call 'kernel32::GlobalLock(i r2) t .r4'
System::Call 'kernel32::GlobalLock(p r2) t .r4'
;Step 3: Unlock (kichik's fix)
System::Call 'kernel32::GlobalUnlock(i r2)'
System::Call 'kernel32::GlobalUnlock(p r2)'
;Step 4: Clear the clipboard
System::Call 'user32::EmptyClipboard()'
@ -451,19 +451,19 @@ o-----------------------------------------------------------------------------o
StrLen $2 $0
IntOp $2 $2 + 1
IntOp $2 $2 * ${NSIS_CHAR_SIZE}
System::Call 'kernel32::GlobalAlloc(i 2, i r2) i.r2'
System::Call 'kernel32::GlobalAlloc(i 2, i r2) p.r2'
;Step 6: Lock the handle
System::Call 'kernel32::GlobalLock(i r2) i.r3'
System::Call 'kernel32::GlobalLock(p r2) i.r3'
;Step 7: Copy the text to locked clipboard buffer
System::Call 'kernel32::lstrcpy(i r3, t r0)'
System::Call 'kernel32::lstrcpy(p r3, t r0)'
;Step 8: Unlock the handle again
System::Call 'kernel32::GlobalUnlock(i r2)'
System::Call 'kernel32::GlobalUnlock(p r2)'
;Step 9: Set the information to the clipboard
System::Call 'user32::SetClipboardData(i 1, i r2)'
System::Call 'user32::SetClipboardData(i 1, p r2)'
StrCpy $0 $4
${Else} ;Clear

View file

@ -1043,12 +1043,12 @@ TrimNewLines
System::Alloc $6
Pop $0
FileSeek $3 $5 SET
System::Call 'kernel32::ReadFile(i r3, i r0, i $6, t.,)'
System::Call 'kernel32::ReadFile(p r3, p r0, i $6, t.,)'
FileSeek $3 $4 SET
StrCmp${_TEXTFUNC_S} $2 '' +2
FileWrite $3 '$1$2$\r$\n'
System::Call 'kernel32::WriteFile(i r3, i r0, i $6, t.,)'
System::Call 'kernel32::SetEndOfFile(i r3)'
System::Call 'kernel32::WriteFile(p r3, p r0, i $6, t.,)'
System::Call 'kernel32::SetEndOfFile(p r3)'
System::Free $0
StrCmp${_TEXTFUNC_S} $2 '' +3
StrCpy $0 CHANGED
@ -1153,10 +1153,10 @@ TrimNewLines
System::Alloc $3
Pop $4
FileSeek $2 0 SET
System::Call 'kernel32::ReadFile(i r2, i r4, i $3, t.,)'
System::Call 'user32::$1Buff(i r4, i r4, i $3)'
System::Call 'kernel32::ReadFile(p r2, p r4, i $3, t.,)'
System::Call 'user32::$1Buff(p r4, p r4, i $3)'
FileSeek $2 0 SET
System::Call 'kernel32::WriteFile(i r2, i r4, i $3, t.,)'
System::Call 'kernel32::WriteFile(p r2, p r4, i $3, t.,)'
System::Free $4
FileClose $2
goto TextFunc_FileRecode_end

View file

@ -27,8 +27,8 @@
!macro _RunningX64 _a _b _t _f
!insertmacro _LOGICLIB_TEMP
System::Call kernel32::GetCurrentProcess()i.s
System::Call kernel32::IsWow64Process(is,*i.s)
System::Call kernel32::GetCurrentProcess()p.s
System::Call kernel32::IsWow64Process(ps,*i.s)
Pop $_LOGICLIB_TEMP
!insertmacro _!= $_LOGICLIB_TEMP 0 `${_t}` `${_f}`
!macroend