Skip to content

Commit

Permalink
Windows setup: Fix silent installation
Browse files Browse the repository at this point in the history
Now the setup can be called with /S for a silent installation

Fixes #703
  • Loading branch information
mgmax committed Oct 16, 2024
1 parent d1cc740 commit c757a3d
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions distribute/windows/installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
!define MUI_PAGE_HEADER_SUBTEXT "Please wait while ${AppName} is being installed."
; Uncomment the next line if you want optional components to be selectable
; !insertmacro MUI_PAGE_COMPONENTS
!define MUI_PAGE_CUSTOMFUNCTION_PRE myPreInstfiles
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE RestoreSections
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
Expand Down Expand Up @@ -170,29 +168,8 @@ SectionEnd
;Installer Functions

Function .onInit

;Extract InstallOptions INI Files
Call SetupSections

FunctionEnd

Function myPreInstfiles

Call RestoreSections
SetAutoClose true

FunctionEnd

Function RestoreSections
!insertmacro SelectSection ${SecAppFiles}
!insertmacro SelectSection ${SecCreateShortcut}

FunctionEnd

Function SetupSections
!insertmacro UnselectSection ${SecAppFiles}
!insertmacro UnselectSection ${SecCreateShortcut}
FunctionEnd


;--------------------------------
;Uninstaller Section
Expand Down

0 comments on commit c757a3d

Please sign in to comment.