Automatically install DirectX when it's not installed. Please test on machines without installed DirectX.

This commit is contained in:
Florian Küpper authored and Stephan Sundermann committed 2013-08-31 13:42:38 +02:00
1 parent f8b396bc3a
commit 3b5bd4ef50
1 file changed
+15 -14
+15 -14
View File
@@ -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