X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=contrib%2Fpulseview_cross.nsi.in;h=8f0a6fe9bc936d7036f4b89d197446b69255f001;hp=14b2807dc936eb54319ad41a656f2c5dd4095185;hb=ebe0a19686181a2ca873219fce38217856b5d82c;hpb=63ebd7fe196b3418f1a06e73642aa964cacbed93 diff --git a/contrib/pulseview_cross.nsi.in b/contrib/pulseview_cross.nsi.in index 14b2807d..8f0a6fe9 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 @@ -262,6 +269,8 @@ Section "Uninstall" # Unregister any previously registered file extension(s). ${unregisterExtension} ".sr" "sigrok session file" + # Force Windows to update the icon cache so that the icon for .sr files is reset. + System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)' SectionEnd