Skip to content

Commit

Permalink
No startup sound for launcher --minimal (PR #12322)
Browse files Browse the repository at this point in the history
Fixes #12289

Co-authored-by: Reef Turner <[email protected]>
  • Loading branch information
JulienCochuyt and feerrenrut authored May 6, 2021
1 parent 5ce7545 commit 54e18f5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
21 changes: 17 additions & 4 deletions launcher/nvdaLauncher.nsi
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
!include "fileFunc.nsh"
!include "LogicLib.nsh"
!include "mui2.nsh"

!define launcher_appExe "nvdaLauncher.exe"
Expand Down Expand Up @@ -72,10 +73,17 @@ Banner::show /nounload
BringToFront

setOutPath "$PLUGINSDIR"
;Play NVDA logo sound
File "..\miscDeps\launcher\nvda_logo.wav"
Push "$PLUGINSDIR\nvda_logo.wav"
Call PlaySound
; Get the full param string and puts it in register $0.
; So $0 may then contain eg. "--minimal --install"
; Reference: https://nsis.sourceforge.io/Docs/AppendixE.html#getparameters
${GetParameters} $0
; From the params string, looks for option "--minimal", tries to get it's (unused) value and stores in $1.
; Sets the error flag if the option is missing.
; Reference: https://nsis.sourceforge.io/Docs/AppendixE.html#getoptions
${GetOptions} $0 "--minimal" $1
${If} ${Errors}
Call PlayLogoSound
${EndIf}
CreateDirectory "$PLUGINSDIR\app"
setOutPath "$PLUGINSDIR\app"
file /R "${NVDADistDir}\"
Expand All @@ -87,6 +95,11 @@ execWait "$PLUGINSDIR\app\nvda_noUIAccess.exe $0 -r --launcher" $1
intcmp $1 3 exec +1
SectionEnd

Function PlayLogoSound
File "..\miscDeps\launcher\nvda_logo.wav"
Push "$PLUGINSDIR\nvda_logo.wav"
Call PlaySound
FunctionEnd

Function PlaySound
; Retrieve the file to play
Expand Down
1 change: 1 addition & 0 deletions user_docs/en/changes.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ What's New in NVDA
- Fixed copying config during installation from a portable copy when default destination config directory is empty. (#12071, #12205)
- Fixed incorrect announcement of some letters with accents or diacritic when 'Say cap before capitals' option is checked. (#11948)
- Fixed the pitch change failure in Sapi4 speech synthesizer. (#12311)
- The NVDA installer now also honors the ``--minimal`` command line parameter and does not play the start-up sound, following the same documented behavior as an installed or portable copy NVDA executable. (#12289)


== Changes for Developers ==
Expand Down

0 comments on commit 54e18f5

Please sign in to comment.