From f7e37384111e3b0e376ce8b8f54aab939170cbaa Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Sun, 3 Jan 2010 15:28:15 +0100 Subject: [PATCH] Installer: Fix the CreateHardLink signature for Unicode builds We need to call CreateHardLinkW for Inno Setup Unicode, where the "String" data type is a Unicode string. Moreover, load CreateHardLink[AW] delayed, and only during setup. Note that in this particular case "delayload" is not necessary, because the call to CreateHardLink is guarded by "IsNTFS", so it should always be available. Signed-off-by: Sebastian Schuberth --- share/WinGit/install.iss | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/share/WinGit/install.iss b/share/WinGit/install.iss index 56e47771..d8b7f123 100644 --- a/share/WinGit/install.iss +++ b/share/WinGit/install.iss @@ -79,7 +79,11 @@ Type: dirifempty; Name: {app}\home #include "putty.inc.iss" function CreateHardLink(lpFileName,lpExistingFileName:String;lpSecurityAttributes:Integer):Boolean; -external 'CreateHardLinkA@Kernel32.dll'; +#ifdef UNICODE +external 'CreateHardLinkW@Kernel32.dll stdcall delayload setuponly'; +#else +external 'CreateHardLinkA@Kernel32.dll stdcall delayload setuponly'; +#endif const // Git Path options. -- 2.11.4.GIT