windows-nsis-install-idn-redist-20080626
authorAsanka Herath <asanka@secure-endpoints.com>
Fri, 27 Jun 2008 02:58:36 +0000 (02:58 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 27 Jun 2008 02:58:36 +0000 (02:58 +0000)
LICENSE MIT

Install the Microsoft IDN Redistributables which are required for
Unicode Normalization on XP and 2003.

src/WINNT/install/NSIS/NTMakefile
src/WINNT/install/NSIS/OpenAFS.nsi

index f0a9340..c987796 100644 (file)
@@ -10,6 +10,11 @@ C2OBJ   = $(cc) /Fo$@ /Fd$*.pdb $(cflags) $(cdebug) $(cvars) $(afscflags) $(afsc
 
 LOOPBACK_LIBS = wbemuuid.lib setupapi.lib msi.lib ole32.lib shell32.lib oleaut32.lib user32.lib
 
+!IFNDEF MSIDNNLS
+!ERROR Please set IDNMREDISTDIR to the directory where Microsoft IDN Mitigation APIs Redistributables are to be found.
+# $(MSIDNNLS)\REDIST\idndl.(platform).exe should exist.
+!ENDIF
+
 $(OUT)\Service.obj: Service.cpp
           $(C2OBJ) Service.cpp
 
@@ -55,6 +60,14 @@ ARCH=$(CPU)
 !ENDIF
 !ENDIF
 
+!IF ("$(CPU)" == "i386")
+IDNMREDIST=$(MSIDNNLS)\REDIST\idndl.x86.exe
+!ELSE IF ("$(CPU)" == "amd64")
+IDNMREDIST=$(MSIDNNLS)\REDIST\idndl.amd64.exe
+!ELSE
+! error Unknown CPU value
+!ENDIF
+
 prebuild:
 !IF ("$(AFSDEV_BUILDTYPE)" == "FREE")
 !IF ("$(AFSVER_CL)"=="1400")
@@ -102,6 +115,7 @@ prebuild:
    echo !define AFS_MAJORVERSION $(AFSPRODUCT_VER_MAJOR) >>$(OUT)\nsi-includes.nsi
    echo !define AFS_MINORVERSION $(AFSPRODUCT_VER_MINOR) >>$(OUT)\nsi-includes.nsi
    echo !define AFS_PATCHLEVEL $(AFSPRODUCT_VER_PATCH) >>$(OUT)\nsi-includes.nsi
+   echo !define IDNMREDIST "$(IDNMREDIST)" >>$(OUT)\nsi-includes.nsi
    $(DESTDIR)\bin\util_cr.exe _echo "!define " >>$(OUT)\nsi-includes.nsi 
    "$(NSISDIR)\makensis.exe" /VERSION >>$(OUT)\nsi-includes.nsi          
    echo. >>$(OUT)\nsi-includes.nsi                                       
index 310a0ce..c202e45 100644 (file)
@@ -531,6 +531,11 @@ Section "!AFS Client" secClient
   nsExec::Exec "net stop TransarcAFSDaemon"
   nsExec::Exec "net stop TransarcAFSServer"
   
+  ; Install the Microsoft IDNM Redistributable
+  GetTempFileName $R0
+  File /oname=$R0 "${IDNMREDIST}"
+  nsExec::Exec '$R0 /quiet /norestart'
+  
    ; Do client components
   SetOutPath "$INSTDIR\Client\Program"
   File "${AFS_CLIENT_BUILDDIR}\afsshare.exe"