This commit is contained in:
BruebachL 2026-06-14 03:22:15 -07:00 committed by GitHub
commit 9852f767b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -112,6 +112,18 @@ ${Else}
StrCpy $ReinstallMode 0
${EndIf}
; When launched with /R by the client, explicitly parse /D= from the raw
; parameter string. Qt's QProcess::startDetached with a pre-formed command
; string does not guarantee the NSIS stub's built-in /D= handler sees the
; value, so we extract it ourselves here where GetOptions is reliable.
${If} $ReinstallMode = 1
ClearErrors
${GetOptions} $9 "/D=" $R1
${IfNot} ${Errors}
StrCpy $InstDir $R1
${EndIf}
${EndIf}
${If} $InstDir == ""
; User did not use /D to specify a directory,
; we need to set a default based on the install mode