Skip to content

Commit

Permalink
ENH: voicevox-updaterをインストール成功後に削除する (#926)
Browse files Browse the repository at this point in the history
.onInstSuccessでvoicevox-updaterを削除する処理を追加
  • Loading branch information
sabonerune authored Sep 7, 2022
1 parent 2105ff3 commit a7751c6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions build/installer.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -782,3 +782,20 @@ FunctionEnd
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION deleteArchive

!macroend

!macro customHeader
; インストール成功後に%LOCALAPPDATA%\voicevox-updater\を削除する
Function .onInstSuccess
; https://github.com/electron-userland/electron-builder/blob/f717e0ea67cec7c5c298889efee7df724838491a/packages/app-builder-lib/templates/nsis/include/installer.nsh#L77
${if} $installMode == "all"
SetShellVarContext current
${endif}
Push $R0
${GetParent} "$LOCALAPPDATA\${APP_PACKAGE_STORE_FILE}" $R0
RMDir /r "$R0"
Pop $R0
${if} $installMode == "all"
SetShellVarContext all
${endif}
FunctionEnd
!macroend

0 comments on commit a7751c6

Please sign in to comment.