From 6f1f9f8462368253b872e5eead179118c64cd866 Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Sun, 4 Apr 2010 22:34:41 +0100 Subject: Don't prompt to install vcredist if already installed. Resolves: #205 diff --git a/Swift/Packaging/nsis/swift.nsi b/Swift/Packaging/nsis/swift.nsi index 862e841..171cb0c 100644 --- a/Swift/Packaging/nsis/swift.nsi +++ b/Swift/Packaging/nsis/swift.nsi @@ -83,12 +83,17 @@ sectionEnd Section -Prerequisites # http://nsis.sourceforge.net/Embedding_other_installers - SetOutPath $INSTDIR\Prerequisites - MessageBox MB_YESNO "Install C++ Runtime?" /SD IDYES IDNO endRuntime - File ${msvccRedistributableDir}\${msvccRedistributableExe} - ExecWait "$INSTDIR\Prerequisites\${msvccRedistributableExe}" - Delete $INSTDIR\Prerequisites\${msvccRedistributableExe} - RmDir $INSTDIR\Prerequisites + FindFirst $R1 $R0 "$WINDIR\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.492*" + ${If} $R0 != "" + #Skip vc runtime, already installed + ${Else} + SetOutPath $INSTDIR\Prerequisites + MessageBox MB_YESNO "Install C++ Runtime?" /SD IDYES IDNO endRuntime + File ${msvccRedistributableDir}\${msvccRedistributableExe} + ExecWait "$INSTDIR\Prerequisites\${msvccRedistributableExe}" + Delete $INSTDIR\Prerequisites\${msvccRedistributableExe} + RmDir $INSTDIR\Prerequisites + ${EndIf} Goto endRuntime endRuntime: SectionEnd -- cgit v0.10.2-6-g49f6