Skip to content

Commit

Permalink
fix(nsis): removing service before uninstall it
Browse files Browse the repository at this point in the history
  • Loading branch information
eythaann committed Jan 14, 2025
1 parent 1139875 commit 0943dfd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 6 additions & 2 deletions templates/installer-hooks.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
; Refresh file associations icons
!insertmacro UPDATEFILEASSOC
; Create the app service
ExecWait '"$INSTDIR\slu-service.exe" install'
FILE "${__FILEDIR__}\..\..\slu-service.exe"
nsExec::Exec '"$INSTDIR\slu-service.exe" install'
Pop $0
!macroend

!macro NSIS_HOOK_PREUNINSTALL
Expand All @@ -17,5 +19,7 @@
; Refresh file associations icons
!insertmacro UPDATEFILEASSOC
; Delete the app service
ExecWait '"$INSTDIR\slu-service.exe" uninstall'
nsExec::Exec '"$INSTDIR\slu-service.exe" uninstall'
Pop $0
Delete "$INSTDIR\slu-service.exe"
!macroend
2 changes: 0 additions & 2 deletions templates/installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,6 @@ Section Install
; Copy main executable
File "${MAINBINARYSRCPATH}"
FILE "${__FILEDIR__}\..\..\seelen_ui.pdb"
FILE "${__FILEDIR__}\..\..\slu-service.exe"

; Copy resources
{{#each resources_dirs}}
Expand Down Expand Up @@ -768,7 +767,6 @@ Section Uninstall
; Copy main executable
Delete "$INSTDIR\${MAINBINARYNAME}.exe"
Delete "$INSTDIR\seelen_ui.pdb"
Delete "$INSTDIR\slu-service.exe"

; Delete resources
{{#each resources}}
Expand Down

0 comments on commit 0943dfd

Please sign in to comment.