From 00925c7782e7a5d331868e013c764bbe53010eff Mon Sep 17 00:00:00 2001 From: sabonerune <102559104+sabonerune@users.noreply.github.com> Date: Mon, 23 May 2022 20:06:00 +0900 Subject: [PATCH] =?UTF-8?q?ENH:=20voicevox-updater=E3=82=92=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=82=B9=E3=83=88=E3=83=BC=E3=83=AB=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E5=BE=8C=E3=81=AB=E5=89=8A=E9=99=A4=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit .onInstSuccessでvoicevox-updaterを削除する処理を追加 --- build/installer.nsh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/build/installer.nsh b/build/installer.nsh index 88859ae665..70c2655650 100644 --- a/build/installer.nsh +++ b/build/installer.nsh @@ -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