From 0a0a90d5aa42f6444762a6f306ceb57335110397 Mon Sep 17 00:00:00 2001 From: kichik Date: Thu, 28 Jul 2005 16:56:33 +0000 Subject: [PATCH] workaround for GetLongPathName git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4197 212acab6-be3b-0410-9dea-997c60f758d6 --- Include/FileFunc.nsh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Include/FileFunc.nsh b/Include/FileFunc.nsh index da8a92f3..d9219299 100644 --- a/Include/FileFunc.nsh +++ b/Include/FileFunc.nsh @@ -1,7 +1,7 @@ /* _____________________________________________________________________________ - File Functions Header v2.6 + File Functions Header v2.7 _____________________________________________________________________________ 2005 Shengalts Aleksander aka Instructor (Shengalts@mail.ru) @@ -1365,8 +1365,14 @@ RefreshShellIcons Function ${_FILEFUNC_UN}GetExeName Push $0 + Push $1 + Push $2 System::Call 'kernel32::GetModuleFileNameA(i 0, t .r0, i 1024)' - #System::Call 'kernel32::GetLongPathNameA(t r0, t .r0, i 1024)' + System::Call 'kernel32::GetLongPathNameA(t r0, t .r1, i 1024)i .r2' + StrCmp $2 error +2 + StrCpy $0 $1 + Pop $2 + Pop $1 Exch $0 FunctionEnd @@ -1384,8 +1390,14 @@ RefreshShellIcons Function ${_FILEFUNC_UN}GetExePath Push $0 + Push $1 + Push $2 StrCpy $0 $EXEDIR - #System::Call 'kernel32::GetLongPathNameA(t r0, t .r0, i 1024)' + System::Call 'kernel32::GetLongPathNameA(t r0, t .r1, i 1024)i .r2' + StrCmp $2 error +2 + StrCpy $0 $1 + Pop $2 + Pop $1 Exch $0 FunctionEnd