diff --git a/Installer/installer.nsi b/Installer/installer.nsi index 23350f52..f623cce7 100644 --- a/Installer/installer.nsi +++ b/Installer/installer.nsi @@ -114,6 +114,21 @@ Section $(TITLE_MAIN) SecMain File "..\Output\*.txt" File "..\Output\CreditsRessourcesDB.sqlite" + ReadRegStr $0 HKLM "SOFTWARE\Microsoft\DirectX" "Version" + StrCpy $1 $0 4 3 + ${If} $1 < 9 + SetOutPath "$TEMP" + File "Requirements\dxwebsetup.exe" + DetailPrint "Running DirectX Setup..." + ExecWait '"$TEMP\dxwebsetup.exe" /Q' $DirectXSetupError + DetailPrint "Finished DirectX Setup" + + Delete "$TEMP\dxwebsetup.exe" + + SetOutPath "$INSTDIR" + ${EndIf} + + ${IfNot} ${HasDotNet4.0} SetOutPath "$TEMP" File "Requirements\dotNetFx40_Full_setup.exe" @@ -185,20 +200,6 @@ Section $(TITLE_bg_videos) SecVideos SectionEnd -Section $(TITLE_directx) SecDirectX - - SetOutPath "$TEMP" - File "Requirements\dxwebsetup.exe" - DetailPrint "Running DirectX Setup..." - ExecWait '"$TEMP\dxwebsetup.exe" /Q' $DirectXSetupError - DetailPrint "Finished DirectX Setup" - - Delete "$TEMP\dxwebsetup.exe" - - SetOutPath "$INSTDIR" - -SectionEnd - ;-------------------------------- ;Installer Functions