]> sigrok.org Git - sigrok-cli.git/commitdiff
windows: Install data files into share subdirectory
authorDaniel Elstner <redacted>
Sat, 3 Oct 2015 15:50:28 +0000 (17:50 +0200)
committerDaniel Elstner <redacted>
Sat, 3 Oct 2015 15:50:28 +0000 (17:50 +0200)
This allows these files to be found on standard paths relative
to the executable location.

contrib/sigrok-cli_cross.nsi.in

index 0a78f4366a594dc913cbae6cb988309c68184533..6156ea93e4b0bca4cd2af278f2d4b31ad4d4fcc7 100644 (file)
@@ -132,13 +132,13 @@ Section "@PACKAGE_NAME@ (required)" Section1
        File "${CROSS}/python32.dll"
        File "${CROSS}/python32.zip"
 
+       SetOutPath "$INSTDIR\share"
+
        # Protocol decoders.
-       SetOutPath "$INSTDIR\decoders"
-       File /r /x "__pycache__" "${CROSS}/share/libsigrokdecode/decoders/*"
+       File /r /x "__pycache__" /x "*.pyc" "${CROSS}/share/libsigrokdecode"
 
        # Firmware files.
-       SetOutPath "$INSTDIR\firmware"
-       File /r "${CROSS}/share/sigrok-firmware/*"
+       File /r "${CROSS}/share/sigrok-firmware"
 
        # Example *.sr files.
        SetOutPath "$INSTDIR\examples"
@@ -219,19 +219,18 @@ Section "Uninstall"
        Delete "$INSTDIR\python32.dll"
        Delete "$INSTDIR\python32.zip"
 
-       # Delete all decoders and everything else in decoders/.
+       # Delete all decoders and everything else in libsigrokdecode/.
        # There could be *.pyc files or __pycache__ subdirs and so on.
-       RMDir /r "$INSTDIR\decoders\*"
+       RMDir /r "$INSTDIR\share\libsigrokdecode"
 
        # Delete the firmware files.
-       RMDir /r "$INSTDIR\firmware\*"
+       RMDir /r "$INSTDIR\share\sigrok-firmware"
 
        # Delete the example *.sr files.
        RMDir /r "$INSTDIR\examples\*"
 
        # Delete the install directory and its sub-directories.
-       RMDir "$INSTDIR\decoders"
-       RMDir "$INSTDIR\firmware"
+       RMDir "$INSTDIR\share"
        RMDir "$INSTDIR\examples"
        RMDir "$INSTDIR"