From 35ad85a0cd1e4a37f1a219f4b2af0cc92a48add9 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 18 Jun 2025 19:03:26 +0700 Subject: [PATCH] Touch pyproject.toml upon install, so we check for updates --- qt/launcher/win/anki.template.nsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/qt/launcher/win/anki.template.nsi b/qt/launcher/win/anki.template.nsi index 70722aab9..7b2bfd8fc 100644 --- a/qt/launcher/win/anki.template.nsi +++ b/qt/launcher/win/anki.template.nsi @@ -224,6 +224,10 @@ Section "" WriteUninstaller "uninstall.exe" !endif + ; Ensure uv gets re-run + Push "$INSTDIR\pyproject.toml" + Call TouchFile + ; Launch Anki after installation Exec "$INSTDIR\anki.exe" Quit @@ -232,6 +236,17 @@ SectionEnd ; end the section ;-------------------------------- +; Touch file function to update mtime using copy trick +Function TouchFile + Exch $R0 ; file path + + nsExec::Exec 'cmd /c "copy /B "$R0" +,,"' + + Pop $R0 +FunctionEnd + +;-------------------------------- + ; Uninstaller function un.onInit