From bf627f7065138ab21a25302b0f0e86b5111f692c Mon Sep 17 00:00:00 2001 From: Soeren Apel Date: Sun, 4 Jun 2017 19:28:26 +0200 Subject: [PATCH] Installer: Force icon cache refresh --- contrib/pulseview_cross.nsi.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/contrib/pulseview_cross.nsi.in b/contrib/pulseview_cross.nsi.in index 14b2807d..fe6b7736 100644 --- a/contrib/pulseview_cross.nsi.in +++ b/contrib/pulseview_cross.nsi.in @@ -76,11 +76,18 @@ RequestExecutionLevel admin # Change this to where-ever you installed libsigrok.a and so on. !define CROSS "@CMAKE_INSTALL_PREFIX@" +# Defines for WinAPI SHChangeNotify call. +!define SHCNE_ASSOCCHANGED 0x8000000 +!define SHCNF_IDLIST 0 + # --- Functions --------------------------------------------------------------- Function register_sr_files -${registerExtension} "$INSTDIR\pulseview.exe" ".sr" "sigrok session file" + ${registerExtension} "$INSTDIR\pulseview.exe" ".sr" "sigrok session file" + + # Force Windows to update the icon cache so that the icon for .sr files shows up. + System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)' FunctionEnd -- 2.30.2