X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=contrib%2Fpulseview_cross.nsi.in;h=14b2807dc936eb54319ad41a656f2c5dd4095185;hb=63ebd7fe196b3418f1a06e73642aa964cacbed93;hp=6c0475cb62e013dddfe94412d06d25bc92855dde;hpb=a7e53a4a73d5775589b8f1336a1f2feec7a60488;p=pulseview.git diff --git a/contrib/pulseview_cross.nsi.in b/contrib/pulseview_cross.nsi.in index 6c0475c..14b2807 100644 --- a/contrib/pulseview_cross.nsi.in +++ b/contrib/pulseview_cross.nsi.in @@ -14,8 +14,7 @@ ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## along with this program; if not, see . ## # @@ -31,6 +30,9 @@ # Include the "Modern UI" header, which gives us the usual Windows look-n-feel. !include "MUI2.nsh" +# Include the file association header so that we can register file extensions. +!include "FileAssociation.nsh" + # --- Global stuff ------------------------------------------------------------ @@ -75,6 +77,13 @@ RequestExecutionLevel admin !define CROSS "@CMAKE_INSTALL_PREFIX@" +# --- Functions --------------------------------------------------------------- + +Function register_sr_files +${registerExtension} "$INSTDIR\pulseview.exe" ".sr" "sigrok session file" +FunctionEnd + + # --- MUI pages --------------------------------------------------------------- # Show a nice "Welcome to the ... Setup Wizard" page. @@ -92,6 +101,14 @@ RequestExecutionLevel admin # Perform the actual installation, i.e. install the files. !insertmacro MUI_PAGE_INSTFILES +# Insert the "Show Readme" button in the finish dialog. We repurpose it for +# registering the .sr file extension. This way, we don't need to add in-depth +# modifications to the finish page. +!define MUI_FINISHPAGE_SHOWREADME "" +!define MUI_FINISHPAGE_SHOWREADME_CHECKED +!define MUI_FINISHPAGE_SHOWREADME_TEXT "Register .sr files with PulseView" +!define MUI_FINISHPAGE_SHOWREADME_FUNCTION register_sr_files + # Show a final "We're done, click Finish to close this wizard" message. !insertmacro MUI_PAGE_FINISH @@ -129,8 +146,8 @@ Section "PulseView (required)" Section1 File "${CROSS}/zadig_xp.exe" # Python - File "${CROSS}/python32.dll" - File "${CROSS}/python32.zip" + File "${CROSS}/python34.dll" + File "${CROSS}/python34.zip" SetOutPath "$INSTDIR\share" @@ -211,8 +228,8 @@ Section "Uninstall" Delete "$INSTDIR\pulseview.exe" Delete "$INSTDIR\zadig.exe" Delete "$INSTDIR\zadig_xp.exe" - Delete "$INSTDIR\python32.dll" - Delete "$INSTDIR\python32.zip" + Delete "$INSTDIR\python34.dll" + Delete "$INSTDIR\python34.zip" # Delete all decoders and everything else in libsigrokdecode/. # There could be *.pyc files or __pycache__ subdirs and so on. @@ -242,6 +259,9 @@ Section "Uninstall" # Delete the registry key(s). DeleteRegKey HKLM "${REGSTR}" + # Unregister any previously registered file extension(s). + ${unregisterExtension} ".sr" "sigrok session file" + SectionEnd