From d718bd914108a716774201a77cba2bf55275f092 Mon Sep 17 00:00:00 2001 From: huzibaca Date: Sun, 24 Nov 2024 08:25:46 +0800 Subject: [PATCH] fix: If an older version of the executable exists, delete it(2) --- src-tauri/packages/windows/installer.nsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src-tauri/packages/windows/installer.nsi b/src-tauri/packages/windows/installer.nsi index 2d4deff5..c73eb68d 100644 --- a/src-tauri/packages/windows/installer.nsi +++ b/src-tauri/packages/windows/installer.nsi @@ -728,6 +728,12 @@ Section Install nsExec::Exec 'netsh int tcp res' !insertmacro CheckIfAppIsRunning !insertmacro CheckAllVergeProcesses + + ; Delete old files before installation + ; Delete clash-verge.desktop + IfFileExists "$INSTDIR\Clash Verge.exe" 0 +2 + Delete "$INSTDIR\Clash Verge.exe" + ; Copy main executable File "${MAINBINARYSRCPATH}"