mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 06:55:59 +03:00
NSIS: accept /noautoupdate
This commit is contained in:
parent
958253bb2b
commit
4db7b5f2a7
1 changed files with 12 additions and 0 deletions
|
@ -54,6 +54,7 @@
|
|||
!define VERSION "@CPACK_PACKAGE_VERSION@"
|
||||
|
||||
Var InstallRunIfSilent
|
||||
Var NoAutomaticUpdates
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; Installer build timestamp.
|
||||
|
@ -628,6 +629,13 @@ Function .onInit
|
|||
StrCpy $InstallRunIfSilent "yes"
|
||||
${EndIf}
|
||||
|
||||
${GetParameters} $R0
|
||||
${GetOptions} $R0 "/noautoupdate" $R0
|
||||
${IfNot} ${Errors}
|
||||
StrCpy $NoAutomaticUpdates "yes"
|
||||
${EndIf}
|
||||
|
||||
|
||||
!insertmacro INSTALLOPTIONS_EXTRACT "NSIS.InstallOptions.ini"
|
||||
|
||||
; uncomment this line if you want to see the language selection
|
||||
|
@ -695,6 +703,10 @@ FunctionEnd
|
|||
Function .onInstSuccess
|
||||
${MementoSectionSave}
|
||||
|
||||
${If} $NoAutomaticUpdates == "yes"
|
||||
WriteRegDWORD HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "skipUpdateCheck" "1"
|
||||
${EndIf}
|
||||
|
||||
${If} ${Silent}
|
||||
${AndIf} $InstallRunIfSilent == "yes"
|
||||
Call LaunchApplication
|
||||
|
|
Loading…
Reference in a new issue