Skip to content

Commit a7e53a4

Browse files
danielkittauwehermann
authored andcommitted
windows: Install data files into share subdirectory
This allows these files to be found on standard paths relative to the location of the executable.
1 parent 2388a73 commit a7e53a4

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

contrib/pulseview_cross.nsi.in

+8-9
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,13 @@ Section "PulseView (required)" Section1
132132
File "${CROSS}/python32.dll"
133133
File "${CROSS}/python32.zip"
134134

135+
SetOutPath "$INSTDIR\share"
136+
135137
# Protocol decoders.
136-
SetOutPath "$INSTDIR\decoders"
137-
File /r /x "__pycache__" "${CROSS}/share/libsigrokdecode/decoders/*"
138+
File /r /x "__pycache__" /x "*.pyc" "${CROSS}/share/libsigrokdecode"
138139

139140
# Firmware files.
140-
SetOutPath "$INSTDIR\firmware"
141-
File /r "${CROSS}/share/sigrok-firmware/*"
141+
File /r "${CROSS}/share/sigrok-firmware"
142142

143143
# Example *.sr files.
144144
SetOutPath "$INSTDIR\examples"
@@ -214,19 +214,18 @@ Section "Uninstall"
214214
Delete "$INSTDIR\python32.dll"
215215
Delete "$INSTDIR\python32.zip"
216216

217-
# Delete all decoders and everything else in decoders/.
217+
# Delete all decoders and everything else in libsigrokdecode/.
218218
# There could be *.pyc files or __pycache__ subdirs and so on.
219-
RMDir /r "$INSTDIR\decoders\*"
219+
RMDir /r "$INSTDIR\share\libsigrokdecode"
220220

221221
# Delete the firmware files.
222-
RMDir /r "$INSTDIR\firmware\*"
222+
RMDir /r "$INSTDIR\share\sigrok-firmware"
223223

224224
# Delete the example *.sr files.
225225
RMDir /r "$INSTDIR\examples\*"
226226

227227
# Delete the install directory and its sub-directories.
228-
RMDir "$INSTDIR\decoders"
229-
RMDir "$INSTDIR\firmware"
228+
RMDir "$INSTDIR\share"
230229
RMDir "$INSTDIR\examples"
231230
RMDir "$INSTDIR"
232231

0 commit comments

Comments
 (0)