]> sigrok.org Git - sigrok-cli.git/blobdiff - contrib/sigrok-cli_cross.nsi.in
nsis: Also put firmware files into the installer.
[sigrok-cli.git] / contrib / sigrok-cli_cross.nsi.in
index c68572800e2a43e989ed7f57dfaf6259630e26e4..f9a76b150476ac393467411d6142754fbd5fd278 100644 (file)
@@ -1,7 +1,7 @@
 ##
 ## This file is part of the sigrok-cli project.
 ##
-## Copyright (C) 2011-2013 Uwe Hermann <uwe@hermann-uwe.de>
+## Copyright (C) 2011-2014 Uwe Hermann <uwe@hermann-uwe.de>
 ##
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -78,13 +78,11 @@ RequestExecutionLevel admin
 
 # Path where the cross-compiled sigrok tools and libraries are located.
 # Change this to where-ever you installed libsigrok.a and so on.
-# TODO: Figure out how to use $HOME (of the host that runs "makensis").
-!define CROSS "/home/uwe/sr_mingw"
+!define CROSS "$%HOME%/sr_mingw"
 
 # Path where the cross-compiled MXE tools and libraries are located.
 # Change this to where-ever you installed MXE (and the files it built).
-# TODO: Figure out how to use $HOME (of the host that runs "makensis").
-!define MXE "/home/uwe/mxe-git/usr/i686-pc-mingw32"
+!define MXE "$%HOME%/mxe-git/usr/i686-pc-mingw32"
 
 
 # --- MUI pages ---------------------------------------------------------------
@@ -130,18 +128,24 @@ Section "@PACKAGE_NAME@ (required)" Section1
        # Install the file(s) specified below into the specified directory.
        SetOutPath "$INSTDIR"
 
-       # License file
+       # License file.
        File "../COPYING"
 
-       # sigrok-cli
+       # sigrok-cli.
        File "${CROSS}/bin/@PACKAGE_NAME@.exe"
 
        # Install the file(s) specified below into the specified directory.
        SetOutPath "$INSTDIR\decoders"
 
-       # Protocol decoders
+       # Protocol decoders.
        File /r /x "__pycache__" "${CROSS}/share/libsigrokdecode/decoders/*"
 
+       # Install the file(s) specified below into the specified directory.
+       SetOutPath "$INSTDIR\firmware"
+
+       # Firmware files.
+       File /r "${CROSS}/share/sigrok-firmware/*"
+
        # Generate the uninstaller executable.
        WriteUninstaller "$INSTDIR\Uninstall.exe"
 
@@ -224,8 +228,12 @@ Section "Uninstall"
        # There could be *.pyc files or __pycache__ subdirs and so on.
        RMDir /r "$INSTDIR\decoders\*"
 
+       # Delete the firmware files.
+       File /r "$INSTDIR\firmware\*"
+
        # Delete the install directory and its sub-directories.
        RMDir "$INSTDIR\decoders"
+       RMDir "$INSTDIR\firmware"
        RMDir "$INSTDIR"
 
        # Delete the links from the start menu.