RADIUS: Add new dicto from FreeRADIUS
[gd/wireshark/.git] / packaging / nsis / wireshark.nsi
1 ;
2 ; wireshark.nsi
3 ;
4
5 ; Set the compression mechanism first.
6 ; As of NSIS 2.07, solid compression which makes installer about 1MB smaller
7 ; is no longer the default, so use the /SOLID switch.
8 ; This unfortunately is unknown to NSIS prior to 2.07 and creates an error.
9 ; So if you get an error here, please update to at least NSIS 2.07!
10 SetCompressor /SOLID lzma
11 SetCompressorDictSize 64 ; MB
12
13 !include "common.nsh"
14 !include 'LogicLib.nsh'
15
16 ; ============================================================================
17 ; Header configuration
18 ; ============================================================================
19
20 ; The file to write
21 OutFile "${PROGRAM_NAME}-${WIRESHARK_TARGET_PLATFORM}-${VERSION}.exe"
22 ; Installer icon
23 Icon "..\..\image\wiresharkinst.ico"
24
25 ; ============================================================================
26 ; Modern UI
27 ; ============================================================================
28 ; The modern user interface will look much better than the common one.
29 ; However, as the development of the modern UI is still going on, and the script
30 ; syntax changes, you will need exactly that NSIS version, which this script is
31 ; made for. This is the current (December 2003) latest version: V2.0b4
32 ; If you are using a different version, it's not predictable what will happen.
33
34 !include "MUI.nsh"
35 ;!addplugindir ".\Plugins"
36
37 !define MUI_ICON "..\..\image\wiresharkinst.ico"
38 BrandingText "Wireshark Installer (tm)"
39
40 !define MUI_COMPONENTSPAGE_SMALLDESC
41 !define MUI_FINISHPAGE_NOAUTOCLOSE
42 !define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of ${PROGRAM_NAME}.\r\n\r\nBefore starting the installation, make sure ${PROGRAM_NAME} is not running.\r\n\r\nClick 'Next' to continue."
43 ;!define MUI_FINISHPAGE_LINK "Install WinPcap to be able to capture packets from a network."
44 ;!define MUI_FINISHPAGE_LINK_LOCATION "http://www.winpcap.org"
45
46 ; NSIS shows Readme files by opening the Readme file with the default application for
47 ; the file's extension. "README.win32" won't work in most cases, because extension "win32"
48 ; is usually not associated with an appropriate text editor. We should use extension "txt"
49 ; for a text file or "html" for an html README file.
50 !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\NEWS.txt"
51 !define MUI_FINISHPAGE_SHOWREADME_TEXT "Show News"
52 !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
53 !define MUI_FINISHPAGE_RUN "$INSTDIR\${PROGRAM_NAME_PATH_QT}"
54 !define MUI_FINISHPAGE_RUN_NOTCHECKED
55
56 !define MUI_PAGE_CUSTOMFUNCTION_SHOW myShowCallback
57
58 ; ============================================================================
59 ; MUI Pages
60 ; ============================================================================
61
62 !insertmacro MUI_PAGE_WELCOME
63 !insertmacro MUI_PAGE_LICENSE "..\..\COPYING"
64 !insertmacro MUI_PAGE_COMPONENTS
65 Page custom DisplayAdditionalTasksPage
66 !insertmacro MUI_PAGE_DIRECTORY
67 Page custom DisplayWinPcapPage
68 !insertmacro MUI_PAGE_INSTFILES
69 !insertmacro MUI_PAGE_FINISH
70
71 ; ============================================================================
72 ; MUI Languages
73 ; ============================================================================
74
75 !insertmacro MUI_LANGUAGE "English"
76
77 ; ============================================================================
78 ; Reserve Files
79 ; ============================================================================
80
81   ;Things that need to be extracted on first (keep these lines before any File command!)
82   ;Only useful for BZIP2 compression
83
84   ReserveFile "AdditionalTasksPage.ini"
85   ReserveFile "WinPcapPage.ini"
86   !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
87
88 ; ============================================================================
89 ; Section macros
90 ; ============================================================================
91 !include "Sections.nsh"
92
93 ; ========= Macro to unselect and disable a section =========
94
95 !macro DisableSection SECTION
96
97   Push $0
98     SectionGetFlags "${SECTION}" $0
99     IntOp $0 $0 & ${SECTION_OFF}
100     IntOp $0 $0 | ${SF_RO}
101     SectionSetFlags "${SECTION}" $0
102   Pop $0
103
104 !macroend
105
106 ; ========= Macro to enable (unreadonly) a section =========
107 !define SECTION_ENABLE   0xFFFFFFEF
108 !macro EnableSection SECTION
109
110   Push $0
111     SectionGetFlags "${SECTION}" $0
112     IntOp $0 $0 & ${SECTION_ENABLE}
113     SectionSetFlags "${SECTION}" $0
114   Pop $0
115
116 !macroend
117
118 ; ============================================================================
119 ; Command Line
120 ; ============================================================================
121 !include "FileFunc.nsh"
122
123 !insertmacro GetParameters
124 !insertmacro GetOptions
125
126 ; ============================================================================
127 ; License page configuration
128 ; ============================================================================
129 LicenseText "Wireshark is distributed under the GNU General Public License."
130 LicenseData "..\..\COPYING"
131
132 ; ============================================================================
133 ; Component page configuration
134 ; ============================================================================
135 ComponentText "The following components are available for installation."
136
137 ; ============================================================================
138 ; Directory selection page configuration
139 ; ============================================================================
140 ; The text to prompt the user to enter a directory
141 DirText "Choose a directory in which to install ${PROGRAM_NAME}."
142
143 ; The default installation directory
144 !if ${WIRESHARK_TARGET_PLATFORM} == "win64"
145   InstallDir $PROGRAMFILES64\${PROGRAM_NAME}
146 !else
147   InstallDir $PROGRAMFILES\${PROGRAM_NAME}
148 !endif
149
150 ; See if this is an upgrade; if so, use the old InstallDir as default
151 InstallDirRegKey HKEY_LOCAL_MACHINE SOFTWARE\${PROGRAM_NAME} "InstallDir"
152
153
154 ; ============================================================================
155 ; Install page configuration
156 ; ============================================================================
157 ShowInstDetails show
158
159 ; ============================================================================
160 ; Functions and macros
161 ; ============================================================================
162
163 Var EXTENSION
164 ; http://msdn.microsoft.com/en-us/library/windows/desktop/cc144148.aspx
165 Function Associate
166     Push $R0
167 !insertmacro PushFileExtensions
168
169     Pop $EXTENSION
170
171     ${DoUntil} $EXTENSION == ${FILE_EXTENSION_MARKER}
172         ReadRegStr $R0 HKCR $EXTENSION ""
173         StrCmp $R0 "" Associate.doRegister
174         Goto Associate.end
175
176 Associate.doRegister:
177         ;The extension is not associated to any program, we can do the link
178         WriteRegStr HKCR $EXTENSION "" ${WIRESHARK_ASSOC}
179         DetailPrint "Registered file type: $EXTENSION"
180
181 Associate.end:
182         Pop $EXTENSION
183     ${Loop}
184
185     Pop $R0
186 FunctionEnd
187
188 Var OLD_UNINSTALLER
189 Var OLD_INSTDIR
190 Var OLD_DISPLAYNAME
191 Var TMP_UNINSTALLER
192
193 ; ============================================================================
194 ; 64-bit support
195 ; ============================================================================
196 !include x64.nsh
197
198 Function .onInit
199   !if ${WIRESHARK_TARGET_PLATFORM} == "win64"
200     ; http://forums.winamp.com/printthread.php?s=16ffcdd04a8c8d52bee90c0cae273ac5&threadid=262873
201     ${IfNot} ${RunningX64}
202       MessageBox MB_OK "This version of Wireshark only runs on x64 machines.$\nTry installing the 32-bit version instead." /SD IDOK
203       Abort
204     ${EndIf}
205   !endif
206
207     ; Get the Windows version
208     Call GetWindowsVersion
209     Pop $R0 ; Windows Version
210
211     ; Check if we're able to run with this version
212     StrCmp $R0 '95' lbl_winversion_unsupported
213     StrCmp $R0 '98' lbl_winversion_unsupported
214     StrCmp $R0 'ME' lbl_winversion_unsupported
215     StrCmp $R0 'NT 4.0' lbl_winversion_unsupported_nt4
216     StrCmp $R0 '2000' lbl_winversion_unsupported_2000
217     StrCmp $R0 'XP' lbl_winversion_warn_xp
218     Goto lbl_winversion_supported
219
220 lbl_winversion_unsupported:
221     MessageBox MB_OK \
222         "Windows $R0 is no longer supported.$\nPlease install Ethereal 0.99.0 instead." \
223         /SD IDOK
224     Quit
225
226 lbl_winversion_unsupported_nt4:
227     MessageBox MB_OK \
228             "Windows $R0 is no longer supported.$\nPlease install Wireshark 0.99.4 instead." \
229             /SD IDOK
230     Quit
231
232 lbl_winversion_unsupported_2000:
233     MessageBox MB_OK \
234         "Windows $R0 is no longer supported.$\nPlease install Wireshark 1.2 or 1.0 instead." \
235         /SD IDOK
236     Quit
237
238 lbl_winversion_warn_xp:
239     MessageBox MB_YESNO|MB_ICONINFORMATION \
240         "This version of ${PROGRAM_NAME} may not work on Windows $R0.$\nWe recommend ${PROGRAM_NAME} 1.10 instead.$\nDo you want to continue?" \
241         /SD IDYES IDYES lbl_winversion_supported
242     Quit
243
244 lbl_winversion_supported:
245 !insertmacro IsWiresharkRunning
246
247   ; Copied from http://nsis.sourceforge.net/Auto-uninstall_old_before_installing_new
248   ReadRegStr $OLD_UNINSTALLER HKLM \
249     "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}" \
250     "UninstallString"
251   StrCmp $OLD_UNINSTALLER "" done
252
253   ReadRegStr $OLD_INSTDIR HKLM \
254     "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME}.exe" \
255     "Path"
256   StrCmp $OLD_INSTDIR "" done
257
258   ReadRegStr $OLD_DISPLAYNAME HKLM \
259     "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}" \
260     "DisplayName"
261   StrCmp $OLD_DISPLAYNAME "" done
262
263   MessageBox MB_YESNOCANCEL|MB_ICONQUESTION \
264     "$OLD_DISPLAYNAME is already installed.\
265      $\n$\nWould you like to uninstall it first?" \
266       /SD IDYES \
267       IDYES prep_uninstaller \
268       IDNO done
269   Abort
270
271 ; Copy the uninstaller to $TEMP and run it.
272 ; The uninstaller normally does this by itself, but doesn't wait around
273 ; for the executable to finish, which means ExecWait won't work correctly.
274 prep_uninstaller:
275   ClearErrors
276   StrCpy $TMP_UNINSTALLER "$TEMP\${PROGRAM_NAME}_uninstaller.exe"
277   ; ...because we surround UninstallString in quotes.
278   StrCpy $0 $OLD_UNINSTALLER -1 1
279   StrCpy $1 "$TEMP\${PROGRAM_NAME}_uninstaller.exe"
280   StrCpy $2 1
281   System::Call 'kernel32::CopyFile(t r0, t r1, b r2) 1'
282   ExecWait "$TMP_UNINSTALLER /S _?=$OLD_INSTDIR"
283
284   Delete "$TMP_UNINSTALLER"
285
286 done:
287   ;Extract InstallOptions INI files
288   !insertmacro MUI_INSTALLOPTIONS_EXTRACT "AdditionalTasksPage.ini"
289   !insertmacro MUI_INSTALLOPTIONS_EXTRACT "WinpcapPage.ini"
290 FunctionEnd
291
292 Function DisplayAdditionalTasksPage
293   !insertmacro MUI_HEADER_TEXT "Select Additional Tasks" "Which additional tasks should be done?"
294   !insertmacro MUI_INSTALLOPTIONS_DISPLAY "AdditionalTasksPage.ini"
295 FunctionEnd
296
297 Function DisplayWinPcapPage
298   !insertmacro MUI_HEADER_TEXT "Install WinPcap?" "WinPcap is required to capture live network data. Should WinPcap be installed?"
299   !insertmacro MUI_INSTALLOPTIONS_DISPLAY "WinPcapPage.ini"
300 FunctionEnd
301
302 ; ============================================================================
303 ; Installation execution commands
304 ; ============================================================================
305
306 Var WINPCAP_UNINSTALL ;declare variable for holding the value of a registry key
307 ;Var WIRESHARK_UNINSTALL ;declare variable for holding the value of a registry key
308
309 !ifdef VCREDIST_EXE
310 Var VCREDIST_FLAGS ; silent vs passive, norestart
311 !endif
312
313 Section "-Required"
314 ;-------------------------------------------
315
316 ;
317 ; Install for every user
318 ;
319 SetShellVarContext all
320
321 SetOutPath $INSTDIR
322 File "${STAGING_DIR}\${UNINSTALLER_NAME}"
323 File "${STAGING_DIR}\wiretap-${WTAP_VERSION}.dll"
324 !ifdef ENABLE_LIBWIRESHARK
325 File "${STAGING_DIR}\libwireshark.dll"
326 !endif
327 File "${STAGING_DIR}\libwsutil.dll"
328
329 !include all-manifest.nsh
330
331 File "${STAGING_DIR}\COPYING.txt"
332 File "${STAGING_DIR}\NEWS.txt"
333 File "${STAGING_DIR}\README.txt"
334 File "${STAGING_DIR}\README.windows.txt"
335 File "..\..\doc\AUTHORS-SHORT"
336 File "..\..\manuf"
337 File "..\..\services"
338 File "..\..\pdml2html.xsl"
339 File "..\..\doc\ws.css"
340 File "..\..\doc\wireshark.html"
341 File "..\..\doc\wireshark-filter.html"
342 File "${STAGING_DIR}\dumpcap.exe"
343 File "..\..\doc\dumpcap.html"
344 File "..\..\ipmap.html"
345
346 ; C-runtime redistributable
347 !ifdef VCREDIST_EXE
348 ; vcredist_x64.exe - copy and execute the redistributable installer
349 File "${VCREDIST_EXE}"
350 ; If the user already has the redistributable installed they will see a
351 ; Big Ugly Dialog by default, asking if they want to uninstall or repair.
352 ; Ideally we should add a checkbox for this somewhere. In the meantime,
353 ; just do a "passive+norestart" install for MSVC 2010 and later and a
354 ; "silent" install otherwise.
355
356 ; http://blogs.msdn.com/b/astebner/archive/2010/10/20/10078468.aspx
357 ; http://allthingsconfigmgr.wordpress.com/2013/12/17/visual-c-redistributables-made-simple/
358 ; "!if ${MSVC_VER_REQUIRED} >= 1600" doesn't work.
359 !searchparse /noerrors ${MSVC_VER_REQUIRED} "1400" VCREDIST_FLAGS_Q "1500" VCREDIST_FLAGS_Q "1600" VCREDIST_FLAGS_Q_NORESTART
360 !ifdef VCREDIST_FLAGS_Q
361 StrCpy $VCREDIST_FLAGS "/q"
362 !else ; VCREDIST_FLAGS_Q
363 !ifdef VCREDIST_FLAGS_Q_NORESTART
364 StrCpy $VCREDIST_FLAGS "/q /norestart"
365 !else ; VCREDIST_FLAGS_Q_NORESTART
366 StrCpy $VCREDIST_FLAGS "/quiet /norestart"
367 !endif ; VCREDIST_FLAGS_Q_NORESTART
368 !endif ; VCREDIST_FLAGS_Q
369
370 ExecWait '"$INSTDIR\vcredist_${TARGET_MACHINE}.exe" $VCREDIST_FLAGS' $0
371 DetailPrint "vcredist_${TARGET_MACHINE} returned $0"
372 IntCmp $0 3010 redistReboot redistNoReboot
373 redistReboot:
374 SetRebootFlag true
375 redistNoReboot:
376 Delete "$INSTDIR\vcredist_${TARGET_MACHINE}.exe"
377 !else
378 !ifdef MSVCR_DLL
379 ; msvcr*.dll (MSVC V7 or V7.1) - simply copy the dll file
380 !echo "IF YOU GET AN ERROR HERE, check the MSVC_VARIANT setting in config.nmake: MSVC2005 vs. MSVC2005EE."
381 File "${MSVCR_DLL}"
382 !else
383 !if ${MSVC_VARIANT} != "MSVC6"
384 !error "C-Runtime redistributable for this package not available / not redistributable."
385 !endif
386 !endif ; MSVCR_DLL
387 !endif ; VCREDIST_EXE
388
389
390 ; global config files - don't overwrite if already existing
391 ;IfFileExists cfilters dont_overwrite_cfilters
392 File "..\..\cfilters"
393 ;dont_overwrite_cfilters:
394 ;IfFileExists colorfilters dont_overwrite_colorfilters
395 File "..\..\colorfilters"
396 ;dont_overwrite_colorfilters:
397 ;IfFileExists dfilters dont_overwrite_dfilters
398 File "..\..\dfilters"
399 ;dont_overwrite_dfilters:
400 ;IfFileExists smi_modules dont_overwrite_smi_modules
401 File "..\..\smi_modules"
402 ;dont_overwrite_smi_modules:
403
404
405 ;
406 ; Install the Diameter DTD and XML files in the "diameter" subdirectory
407 ; of the installation directory.
408 ;
409 SetOutPath $INSTDIR\diameter
410 File "..\..\diameter\AlcatelLucent.xml"
411 File "..\..\diameter\chargecontrol.xml"
412 File "..\..\diameter\ChinaTelecom.xml"
413 File "..\..\diameter\Cisco.xml"
414 File "..\..\diameter\Custom.xml"
415 File "..\..\diameter\dictionary.dtd"
416 File "..\..\diameter\dictionary.xml"
417 File "..\..\diameter\eap.xml"
418 File "..\..\diameter\Ericsson.xml"
419 File "..\..\diameter\etsie2e4.xml"
420 File "..\..\diameter\SKT.xml"
421 File "..\..\diameter\HP.xml"
422 File "..\..\diameter\mobileipv4.xml"
423 File "..\..\diameter\mobileipv6.xml"
424 File "..\..\diameter\nasreq.xml"
425 File "..\..\diameter\Nokia.xml"
426 File "..\..\diameter\NokiaSolutionsAndNetworks.xml"
427 File "..\..\diameter\sip.xml"
428 File "..\..\diameter\Starent.xml"
429 File "..\..\diameter\sunping.xml"
430 File "..\..\diameter\TGPP.xml"
431 File "..\..\diameter\TGPP2.xml"
432 File "..\..\diameter\VerizonWireless.xml"
433 File "..\..\diameter\Vodafone.xml"
434 !include "custom_diameter_xmls.txt"
435 SetOutPath $INSTDIR
436
437 ;
438 ; Install the RADIUS directory files in the "radius" subdirectory
439 ; of the installation directory.
440 ;
441 SetOutPath $INSTDIR\radius
442 File "..\..\radius\README.radius_dictionary"
443 File "..\..\radius\custom.includes"
444 File "..\..\radius\dictionary"
445 File "..\..\radius\dictionary.3com"
446 File "..\..\radius\dictionary.3gpp"
447 File "..\..\radius\dictionary.3gpp2"
448 File "..\..\radius\dictionary.acc"
449 File "..\..\radius\dictionary.acme"
450 File "..\..\radius\dictionary.airespace"
451 File "..\..\radius\dictionary.actelis"
452 File "..\..\radius\dictionary.aerohive"
453 File "..\..\radius\dictionary.alcatel"
454 File "..\..\radius\dictionary.alcatel.esam"
455 File "..\..\radius\dictionary.alcatel.sr"
456 File "..\..\radius\dictionary.alcatel-lucent.aaa"
457 File "..\..\radius\dictionary.alteon"
458 File "..\..\radius\dictionary.altiga"
459 File "..\..\radius\dictionary.alvarion"
460 File "..\..\radius\dictionary.alvarion.wimax.v2_2"
461 File "..\..\radius\dictionary.apc"
462 File "..\..\radius\dictionary.aptis"
463 File "..\..\radius\dictionary.aruba"
464 File "..\..\radius\dictionary.arbor"
465 File "..\..\radius\dictionary.ascend"
466 File "..\..\radius\dictionary.asn"
467 File "..\..\radius\dictionary.audiocodes"
468 File "..\..\radius\dictionary.avaya"
469 File "..\..\radius\dictionary.azaire"
470 File "..\..\radius\dictionary.bay"
471 File "..\..\radius\dictionary.bluecoat"
472 File "..\..\radius\dictionary.bintec"
473 File "..\..\radius\dictionary.broadsoft"
474 File "..\..\radius\dictionary.brocade"
475 File "..\..\radius\dictionary.bskyb"
476 File "..\..\radius\dictionary.bristol"
477 File "..\..\radius\dictionary.bt"
478 File "..\..\radius\dictionary.camiant"
479 File "..\..\radius\dictionary.cablelabs"
480 File "..\..\radius\dictionary.cabletron"
481 File "..\..\radius\dictionary.chillispot"
482 File "..\..\radius\dictionary.cisco"
483 File "..\..\radius\dictionary.cisco.asa"
484 File "..\..\radius\dictionary.cisco.bbsm"
485 File "..\..\radius\dictionary.cisco.vpn3000"
486 File "..\..\radius\dictionary.cisco.vpn5000"
487 File "..\..\radius\dictionary.citrix"
488 File "..\..\radius\dictionary.clavister"
489 File "..\..\radius\dictionary.colubris"
490 File "..\..\radius\dictionary.columbia_university"
491 File "..\..\radius\dictionary.compatible"
492 File "..\..\radius\dictionary.compat"
493 File "..\..\radius\dictionary.cosine"
494 File "..\..\radius\dictionary.dante"
495 File "..\..\radius\dictionary.dhcp"
496 File "..\..\radius\dictionary.dlink"
497 File "..\..\radius\dictionary.digium"
498 File "..\..\radius\dictionary.dragonwave"
499 File "..\..\radius\dictionary.efficientip"
500 File "..\..\radius\dictionary.eltex"
501 File "..\..\radius\dictionary.epygi"
502 File "..\..\radius\dictionary.equallogic"
503 File "..\..\radius\dictionary.ericsson"
504 File "..\..\radius\dictionary.ericsson.ab"
505 File "..\..\radius\dictionary.ericsson.packet.core.networks"
506 File "..\..\radius\dictionary.erx"
507 File "..\..\radius\dictionary.extreme"
508 File "..\..\radius\dictionary.f5"
509 File "..\..\radius\dictionary.fdxtended"
510 File "..\..\radius\dictionary.fortinet"
511 File "..\..\radius\dictionary.foundry"
512 File "..\..\radius\dictionary.freedhcp"
513 File "..\..\radius\dictionary.freeradius"
514 File "..\..\radius\dictionary.freeradius.internal"
515 File "..\..\radius\dictionary.freeswitch"
516 File "..\..\radius\dictionary.gandalf"
517 File "..\..\radius\dictionary.garderos"
518 File "..\..\radius\dictionary.gemtek"
519 File "..\..\radius\dictionary.h3c"
520 File "..\..\radius\dictionary.hp"
521 File "..\..\radius\dictionary.huawei"
522 File "..\..\radius\dictionary.iana"
523 File "..\..\radius\dictionary.iea"
524 File "..\..\radius\dictionary.infoblox"
525 File "..\..\radius\dictionary.infonet"
526 File "..\..\radius\dictionary.ipunplugged"
527 File "..\..\radius\dictionary.issanni"
528 File "..\..\radius\dictionary.itk"
529 File "..\..\radius\dictionary.jradius"
530 File "..\..\radius\dictionary.juniper"
531 File "..\..\radius\dictionary.kineto"
532 File "..\..\radius\dictionary.karlnet"
533 File "..\..\radius\dictionary.lancom"
534 File "..\..\radius\dictionary.livingston"
535 File "..\..\radius\dictionary.localweb"
536 File "..\..\radius\dictionary.lucent"
537 File "..\..\radius\dictionary.manzara"
538 File "..\..\radius\dictionary.meinberg"
539 File "..\..\radius\dictionary.merit"
540 File "..\..\radius\dictionary.meru"
541 File "..\..\radius\dictionary.microsoft"
542 File "..\..\radius\dictionary.mikrotik"
543 File "..\..\radius\dictionary.motorola"
544 File "..\..\radius\dictionary.motorola.wimax"
545 File "..\..\radius\dictionary.navini"
546 File "..\..\radius\dictionary.netscreen"
547 File "..\..\radius\dictionary.networkphysics"
548 File "..\..\radius\dictionary.nexans"
549 File "..\..\radius\dictionary.nokia"
550 File "..\..\radius\dictionary.nokia.conflict"
551 File "..\..\radius\dictionary.nomadix"
552 File "..\..\radius\dictionary.nortel"
553 File "..\..\radius\dictionary.ntua"
554 File "..\..\radius\dictionary.openser"
555 File "..\..\radius\dictionary.packeteer"
556 File "..\..\radius\dictionary.paloalto"
557 File "..\..\radius\dictionary.patton"
558 File "..\..\radius\dictionary.perle"
559 File "..\..\radius\dictionary.propel"
560 File "..\..\radius\dictionary.prosoft"
561 File "..\..\radius\dictionary.proxim"
562 File "..\..\radius\dictionary.purewave"
563 File "..\..\radius\dictionary.quiconnect"
564 File "..\..\radius\dictionary.quintum"
565 File "..\..\radius\dictionary.redcreek"
566 File "..\..\radius\dictionary.rfc2865"
567 File "..\..\radius\dictionary.rfc2866"
568 File "..\..\radius\dictionary.rfc2867"
569 File "..\..\radius\dictionary.rfc2868"
570 File "..\..\radius\dictionary.rfc2869"
571 File "..\..\radius\dictionary.rfc3162"
572 File "..\..\radius\dictionary.rfc3576"
573 File "..\..\radius\dictionary.rfc3580"
574 File "..\..\radius\dictionary.rfc4072"
575 File "..\..\radius\dictionary.rfc4372"
576 File "..\..\radius\dictionary.rfc4603"
577 File "..\..\radius\dictionary.rfc4675"
578 File "..\..\radius\dictionary.rfc4679"
579 File "..\..\radius\dictionary.rfc4818"
580 File "..\..\radius\dictionary.rfc4849"
581 File "..\..\radius\dictionary.rfc5090"
582 File "..\..\radius\dictionary.rfc5176"
583 File "..\..\radius\dictionary.rfc5447"
584 File "..\..\radius\dictionary.rfc5580"
585 File "..\..\radius\dictionary.rfc5607"
586 File "..\..\radius\dictionary.rfc5904"
587 File "..\..\radius\dictionary.rfc6519"
588 File "..\..\radius\dictionary.rfc6572"
589 File "..\..\radius\dictionary.rfc6677"
590 File "..\..\radius\dictionary.rfc6911"
591 File "..\..\radius\dictionary.rfc6929"
592 File "..\..\radius\dictionary.rfc6930"
593 File "..\..\radius\dictionary.rfc7055"
594 File "..\..\radius\dictionary.rfc7155"
595 File "..\..\radius\dictionary.rfc7268"
596 File "..\..\radius\dictionary.riverbed"
597 File "..\..\radius\dictionary.riverstone"
598 File "..\..\radius\dictionary.roaringpenguin"
599 File "..\..\radius\dictionary.ruckus"
600 File "..\..\radius\dictionary.ruggedcom"
601 File "..\..\radius\dictionary.sg"
602 File "..\..\radius\dictionary.shasta"
603 File "..\..\radius\dictionary.shiva"
604 File "..\..\radius\dictionary.siemens"
605 File "..\..\radius\dictionary.slipstream"
606 File "..\..\radius\dictionary.sofaware"
607 File "..\..\radius\dictionary.sonicwall"
608 File "..\..\radius\dictionary.springtide"
609 File "..\..\radius\dictionary.starent"
610 File "..\..\radius\dictionary.starent.vsa1"
611 File "..\..\radius\dictionary.surfnet"
612 File "..\..\radius\dictionary.symbol"
613 File "..\..\radius\dictionary.t_systems_nova"
614 File "..\..\radius\dictionary.telebit"
615 File "..\..\radius\dictionary.telkom"
616 File "..\..\radius\dictionary.terena"
617 File "..\..\radius\dictionary.trapeze"
618 File "..\..\radius\dictionary.travelping"
619 File "..\..\radius\dictionary.tropos"
620 File "..\..\radius\dictionary.ukerna"
621 File "..\..\radius\dictionary.unix"
622 File "..\..\radius\dictionary.usr"
623 File "..\..\radius\dictionary.utstarcom"
624 File "..\..\radius\dictionary.valemount"
625 File "..\..\radius\dictionary.versanet"
626 File "..\..\radius\dictionary.vqp"
627 File "..\..\radius\dictionary.walabi"
628 File "..\..\radius\dictionary.waverider"
629 File "..\..\radius\dictionary.wichorus"
630 File "..\..\radius\dictionary.wimax"
631 File "..\..\radius\dictionary.wimax.alvarion"
632 File "..\..\radius\dictionary.wimax.wichorus"
633 File "..\..\radius\dictionary.wispr"
634 File "..\..\radius\dictionary.xedia"
635 File "..\..\radius\dictionary.xylan"
636 File "..\..\radius\dictionary.yubico"
637 File "..\..\radius\dictionary.zeus"
638 File "..\..\radius\dictionary.zte"
639 File "..\..\radius\dictionary.zyxel"
640 !include "custom_radius_dict.txt"
641 SetOutPath $INSTDIR
642
643 ;
644 ; install the dtds in the dtds subdirectory
645 ;
646 SetOutPath $INSTDIR\dtds
647 File "..\..\dtds\dc.dtd"
648 File "..\..\dtds\itunes.dtd"
649 File "..\..\dtds\mscml.dtd"
650 File "..\..\dtds\pocsettings.dtd"
651 File "..\..\dtds\presence.dtd"
652 File "..\..\dtds\reginfo.dtd"
653 File "..\..\dtds\rlmi.dtd"
654 File "..\..\dtds\rss.dtd"
655 File "..\..\dtds\smil.dtd"
656 File "..\..\dtds\xcap-caps.dtd"
657 File "..\..\dtds\xcap-error.dtd"
658 File "..\..\dtds\watcherinfo.dtd"
659 SetOutPath $INSTDIR
660
661 ; Install the TPNCP DAT file in the "tpncp" subdirectory
662 ; of the installation directory.
663 SetOutPath $INSTDIR\tpncp
664 File "..\..\tpncp\tpncp.dat"
665
666 ;
667 ; install the wimaxasncp TLV definitions in the wimaxasncp subdirectory
668 ;
669 SetOutPath $INSTDIR\wimaxasncp
670 File "..\..\wimaxasncp\dictionary.xml"
671 File "..\..\wimaxasncp\dictionary.dtd"
672 SetOutPath $INSTDIR
673
674 SetOutPath $INSTDIR\help
675 File "${STAGING_DIR}\help\toc"
676 File "${STAGING_DIR}\help\overview.txt"
677 File "${STAGING_DIR}\help\getting_started.txt"
678 File "${STAGING_DIR}\help\capturing.txt"
679 File "${STAGING_DIR}\help\capture_filters.txt"
680 File "${STAGING_DIR}\help\display_filters.txt"
681 File "${STAGING_DIR}\help\faq.txt"
682
683 ; Write the uninstall keys for Windows
684 ; http://nsis.sourceforge.net/Add_uninstall_information_to_Add/Remove_Programs
685 ; http://msdn.microsoft.com/en-us/library/ms954376.aspx
686 ; http://msdn.microsoft.com/en-us/library/windows/desktop/aa372105.aspx
687 !define UNINSTALL_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}"
688
689 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "Comments" "${DISPLAY_NAME}"
690 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "DisplayIcon" "$INSTDIR\${PROGRAM_NAME_PATH_GTK},0"
691 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "DisplayName" "${DISPLAY_NAME}"
692 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "DisplayVersion" "${VERSION}"
693 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "HelpLink" "http://ask.wireshark.org/"
694 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "InstallLocation" "$INSTDIR"
695 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "Publisher" "The Wireshark developer community, http://www.wireshark.org"
696 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "URLInfoAbout" "http://www.wireshark.org"
697 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "URLUpdateInfo" "http://www.wireshark.org/download.html"
698
699 WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "NoModify" 1
700 WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "NoRepair" 1
701 WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "VersionMajor" ${VERSION_MAJOR}
702 WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "VersionMinor" ${VERSION_MINOR}
703
704 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "UninstallString" '"$INSTDIR\${UNINSTALLER_NAME}"'
705 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "QuietUninstallString" '"$INSTDIR\${UNINSTALLER_NAME}" /S'
706
707 ; Write an entry for ShellExecute
708 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME_PATH_GTK}" "" '$INSTDIR\${PROGRAM_NAME_PATH_GTK}'
709 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME_PATH_GTK}" "Path" '$INSTDIR'
710 !ifdef QT_DIR
711 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME_PATH_QT}" "" '$INSTDIR\${PROGRAM_NAME_PATH_QT}'
712 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME_PATH_QT}" "Path" '$INSTDIR'
713 !endif
714
715 ; Create start menu entries (depending on additional tasks page)
716 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 5" "State"
717 StrCmp $0 "0" SecRequired_skip_StartMenu
718 SetOutPath $PROFILE
719 ;CreateDirectory "$SMPROGRAMS\${PROGRAM_NAME}"
720 ; To quote "http://download.microsoft.com/download/0/4/6/046bbd36-0812-4c22-a870-41911c6487a6/WindowsUserExperience.pdf"
721 ; "Do not include Readme, Help, or Uninstall entries on the Programs menu."
722 Delete "$SMPROGRAMS\${PROGRAM_NAME}\Wireshark Web Site.lnk"
723 ;WriteINIStr "$SMPROGRAMS\${PROGRAM_NAME}\Wireshark Web Site.url" "InternetShortcut" "URL" "http://www.wireshark.org/"
724 CreateShortCut "$SMPROGRAMS\${PROGRAM_NAME_GTK}.lnk" "$INSTDIR\${PROGRAM_NAME_PATH_GTK}" "" "$INSTDIR\${PROGRAM_NAME_PATH_GTK}" 0 "" "" "${PROGRAM_FULL_NAME_GTK}"
725 ;CreateShortCut "$SMPROGRAMS\${PROGRAM_NAME}\Wireshark Manual.lnk" "$INSTDIR\wireshark.html"
726 ;CreateShortCut "$SMPROGRAMS\${PROGRAM_NAME}\Display Filters Manual.lnk" "$INSTDIR\wireshark-filter.html"
727 ;CreateShortCut "$SMPROGRAMS\${PROGRAM_NAME}\Wireshark Program Directory.lnk" "$INSTDIR"
728 SecRequired_skip_StartMenu:
729
730 ; is command line option "/desktopicon" set?
731 ${GetParameters} $R0
732 ${GetOptions} $R0 "/desktopicon=" $R1
733 StrCmp $R1 "no" SecRequired_skip_DesktopIcon
734 StrCmp $R1 "yes" SecRequired_install_DesktopIcon
735
736 ; Create desktop icon (depending on additional tasks page and command line option)
737 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "State"
738 StrCmp $0 "0" SecRequired_skip_DesktopIcon
739 SecRequired_install_DesktopIcon:
740 CreateShortCut "$DESKTOP\${PROGRAM_NAME_GTK}.lnk" "$INSTDIR\${PROGRAM_NAME_PATH_GTK}" "" "$INSTDIR\${PROGRAM_NAME_PATH_GTK}" 0 "" "" "${PROGRAM_FULL_NAME_GTK}"
741 SecRequired_skip_DesktopIcon:
742
743 ; is command line option "/quicklaunchicon" set?
744 ${GetParameters} $R0
745 ${GetOptions} $R0 "/quicklaunchicon=" $R1
746 StrCmp $R1 "no" SecRequired_skip_QuickLaunchIcon
747 StrCmp $R1 "yes" SecRequired_install_QuickLaunchIcon
748
749 ; Create quick launch icon (depending on additional tasks page and command line option)
750 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 7" "State"
751 StrCmp $0 "0" SecRequired_skip_QuickLaunchIcon
752 SecRequired_install_QuickLaunchIcon:
753 CreateShortCut "$QUICKLAUNCH\${PROGRAM_NAME_GTK}.lnk" "$INSTDIR\${PROGRAM_NAME_PATH_GTK}" "" "$INSTDIR\${PROGRAM_NAME_PATH_GTK}" 0 "" "" "${PROGRAM_FULL_NAME_GTK}"
754 SecRequired_skip_QuickLaunchIcon:
755
756 ; Create File Extensions (depending on additional tasks page)
757 ; None Associate
758 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 11" "State"
759 StrCmp $0 "1" SecRequired_skip_FileExtensions
760 ; GTK+ Associate
761 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 10" "State"
762 StrCmp $0 "1" SecRequired_GTK_FileExtensions
763 ; Qt Associate
764 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 9" "State"
765 StrCmp $0 "1" SecRequired_QT_FileExtensions
766
767 SecRequired_GTK_FileExtensions:
768 WriteRegStr HKCR ${WIRESHARK_ASSOC} "" "Wireshark capture file"
769 WriteRegStr HKCR "${WIRESHARK_ASSOC}\Shell\open\command" "" '"$INSTDIR\${PROGRAM_NAME_PATH_GTK}" "%1"'
770 WriteRegStr HKCR "${WIRESHARK_ASSOC}\DefaultIcon" "" '"$INSTDIR\${PROGRAM_NAME_PATH_GTK}",1'
771 Goto SecRequired_Associate_FileExtensions
772
773 SecRequired_QT_FileExtensions:
774 WriteRegStr HKCR ${WIRESHARK_ASSOC} "" "Wireshark capture file"
775 WriteRegStr HKCR "${WIRESHARK_ASSOC}\Shell\open\command" "" '"$INSTDIR\${PROGRAM_NAME_PATH_QT}" "%1"'
776 WriteRegStr HKCR "${WIRESHARK_ASSOC}\DefaultIcon" "" '"$INSTDIR\${PROGRAM_NAME_PATH_QT}",1'
777 Goto SecRequired_Associate_FileExtensions
778
779
780 SecRequired_Associate_FileExtensions:
781 ; We refresh the icon cache down in -Finally.
782 Call Associate
783 ; if somethings added here, add it also to the uninstall section and the AdditionalTask page
784
785 SecRequired_skip_FileExtensions:
786
787
788
789 ; if running as a silent installer, don't try to install winpcap
790 IfSilent SecRequired_skip_Winpcap
791
792 ; Install WinPcap (depending on winpcap page setting)
793 ReadINIStr $0 "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "State"
794 StrCmp $0 "0" SecRequired_skip_Winpcap
795 ; Uinstall old WinPcap first
796 ReadRegStr $WINPCAP_UNINSTALL HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinPcapInst" "UninstallString"
797 IfErrors lbl_winpcap_notinstalled ;if RegKey is unavailable, WinPcap is not installed
798 ; from released version 3.1, WinPcap will uninstall an old version by itself
799 ;ExecWait '$WINPCAP_UNINSTALL' $0
800 ;DetailPrint "WinPcap uninstaller returned $0"
801 lbl_winpcap_notinstalled:
802 SetOutPath $INSTDIR
803 File "${WIRESHARK_LIB_DIR}\WinPcap_${WINPCAP_VERSION}.exe"
804 ExecWait '"$INSTDIR\WinPcap_${WINPCAP_VERSION}.exe"' $0
805 DetailPrint "WinPcap installer returned $0"
806 SecRequired_skip_Winpcap:
807
808 ; If no user profile exists for Wireshark but for Ethereal, copy it over
809 SetShellVarContext current
810 IfFileExists $APPDATA\Wireshark profile_done
811 IfFileExists $APPDATA\Ethereal 0 profile_done
812 ;MessageBox MB_YESNO "This seems to be the first time you use Wireshark. Copy over the personal settings from Ethereal?" /SD IDYES IDNO profile_done
813 CreateDirectory $APPDATA\Wireshark
814 CopyFiles $APPDATA\Ethereal\*.* $APPDATA\Wireshark
815 profile_done:
816 SetShellVarContext all
817
818 SectionEnd ; "Required"
819
820 !ifdef QT_DIR
821 Section "${PROGRAM_NAME}" SecWiresharkQt
822 ;-------------------------------------------
823 ; by default, Wireshark is installed but file is always associate with Wireshark GTK+
824 SetOutPath $INSTDIR
825 File "${QT_DIR}\${PROGRAM_NAME_PATH_QT}"
826 !include qt-dll-manifest.nsh
827 File "${QT_DIR}\*.qm"
828
829 Push $0
830 ;SectionGetFlags ${SecWiresharkQt} $0
831 ;IntOp  $0 $0 & 1
832 ;CreateShortCut "$SMPROGRAMS\${PROGRAM_NAME_QT}.lnk" "$INSTDIR\${PROGRAM_NAME_PATH_QT}" "" "$INSTDIR\${PROGRAM_NAME_PATH_QT}" 0 "" "" "${PROGRAM_FULL_NAME_QT}"
833
834 ; Create start menu entries (depending on additional tasks page)
835 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 2" "State"
836 StrCmp $0 "0" SecRequired_skip_StartMenuQt
837 CreateShortCut "$SMPROGRAMS\${PROGRAM_NAME_QT}.lnk" "$INSTDIR\${PROGRAM_NAME_PATH_QT}" "" "$INSTDIR\${PROGRAM_NAME_PATH_QT}" 0 "" "" "${PROGRAM_FULL_NAME_QT}"
838 SecRequired_skip_StartMenuQt:
839
840 ; is command line option "/desktopicon" set?
841 ${GetParameters} $R0
842 ${GetOptions} $R0 "/desktopicon=" $R1
843 StrCmp $R1 "no" SecRequired_skip_DesktopIconQt
844 StrCmp $R1 "yes" SecRequired_install_DesktopIconQt
845
846 ; Create desktop icon (depending on additional tasks page and command line option)
847 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 3" "State"
848 StrCmp $0 "0" SecRequired_skip_DesktopIconQt
849 SecRequired_install_DesktopIconQt:
850 CreateShortCut "$DESKTOP\${PROGRAM_NAME_QT}.lnk" "$INSTDIR\${PROGRAM_NAME_PATH_QT}" "" "$INSTDIR\${PROGRAM_NAME_PATH_QT}" 0 "" "" "${PROGRAM_FULL_NAME_QT}"
851 SecRequired_skip_DesktopIconQt:
852
853 ; is command line option "/quicklaunchicon" set?
854 ${GetParameters} $R0
855 ${GetOptions} $R0 "/quicklaunchicon=" $R1
856 StrCmp $R1 "no" SecRequired_skip_QuickLaunchIconQt
857 StrCmp $R1 "yes" SecRequired_install_QuickLaunchIconQt
858
859 ; Create quick launch icon (depending on additional tasks page and command line option)
860 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 4" "State"
861 StrCmp $0 "0" SecRequired_skip_QuickLaunchIconQt
862 SecRequired_install_QuickLaunchIconQt:
863 CreateShortCut "$QUICKLAUNCH\${PROGRAM_NAME_QT}.lnk" "$INSTDIR\${PROGRAM_NAME_PATH_QT}" "" "$INSTDIR\${PROGRAM_NAME_PATH_QT}" 0 "" "" "${PROGRAM_FULL_NAME_QT}"
864 SecRequired_skip_QuickLaunchIconQt:
865
866 Pop $0
867 SectionEnd ; "SecWiresharkQt"
868 !endif
869
870
871 Section "TShark" SecTShark
872 ;-------------------------------------------
873 SetOutPath $INSTDIR
874 File "${STAGING_DIR}\tshark.exe"
875 File "..\..\doc\tshark.html"
876 SectionEnd
877
878
879 !ifdef GTK_DIR
880 Section "${PROGRAM_NAME} 1" SecWiresharkGtk
881 ;-------------------------------------------
882 SetOutPath $INSTDIR
883 File "${STAGING_DIR}\${PROGRAM_NAME_PATH_GTK}"
884
885 !include gtk-dll-manifest.nsh
886
887 SectionEnd ; "SecWiresharkGtk"
888 !endif
889
890
891 SectionGroup "Plugins & Extensions" SecPluginsGroup
892
893 Section "Dissector Plugins" SecPlugins
894 ;-------------------------------------------
895 SetOutPath '$INSTDIR\plugins\${VERSION}'
896 File "${STAGING_DIR}\plugins\${VERSION}\docsis.dll"
897 File "${STAGING_DIR}\plugins\${VERSION}\ethercat.dll"
898 File "${STAGING_DIR}\plugins\${VERSION}\gryphon.dll"
899 File "${STAGING_DIR}\plugins\${VERSION}\irda.dll"
900 File "${STAGING_DIR}\plugins\${VERSION}\m2m.dll"
901 File "${STAGING_DIR}\plugins\${VERSION}\opcua.dll"
902 File "${STAGING_DIR}\plugins\${VERSION}\profinet.dll"
903 File "${STAGING_DIR}\plugins\${VERSION}\unistim.dll"
904 File "${STAGING_DIR}\plugins\${VERSION}\wimax.dll"
905 File "${STAGING_DIR}\plugins\${VERSION}\wimaxasncp.dll"
906 File "${STAGING_DIR}\plugins\${VERSION}\wimaxmacphy.dll"
907 !include "custom_plugins.txt"
908 SectionEnd
909
910 Section "Tree Statistics Plugin" SecStatsTree
911 ;-------------------------------------------
912 SetOutPath '$INSTDIR\plugins\${VERSION}'
913 File "${STAGING_DIR}\plugins\${VERSION}\stats_tree.dll"
914 SectionEnd
915
916 Section "Mate - Meta Analysis and Tracing Engine" SecMate
917 ;-------------------------------------------
918 SetOutPath '$INSTDIR\plugins\${VERSION}'
919 File "${STAGING_DIR}\plugins\${VERSION}\mate.dll"
920 SectionEnd
921
922 Section "Configuration Profiles" SecProfiles
923 ;-------------------------------------------
924 ; This should be a function or macro
925 SetOutPath '$INSTDIR\profiles\Bluetooth'
926 File "${STAGING_DIR}\profiles\Bluetooth\colorfilters"
927 SetOutPath '$INSTDIR\profiles\Classic'
928 File "${STAGING_DIR}\profiles\Classic\colorfilters"
929 SectionEnd
930
931 !ifdef SMI_DIR
932 Section "SNMP MIBs" SecMIBs
933 ;-------------------------------------------
934 SetOutPath $INSTDIR\snmp\mibs
935 File "${SMI_DIR}\share\mibs\iana\*"
936 File "${SMI_DIR}\share\mibs\ietf\*"
937 File "${SMI_DIR}\share\mibs\irtf\*"
938 File "${SMI_DIR}\share\mibs\tubs\*"
939 File "${SMI_DIR}\share\pibs\*"
940 File "${SMI_DIR}\share\yang\*.yang"
941 !include "custom_mibs.txt"
942 SectionEnd
943 !endif
944
945 SectionGroupEnd ; "Plugins / Extensions"
946
947
948 SectionGroup "Tools" SecToolsGroup
949
950 Section "Editcap" SecEditcap
951 ;-------------------------------------------
952 SetOutPath $INSTDIR
953 File "${STAGING_DIR}\editcap.exe"
954 File "..\..\doc\editcap.html"
955 SectionEnd
956
957 Section "Text2Pcap" SecText2Pcap
958 ;-------------------------------------------
959 SetOutPath $INSTDIR
960 File "${STAGING_DIR}\text2pcap.exe"
961 File "..\..\doc\text2pcap.html"
962 SectionEnd
963
964 Section "Mergecap" SecMergecap
965 ;-------------------------------------------
966 SetOutPath $INSTDIR
967 File "${STAGING_DIR}\mergecap.exe"
968 File "..\..\doc\mergecap.html"
969 SectionEnd
970
971 Section "Reordercap" SecReordercap
972 ;-------------------------------------------
973 SetOutPath $INSTDIR
974 File "${STAGING_DIR}\reordercap.exe"
975 SectionEnd
976
977 Section "Capinfos" SecCapinfos
978 ;-------------------------------------------
979 SetOutPath $INSTDIR
980 File "${STAGING_DIR}\capinfos.exe"
981 File "..\..\doc\capinfos.html"
982 SectionEnd
983
984 Section "Rawshark" SecRawshark
985 ;-------------------------------------------
986 SetOutPath $INSTDIR
987 File "${STAGING_DIR}\rawshark.exe"
988 File "..\..\doc\rawshark.html"
989 SectionEnd
990
991 SectionGroupEnd ; "Tools"
992
993 !ifdef HHC_DIR
994 Section "User's Guide" SecUsersGuide
995 ;-------------------------------------------
996 SetOutPath $INSTDIR
997 File "user-guide.chm"
998 SectionEnd
999 !endif
1000
1001 Section "-Finally"
1002
1003 !insertmacro UpdateIcons
1004
1005 ; Compute and write the installation directory size
1006 ${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
1007 IntFmt $0 "0x%08X" $0
1008 WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "EstimatedSize" "$0"
1009
1010 SectionEnd
1011
1012 ; ============================================================================
1013 ; PLEASE MAKE SURE, THAT THE DESCRIPTIVE TEXT FITS INTO THE DESCRIPTION FIELD!
1014 ; ============================================================================
1015 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
1016 !ifdef QT_DIR
1017   !insertmacro MUI_DESCRIPTION_TEXT ${SecWiresharkQt} "The main network protocol analyzer application."
1018 !endif
1019   !insertmacro MUI_DESCRIPTION_TEXT ${SecTShark} "Text based network protocol analyzer."
1020 !ifdef GTK_DIR
1021   !insertmacro MUI_DESCRIPTION_TEXT ${SecWiresharkGtk} "The classic user interface."
1022 !endif
1023
1024   !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsGroup} "Plugins and extensions for both ${PROGRAM_NAME} and TShark."
1025   !insertmacro MUI_DESCRIPTION_TEXT ${SecPlugins} "Additional protocol dissectors."
1026   !insertmacro MUI_DESCRIPTION_TEXT ${SecStatsTree} "Extended statistics."
1027   !insertmacro MUI_DESCRIPTION_TEXT ${SecMate} "Plugin - Meta Analysis and Tracing Engine (Experimental)."
1028
1029   !insertmacro MUI_DESCRIPTION_TEXT ${SecProfiles} "Configuration profiles"
1030
1031 !ifdef SMI_DIR
1032   !insertmacro MUI_DESCRIPTION_TEXT ${SecMIBs} "SNMP MIBs for better SNMP dissection."
1033 !endif
1034
1035   !insertmacro MUI_DESCRIPTION_TEXT ${SecToolsGroup} "Additional command line based tools."
1036   !insertmacro MUI_DESCRIPTION_TEXT ${SecEditCap} "Copy packets to a new file, optionally trimmming packets, omitting them, or saving to a different format."
1037   !insertmacro MUI_DESCRIPTION_TEXT ${SecText2Pcap} "Read an ASCII hex dump and write the data into a libpcap-style capture file."
1038   !insertmacro MUI_DESCRIPTION_TEXT ${SecMergecap} "Combine multiple saved capture files into a single output file"
1039   !insertmacro MUI_DESCRIPTION_TEXT ${SecReordercap} "Copy packets to a new file, sorted by time."
1040   !insertmacro MUI_DESCRIPTION_TEXT ${SecCapinfos} "Pring information about capture files."
1041   !insertmacro MUI_DESCRIPTION_TEXT ${SecRawshark} "Raw packet filter."
1042
1043 !ifdef HHC_DIR
1044   !insertmacro MUI_DESCRIPTION_TEXT ${SecUsersGuide} "Install an offline copy of the User's Guide."
1045 !endif
1046 !insertmacro MUI_FUNCTION_DESCRIPTION_END
1047
1048 ; ============================================================================
1049 ; Callback functions
1050 ; ============================================================================
1051 !ifdef QT_DIR
1052 ; Disable File extensions and icon if Wireshark (Qt / GTK+) isn't selected
1053 Function .onSelChange
1054     Push $0
1055     Goto onSelChange.checkqt
1056
1057 ;Check Wireshark Qt and after check GTK+
1058 onSelChange.checkqt:
1059     SectionGetFlags ${SecWiresharkQt} $0
1060     IntOp  $0 $0 & ${SF_SELECTED}
1061     IntCmp $0 0 onSelChange.unselectqt
1062     IntCmp $0 ${SF_SELECTED} onSelChange.selectqt
1063     Goto onSelChange.checkqt
1064
1065 onSelChange.unselectqt:
1066     ; Qt Icon
1067     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 2" "Flags" "DISABLED"
1068     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 2" "State" 0
1069     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 3" "Flags" "DISABLED"
1070     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 3" "State" 0
1071     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 4" "Flags" "DISABLED"
1072     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 4" "State" 0
1073     ; Qt Association
1074     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 9" "State" 0
1075     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 9" "Flags" "DISABLED"
1076     ; Select "None Association"
1077     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 11" "State" 1
1078     Goto onSelChange.checkgtk
1079
1080 onSelChange.selectqt:
1081     ; Qt Icon
1082     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 2" "Flags" ""
1083     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 2" "State" 1
1084     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 3" "Flags" ""
1085     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 3" "State" 0
1086     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 4" "Flags" ""
1087     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 4" "State" 1
1088     ;Qt Association
1089     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 9" "State" 1
1090     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 9" "Flags" ""
1091     ; Force None and GTK+ Association to no selected
1092     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 11" "State" 0
1093     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 10" "State" 0
1094     Goto onSelChange.checkgtk
1095
1096 ;Check Wireshark GTK+
1097 onSelChange.checkgtk:
1098 !ifdef GTK_DIR
1099     SectionGetFlags ${SecWiresharkGtk} $0
1100     IntOp  $0 $0 & ${SF_SELECTED}
1101     IntCmp $0 0 onSelChange.unselectgtk
1102     IntCmp $0 ${SF_SELECTED} onSelChange.selectgtk
1103 !endif
1104     Goto onSelChange.end
1105
1106 !ifdef GTK_DIR
1107 onSelChange.unselectgtk:
1108     ;GTK+ Icon
1109     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 5" "Flags" "DISABLED"
1110     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 5" "State" 0
1111     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "Flags" "DISABLED"
1112     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "State" 0
1113     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 7" "Flags" "DISABLED"
1114     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 7" "State" 0
1115     ;GTK+ Association
1116     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 10" "Flags" "DISABLED"
1117     Goto onSelChange.end
1118
1119 onSelChange.selectgtk:
1120     ;GTK+ Icon
1121     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 5" "Flags" ""
1122     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 5" "State" 1
1123     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "Flags" ""
1124     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "State" 0
1125     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 7" "Flags" ""
1126     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 7" "State" 1
1127     ;GTK+ Association
1128     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 10" "Flags" ""
1129     Goto onSelChange.end
1130 !endif
1131
1132 onSelChange.end:
1133     Pop $0
1134 FunctionEnd
1135 !endif
1136
1137
1138 !include "GetWindowsVersion.nsh"
1139 !include WinMessages.nsh
1140 !include "VersionCompare.nsh"
1141
1142 Var WINPCAP_NAME ; DisplayName from WinPcap installation
1143 Var WINWINPCAP_VERSION ; DisplayVersion from WinPcap installation
1144
1145 Function myShowCallback
1146
1147 !ifdef GTK_DIR
1148     ; If GTK+ is available enable icon and associate from additional tasks
1149     ; GTK+ Icon
1150     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 5" "Flags" ""
1151     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 5" "State" 1
1152     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "Flags" ""
1153     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "State" 0
1154     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 7" "Flags" ""
1155     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 7" "State" 1
1156     ;Qt Association
1157     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 10" "Flags" ""
1158 !endif
1159
1160     ; detect if WinPcap should be installed
1161     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "Text" "Install WinPcap ${PCAP_DISPLAY_VERSION}"
1162     ReadRegStr $WINPCAP_NAME HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinPcapInst" "DisplayName"
1163     IfErrors 0 lbl_winpcap_installed ;if RegKey is available, WinPcap is already installed
1164     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 2" "Text" "WinPcap is currently not installed"
1165     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 2" "Flags" "DISABLED"
1166     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Text" "(Use Add/Remove Programs first to uninstall any undetected old WinPcap versions)"
1167     Goto lbl_winpcap_done
1168
1169 lbl_winpcap_installed:
1170     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 2" "Text" "$WINPCAP_NAME"
1171     ; Compare the installed build against the one we have.
1172     ReadRegStr $WINWINPCAP_VERSION HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinPcapInst" "DisplayVersion"
1173     StrCmp $WINWINPCAP_VERSION "" lbl_winpcap_do_install ; WinPcap is really old(?) or installed improperly.
1174     ${VersionCompare} $WINWINPCAP_VERSION "4.1.0.2980" $1 ; WinPcap 4.1.3
1175     StrCmp $1 "2" lbl_winpcap_do_install
1176
1177 ;lbl_winpcap_dont_install:
1178     ; The installed version is >= to what we have, so don't install
1179     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "State" "0"
1180     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Text" "If selected, the currently installed $WINPCAP_NAME will be uninstalled first."
1181     Goto lbl_winpcap_done
1182
1183 ;lbl_winpcap_dont_upgrade:
1184     ; force the user to upgrade by hand
1185     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "State" "0"
1186     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "Flags" "DISABLED"
1187     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Text" "If you wish to install WinPcap ${PCAP_DISPLAY_VERSION}, please uninstall $WINPCAP_NAME manually first."
1188     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Flags" "DISABLED"
1189     Goto lbl_winpcap_done
1190
1191 lbl_winpcap_do_install:
1192     ; seems to be an old version, install newer one
1193     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "State" "1"
1194     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Text" "The currently installed $WINPCAP_NAME will be uninstalled first."
1195
1196 lbl_winpcap_done:
1197
1198     ; if Wireshark was previously installed, unselect previously not installed icons etc.
1199     ; detect if Wireshark is already installed ->
1200     ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark" "UninstallString"
1201     IfErrors lbl_wireshark_notinstalled ;if RegKey is unavailable, Wireshark is not installed
1202
1203     ; only select Start Menu Group, if previously installed
1204     ; (we use the "all users" start menu, so select it first)
1205     SetShellVarContext all
1206
1207     ;Set State=1 to Desktop icon (no enable by default)
1208     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "State" "1"
1209 !ifdef QT_DIR
1210     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 3" "State" "1"
1211 !endif
1212     IfFileExists "$SMPROGRAMS\${PROGRAM_NAME}\${PROGRAM_NAME}.lnk" lbl_have_gtk_startmenu
1213     IfFileExists "$SMPROGRAMS\${PROGRAM_NAME}.lnk" lbl_have_gtk_startmenu
1214     IfFileExists "$SMPROGRAMS\${PROGRAM_NAME_GTK}.lnk" lbl_have_gtk_startmenu
1215     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 5" "State" "0"
1216 lbl_have_gtk_startmenu:
1217
1218     ; only select Desktop Icon, if previously installed
1219     IfFileExists "$DESKTOP\${PROGRAM_NAME}.lnk" lbl_have_gtk_desktopicon
1220     IfFileExists "$DESKTOP\${PROGRAM_NAME_GTK}.lnk" lbl_have_gtk_desktopicon
1221     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "State" "0"
1222 lbl_have_gtk_desktopicon:
1223
1224     ; only select Quick Launch Icon, if previously installed
1225     IfFileExists "$QUICKLAUNCH\${PROGRAM_NAME}.lnk" lbl_have_gtk_quicklaunchicon
1226     IfFileExists "$QUICKLAUNCH\${PROGRAM_NAME_GTK}.lnk" lbl_have_gtk_quicklaunchicon
1227     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 7" "State" "0"
1228 lbl_have_gtk_quicklaunchicon:
1229
1230 !ifdef QT_DIR
1231     IfFileExists "$SMPROGRAMS\${PROGRAM_NAME_QT}.lnk" lbl_have_qt_startmenu
1232     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 2" "State" "0"
1233 lbl_have_qt_startmenu:
1234
1235     ; only select Desktop Icon, if previously installed
1236     IfFileExists "$DESKTOP\${PROGRAM_NAME_QT}.lnk" lbl_have_qt_desktopicon
1237     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 3" "State" "0"
1238 lbl_have_qt_desktopicon:
1239
1240     ; only select Quick Launch Icon, if previously installed
1241     IfFileExists "$QUICKLAUNCH\${PROGRAM_NAME_QT}.lnk" lbl_have_qt_quicklaunchicon
1242     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 4" "State" "0"
1243 lbl_have_qt_quicklaunchicon:
1244 !endif
1245
1246 lbl_wireshark_notinstalled:
1247
1248 FunctionEnd
1249
1250 ;
1251 ; Editor modelines  -  http://www.wireshark.org/tools/modelines.html
1252 ;
1253 ; Local variables:
1254 ; c-basic-offset: 4
1255 ; tab-width: 8
1256 ; indent-tabs-mode: nil
1257 ; End:
1258 ;
1259 ; vi: set shiftwidth=4 tabstop=8 expandtab:
1260 ; :indentSize=4:tabSize=8:noTabs=true:
1261 ;