Minor classic installer fixes

* Use builtin exepath constant
* Must pop parameter even if it is never used
* Must use INETC for HTTPS downloads
This commit is contained in:
Anders 2022-01-10 04:29:37 +01:00 committed by GitHub
parent eae184ec9d
commit a030133cfc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 10 deletions

View File

@ -324,14 +324,15 @@ StrCpy $1 "https://www.sandboxie.com/support"
!else
StrCpy $2 "vcredist_x86.exe"
!endif
NSISdl::download /TIMEOUT=30000 $1/$2 $TEMP\$2
InitPluginsDir
inetc::get /SILENT /CONNECTTIMEOUT=5000 /RECEIVETIMEOUT=5000 $1/$2 $PLUGINSDIR\$2 /END
Pop $R0 ;Get the return value
StrCmp $R0 "success" +3
StrCmp $R0 "OK" +3
MessageBox MB_RETRYCANCEL|MB_ICONSTOP "Download failed for: $1/$2.$\nError: $R0.$\nRerun the install when problem corrected." IDRETRY -3
Quit
ExecWait '"$TEMP\$2" /passive' $0
ExecWait '"$PLUGINSDIR\$2" /passive' $0
StrCmp $0 "0" +3
MessageBox MB_OK|MB_ICONSTOP "Installation of VCRedist failed: $0.$\nRerun the install when problem corrected."
Quit
@ -821,7 +822,7 @@ FunctionEnd
Function DownloadStatPng
;
; Pop $0 ; Get the parameter (file name to download)
Pop $0 ; Get the parameter (file name to download)
; ${If} ${RunningX64}
; SetRegView 64
; ${EndIf}
@ -1091,11 +1092,9 @@ WriteOk:
;
StrCmp $BundledInstall "Y" SkipCopyInstaller
System::Call 'Kernel32::GetModuleFileNameA(i 0, t .r0, i 1024) i r1'
; $0 --> Installer Filename
CopyFiles "$0" "$WINDIR\Installer\${OUTFILE_${_BUILDARCH}}"
CreateDirectory "$WINDIR\Installer"
CopyFiles /SILENT "$EXEPATH" "$WINDIR\Installer\${OUTFILE_${_BUILDARCH}}"
SkipCopyInstaller: