Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

Preserve local LLM models during Windows app updates

Gabriel Steina0314929dcd1
diff --git a/resources/nsis/cleanup-models.nsh b/resources/nsis/cleanup-models.nsh
index fbf7ef285..90231e5e5 100644
--- a/resources/nsis/cleanup-models.nsh
+++ b/resources/nsis/cleanup-models.nsh
@@ -1,8 +1,10 @@
!macro customUnInstall
- StrCpy $0 "$PROFILE\.cache\openwhispr\models"
- IfFileExists "$0\*.*" 0 +3
- RMDir /r "$0"
- DetailPrint "Removed OpenWhispr cached models"
- StrCpy $1 "$PROFILE\.cache\openwhispr"
- RMDir "$1"
+ ${ifNot} ${isUpdated}
+ StrCpy $0 "$PROFILE\.cache\openwhispr\models"
+ IfFileExists "$0\*.*" 0 +3
+ RMDir /r "$0"
+ DetailPrint "Removed OpenWhispr cached models"
+ StrCpy $1 "$PROFILE\.cache\openwhispr"
+ RMDir "$1"
+ ${endIf}
!macroend