mirror of
https://github.com/etlegacy/etlegacy-tools.git
synced 2024-11-21 11:31:22 +00:00
added the vcredist installation if needed
This commit is contained in:
parent
354871940f
commit
d444353c5f
1 changed files with 25 additions and 1 deletions
|
@ -8,7 +8,7 @@
|
|||
; - the ET:Legacy binary files in a "etlegacy-windows-${VERSION}" subfolder without Omni-bot files.
|
||||
; Change the version number below. You don't need to change anything else.
|
||||
|
||||
!define VERSION "2.71rc3"
|
||||
!define VERSION "2.71rc4"
|
||||
|
||||
; ------------------------
|
||||
; GENERAL
|
||||
|
@ -73,6 +73,8 @@ Section "Enemy Territory: Legacy" FILES
|
|||
File /r "etlegacy-windows-${VERSION}\*.*"
|
||||
SimpleFC::AddApplication "ET:Legacy" "$INSTDIR\etl.exe" 0 2 "" 1
|
||||
SimpleFC::AddApplication "ET:Legacy server" "$INSTDIR\etlded.exe" 0 2 "" 1
|
||||
; If we compile with /MT we will not need to install the redist
|
||||
; Call InstallVC
|
||||
SectionEnd
|
||||
|
||||
Section "Wolfenstein: Enemy Territory assets" ASSETS
|
||||
|
@ -268,6 +270,28 @@ Section -Post
|
|||
WriteRegStr HKLM "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninstall.exe"
|
||||
SectionEnd
|
||||
|
||||
; Functions
|
||||
Function InstallVC
|
||||
Push $R0
|
||||
; TODO: Fix clsid:s to match 2013 VS version
|
||||
ClearErrors
|
||||
ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9A25302D-30C0-39D9-BD6F-21E6EC160475}" "Version"
|
||||
IfErrors 0 VSRedistInstalled
|
||||
ClearErrors
|
||||
ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{86CE1746-9EFF-3C9C-8755-81EA8903AC34}" "Version"
|
||||
IfErrors 0 VSRedistInstalled
|
||||
; Maybe we should just install it and not even comfirm?
|
||||
MessageBox MB_ICONQUESTION|MB_YESNO "ET:Legacy requires MS VC++ 2013 Redistributable, do you want to install it ?" IDNO VSRedistInstalled
|
||||
File /nonfatal "vcredist\vcredist_x86.exe"
|
||||
; we either use /quiet or /passive quiet shows nothing and passive show minimal UI with no user interactions
|
||||
; /nostart do not popup a restart window, we does not want it and we does not need it my precious!
|
||||
ExecWait '"$INSTDIR\vcredist_x86.exe" /passive /norestart'
|
||||
VSRedistInstalled:
|
||||
Exch $R0
|
||||
|
||||
Delete "$INSTDIR\vcredist_x86.exe"
|
||||
FunctionEnd
|
||||
|
||||
; Section descriptions
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${FILES} "Install Enemy Territory: Legacy files."
|
||||
|
|
Loading…
Reference in a new issue