Skip to content
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
14 changes: 14 additions & 0 deletions src-tauri/src/bundle/windows/nsis/installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -1137,10 +1137,24 @@ Function SetupPhcode

FunctionEnd

; Bundled dependencies are one release unit. Overlaying upgrades leaves removed nested
; packages on disk, where Node can resolve them instead of the new release's dependencies.
; Never defer this cleanup until reboot: that would allow a mixed dependency tree to launch.
!macro CleanBundledNodeResources
${If} ${FileExists} "$INSTDIR\src-node\*.*"
ClearErrors
RMDir /r "$INSTDIR\src-node"
${If} ${Errors}
Abort "$(unableToUninstall)"
${EndIf}
${EndIf}
!macroend

Section Install
SetOutPath $INSTDIR

!insertmacro CheckIfAppIsRunning
!insertmacro CleanBundledNodeResources

; Copy main executable
File "${MAINBINARYSRCPATH}"
Expand Down
Loading