Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: voicevox-updaterをインストール成功後に削除する #926

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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