Upgrade Windows builds to GnuTLS 3.1.22 and Gcrypt 1.6.0
[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_GTK}"
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 !insertmacro IsWiresharkRunning
208
209   ; Copied from http://nsis.sourceforge.net/Auto-uninstall_old_before_installing_new
210   ReadRegStr $OLD_UNINSTALLER HKLM \
211     "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}" \
212     "UninstallString"
213   StrCmp $OLD_UNINSTALLER "" done
214
215   ReadRegStr $OLD_INSTDIR HKLM \
216     "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME}.exe" \
217     "Path"
218   StrCmp $OLD_INSTDIR "" done
219
220   ReadRegStr $OLD_DISPLAYNAME HKLM \
221     "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}" \
222     "DisplayName"
223   StrCmp $OLD_DISPLAYNAME "" done
224
225   MessageBox MB_YESNOCANCEL|MB_ICONQUESTION \
226     "$OLD_DISPLAYNAME is already installed.\
227      $\n$\nWould you like to uninstall it first?" \
228       /SD IDYES \
229       IDYES prep_uninstaller \
230       IDNO done
231   Abort
232
233 ; Copy the uninstaller to $TEMP and run it.
234 ; The uninstaller normally does this by itself, but doesn't wait around
235 ; for the executable to finish, which means ExecWait won't work correctly.
236 prep_uninstaller:
237   ClearErrors
238   StrCpy $TMP_UNINSTALLER "$TEMP\${PROGRAM_NAME}_uninstaller.exe"
239   ; ...because we surround UninstallString in quotes.
240   StrCpy $0 $OLD_UNINSTALLER -1 1
241   StrCpy $1 "$TEMP\${PROGRAM_NAME}_uninstaller.exe"
242   StrCpy $2 1
243   System::Call 'kernel32::CopyFile(t r0, t r1, b r2) 1'
244   ExecWait "$TMP_UNINSTALLER /S _?=$OLD_INSTDIR"
245
246   Delete "$TMP_UNINSTALLER"
247
248 done:
249   ;Extract InstallOptions INI files
250   !insertmacro MUI_INSTALLOPTIONS_EXTRACT "AdditionalTasksPage.ini"
251   !insertmacro MUI_INSTALLOPTIONS_EXTRACT "WinpcapPage.ini"
252 FunctionEnd
253
254 Function DisplayAdditionalTasksPage
255   !insertmacro MUI_HEADER_TEXT "Select Additional Tasks" "Which additional tasks should be done?"
256   !insertmacro MUI_INSTALLOPTIONS_DISPLAY "AdditionalTasksPage.ini"
257 FunctionEnd
258
259 Function DisplayWinPcapPage
260   !insertmacro MUI_HEADER_TEXT "Install WinPcap?" "WinPcap is required to capture live network data. Should WinPcap be installed?"
261   !insertmacro MUI_INSTALLOPTIONS_DISPLAY "WinPcapPage.ini"
262 FunctionEnd
263
264 ; ============================================================================
265 ; Installation execution commands
266 ; ============================================================================
267
268 Var WINPCAP_UNINSTALL ;declare variable for holding the value of a registry key
269 ;Var WIRESHARK_UNINSTALL ;declare variable for holding the value of a registry key
270
271 !ifdef VCREDIST_EXE
272 Var VCREDIST_FLAGS ; silent vs passive, norestart
273 !endif
274
275 Section "-Required"
276 ;-------------------------------------------
277
278 ;
279 ; Install for every user
280 ;
281 SetShellVarContext all
282
283
284 SetOutPath $INSTDIR
285 File "${STAGING_DIR}\${UNINSTALLER_NAME}"
286 File "${STAGING_DIR}\wiretap-${WTAP_VERSION}.dll"
287 !ifdef ENABLE_LIBWIRESHARK
288 File "${STAGING_DIR}\libwireshark.dll"
289 !endif
290 File "${STAGING_DIR}\libwsutil.dll"
291 File "${STAGING_DIR}\libgio-2.0-0.dll"
292 File "${STAGING_DIR}\libglib-2.0-0.dll"
293 File "${STAGING_DIR}\libgobject-2.0-0.dll"
294 File "${STAGING_DIR}\libgmodule-2.0-0.dll"
295 File "${STAGING_DIR}\libgthread-2.0-0.dll"
296 !ifdef ICONV_DIR
297 File "${STAGING_DIR}\iconv.dll"
298 !endif
299 File "${STAGING_DIR}\${INTL_DLL}"
300 !ifdef ZLIB_DIR
301 File "${STAGING_DIR}\zlib1.dll"
302 !endif
303 !ifdef C_ARES_DIR
304 File "${STAGING_DIR}\libcares-2.dll"
305 !endif
306 !ifdef ADNS_DIR
307 File "${STAGING_DIR}\adns_dll.dll"
308 !endif
309 !ifdef KFW_DIR
310 File "${STAGING_DIR}\comerr32.dll"
311 File "${STAGING_DIR}\krb5_32.dll"
312 File "${STAGING_DIR}\k5sprt32.dll"
313 !endif
314 !ifdef GNUTLS_DIR
315 File "${STAGING_DIR}\libffi-6.dll"
316 File "${STAGING_DIR}\${GCC_DLL}"
317 File "${STAGING_DIR}\libgcrypt-20.dll"
318 File "${STAGING_DIR}\libgmp-10.dll"
319 File "${STAGING_DIR}\libgnutls-28.dll"
320 File "${STAGING_DIR}\${GPGERROR_DLL}"
321 File "${STAGING_DIR}\libhogweed-2-4.dll"
322 File "${STAGING_DIR}\libnettle-4-6.dll"
323 File "${STAGING_DIR}\libp11-kit-0.dll"
324 File "${STAGING_DIR}\libtasn1-6.dll"
325 StrCmp "${INTL_DLL}" "libintl-8.dll" SkipLibIntl8
326 File "${STAGING_DIR}\libintl-8.dll"
327 SkipLibIntl8:
328 !endif
329 !ifdef LUA_DIR
330 File "${STAGING_DIR}\lua52.dll"
331 File "..\..\epan\wslua\init.lua"
332 File "..\..\epan\wslua\console.lua"
333 File "..\..\epan\wslua\dtd_gen.lua"
334 !endif
335 !ifdef SMI_DIR
336 File "${STAGING_DIR}\libsmi-2.dll"
337 !endif
338 !ifdef GEOIP_DIR
339 File "${STAGING_DIR}\libGeoIP-1.dll"
340 !endif
341 !ifdef WINSPARKLE_DIR
342 File "${STAGING_DIR}\WinSparkle.dll"
343 !endif
344 File "${STAGING_DIR}\COPYING.txt"
345 File "${STAGING_DIR}\NEWS.txt"
346 File "${STAGING_DIR}\README.txt"
347 File "${STAGING_DIR}\README.windows.txt"
348 File "..\..\doc\AUTHORS-SHORT"
349 File "..\..\manuf"
350 File "..\..\services"
351 File "..\..\pdml2html.xsl"
352 File "..\..\doc\ws.css"
353 File "..\..\doc\wireshark.html"
354 File "..\..\doc\wireshark-filter.html"
355 File "${STAGING_DIR}\dumpcap.exe"
356 File "..\..\doc\dumpcap.html"
357 File "..\..\ipmap.html"
358
359 ; C-runtime redistributable
360 !ifdef VCREDIST_EXE
361 ; vcredist_x86.exe (MSVC V8) - copy and execute the redistributable installer
362 File "${VCREDIST_EXE}"
363 ; If the user already has the redistributable installed they will see a
364 ; Big Ugly Dialog by default, asking if they want to uninstall or repair.
365 ; Ideally we should add a checkbox for this somewhere. In the meantime,
366 ; just do a "passive+norestart" install for MSVC 2010 and later and a
367 ; "silent" install otherwise.
368
369 ; http://blogs.msdn.com/b/astebner/archive/2010/10/20/10078468.aspx
370 ; "!if ${MSVC_VER_REQUIRED} >= 1600" doesn't work.
371 !searchparse /noerrors ${MSVC_VER_REQUIRED} "1400" VCREDIST_OLD_FLAGS "1500" VCREDIST_OLD_FLAGS
372 !ifdef VCREDIST_OLD_FLAGS
373 StrCpy $VCREDIST_FLAGS "/q"
374 !else ; VCREDIST_OLD_FLAGS
375 StrCpy $VCREDIST_FLAGS "/q /norestart"
376 !endif ; VCREDIST_OLD_FLAGS
377
378 ExecWait '"$INSTDIR\vcredist_${TARGET_MACHINE}.exe" $VCREDIST_FLAGS' $0
379 DetailPrint "vcredist_${TARGET_MACHINE} returned $0"
380 IntCmp $0 3010 redistReboot redistNoReboot
381 redistReboot:
382 SetRebootFlag true
383 redistNoReboot:
384 Delete "$INSTDIR\vcredist_${TARGET_MACHINE}.exe"
385 !else
386 !ifdef MSVCR_DLL
387 ; msvcr*.dll (MSVC V7 or V7.1) - simply copy the dll file
388 !echo "IF YOU GET AN ERROR HERE, check the MSVC_VARIANT setting in config.nmake: MSVC2005 vs. MSVC2005EE."
389 File "${MSVCR_DLL}"
390 !else
391 !if ${MSVC_VARIANT} != "MSVC6"
392 !error "C-Runtime redistributable for this package not available / not redistributable."
393 !endif
394 !endif ; MSVCR_DLL
395 !endif ; VCREDIST_EXE
396
397
398 ; global config files - don't overwrite if already existing
399 ;IfFileExists cfilters dont_overwrite_cfilters
400 File "..\..\cfilters"
401 ;dont_overwrite_cfilters:
402 ;IfFileExists colorfilters dont_overwrite_colorfilters
403 File "..\..\colorfilters"
404 ;dont_overwrite_colorfilters:
405 ;IfFileExists dfilters dont_overwrite_dfilters
406 File "..\..\dfilters"
407 ;dont_overwrite_dfilters:
408 ;IfFileExists smi_modules dont_overwrite_smi_modules
409 File "..\..\smi_modules"
410 ;dont_overwrite_smi_modules:
411
412
413 ;
414 ; Install the Diameter DTD and XML files in the "diameter" subdirectory
415 ; of the installation directory.
416 ;
417 SetOutPath $INSTDIR\diameter
418 File "..\..\diameter\AlcatelLucent.xml"
419 File "..\..\diameter\chargecontrol.xml"
420 File "..\..\diameter\ChinaTelecom.xml"
421 File "..\..\diameter\Cisco.xml"
422 File "..\..\diameter\Custom.xml"
423 File "..\..\diameter\dictionary.dtd"
424 File "..\..\diameter\dictionary.xml"
425 File "..\..\diameter\eap.xml"
426 File "..\..\diameter\Ericsson.xml"
427 File "..\..\diameter\etsie2e4.xml"
428 File "..\..\diameter\gqpolicy.xml"
429 File "..\..\diameter\imscxdx.xml"
430 File "..\..\diameter\SKT.xml"
431 File "..\..\diameter\mobileipv4.xml"
432 File "..\..\diameter\mobileipv6.xml"
433 File "..\..\diameter\nasreq.xml"
434 File "..\..\diameter\Nokia.xml"
435 File "..\..\diameter\NokiaSiemensNetworks.xml"
436 File "..\..\diameter\sip.xml"
437 File "..\..\diameter\Starent.xml"
438 File "..\..\diameter\sunping.xml"
439 File "..\..\diameter\TGPPGmb.xml"
440 File "..\..\diameter\TGPPRx.xml"
441 File "..\..\diameter\TGPPS9.xml"
442 File "..\..\diameter\TGPPSh.xml"
443 File "..\..\diameter\VerizonWireless.xml"
444 File "..\..\diameter\Vodafone.xml"
445 !include "custom_diameter_xmls.txt"
446 SetOutPath $INSTDIR
447
448 ;
449 ; Install the RADIUS directory files in the "radius" subdirectory
450 ; of the installation directory.
451 ;
452 SetOutPath $INSTDIR\radius
453 File "..\..\radius\README.radius_dictionary"
454 File "..\..\radius\custom.includes"
455 File "..\..\radius\dictionary"
456 File "..\..\radius\dictionary.3com"
457 File "..\..\radius\dictionary.3gpp"
458 File "..\..\radius\dictionary.3gpp2"
459 File "..\..\radius\dictionary.acc"
460 File "..\..\radius\dictionary.acme"
461 File "..\..\radius\dictionary.airespace"
462 File "..\..\radius\dictionary.alcatel"
463 File "..\..\radius\dictionary.alcatel.esam"
464 File "..\..\radius\dictionary.alcatel.sr"
465 File "..\..\radius\dictionary.alcatel-lucent.aaa"
466 File "..\..\radius\dictionary.alcatel-lucent.xylan"
467 File "..\..\radius\dictionary.alteon"
468 File "..\..\radius\dictionary.altiga"
469 File "..\..\radius\dictionary.alvarion"
470 File "..\..\radius\dictionary.apc"
471 File "..\..\radius\dictionary.aptis"
472 File "..\..\radius\dictionary.aruba"
473 File "..\..\radius\dictionary.ascend"
474 File "..\..\radius\dictionary.asn"
475 File "..\..\radius\dictionary.audiocodes"
476 File "..\..\radius\dictionary.avaya"
477 File "..\..\radius\dictionary.azaire"
478 File "..\..\radius\dictionary.bay"
479 File "..\..\radius\dictionary.bintec"
480 File "..\..\radius\dictionary.bristol"
481 File "..\..\radius\dictionary.cablelabs"
482 File "..\..\radius\dictionary.cabletron"
483 File "..\..\radius\dictionary.chillispot"
484 File "..\..\radius\dictionary.cisco"
485 File "..\..\radius\dictionary.cisco.bbsm"
486 File "..\..\radius\dictionary.cisco.vpn3000"
487 File "..\..\radius\dictionary.cisco.vpn5000"
488 File "..\..\radius\dictionary.clavister"
489 File "..\..\radius\dictionary.colubris"
490 File "..\..\radius\dictionary.columbia_university"
491 File "..\..\radius\dictionary.compat"
492 File "..\..\radius\dictionary.cosine"
493 File "..\..\radius\dictionary.dhcp"
494 File "..\..\radius\dictionary.digium"
495 File "..\..\radius\dictionary.eltex"
496 File "..\..\radius\dictionary.epygi"
497 File "..\..\radius\dictionary.ericsson"
498 File "..\..\radius\dictionary.erx"
499 File "..\..\radius\dictionary.extreme"
500 File "..\..\radius\dictionary.fortinet"
501 File "..\..\radius\dictionary.foundry"
502 File "..\..\radius\dictionary.freeradius"
503 File "..\..\radius\dictionary.freeradius.internal"
504 File "..\..\radius\dictionary.freeswitch"
505 File "..\..\radius\dictionary.gandalf"
506 File "..\..\radius\dictionary.garderos"
507 File "..\..\radius\dictionary.gemtek"
508 File "..\..\radius\dictionary.h3c"
509 File "..\..\radius\dictionary.hp"
510 File "..\..\radius\dictionary.huawei"
511 File "..\..\radius\dictionary.iea"
512 File "..\..\radius\dictionary.infonet"
513 File "..\..\radius\dictionary.ipunplugged"
514 File "..\..\radius\dictionary.issanni"
515 File "..\..\radius\dictionary.itk"
516 File "..\..\radius\dictionary.jradius"
517 File "..\..\radius\dictionary.juniper"
518 File "..\..\radius\dictionary.karlnet"
519 File "..\..\radius\dictionary.lancom"
520 File "..\..\radius\dictionary.livingston"
521 File "..\..\radius\dictionary.localweb"
522 File "..\..\radius\dictionary.lucent"
523 File "..\..\radius\dictionary.manzara"
524 File "..\..\radius\dictionary.merit"
525 File "..\..\radius\dictionary.microsoft"
526 File "..\..\radius\dictionary.mikrotik"
527 File "..\..\radius\dictionary.motorola"
528 File "..\..\radius\dictionary.motorola.wimax"
529 File "..\..\radius\dictionary.navini"
530 File "..\..\radius\dictionary.netscreen"
531 File "..\..\radius\dictionary.networkphysics"
532 File "..\..\radius\dictionary.nexans"
533 File "..\..\radius\dictionary.nokia"
534 File "..\..\radius\dictionary.nokia.conflict"
535 File "..\..\radius\dictionary.nomadix"
536 File "..\..\radius\dictionary.nortel"
537 File "..\..\radius\dictionary.ntua"
538 File "..\..\radius\dictionary.openser"
539 File "..\..\radius\dictionary.packeteer"
540 File "..\..\radius\dictionary.patton"
541 File "..\..\radius\dictionary.propel"
542 File "..\..\radius\dictionary.prosoft"
543 File "..\..\radius\dictionary.quiconnect"
544 File "..\..\radius\dictionary.quintum"
545 File "..\..\radius\dictionary.redback"
546 File "..\..\radius\dictionary.redcreek"
547 File "..\..\radius\dictionary.rfc2865"
548 File "..\..\radius\dictionary.rfc2866"
549 File "..\..\radius\dictionary.rfc2867"
550 File "..\..\radius\dictionary.rfc2868"
551 File "..\..\radius\dictionary.rfc2869"
552 File "..\..\radius\dictionary.rfc3162"
553 File "..\..\radius\dictionary.rfc3576"
554 File "..\..\radius\dictionary.rfc3580"
555 File "..\..\radius\dictionary.rfc4072"
556 File "..\..\radius\dictionary.rfc4372"
557 File "..\..\radius\dictionary.rfc4603"
558 File "..\..\radius\dictionary.rfc4675"
559 File "..\..\radius\dictionary.rfc4679"
560 File "..\..\radius\dictionary.rfc4818"
561 File "..\..\radius\dictionary.rfc4849"
562 File "..\..\radius\dictionary.rfc5090"
563 File "..\..\radius\dictionary.rfc5176"
564 File "..\..\radius\dictionary.rfc5447"
565 File "..\..\radius\dictionary.rfc5580"
566 File "..\..\radius\dictionary.rfc5607"
567 File "..\..\radius\dictionary.rfc5904"
568 File "..\..\radius\dictionary.rfc6519"
569 File "..\..\radius\dictionary.rfc6572"
570 File "..\..\radius\dictionary.riverstone"
571 File "..\..\radius\dictionary.roaringpenguin"
572 File "..\..\radius\dictionary.shasta"
573 File "..\..\radius\dictionary.shiva"
574 File "..\..\radius\dictionary.slipstream"
575 File "..\..\radius\dictionary.sofaware"
576 File "..\..\radius\dictionary.sonicwall"
577 File "..\..\radius\dictionary.springtide"
578 File "..\..\radius\dictionary.starent"
579 File "..\..\radius\dictionary.t_systems_nova"
580 File "..\..\radius\dictionary.telebit"
581 File "..\..\radius\dictionary.telkom"
582 File "..\..\radius\dictionary.trapeze"
583 File "..\..\radius\dictionary.tropos"
584 File "..\..\radius\dictionary.ukerna"
585 File "..\..\radius\dictionary.unix"
586 File "..\..\radius\dictionary.usr"
587 File "..\..\radius\dictionary.utstarcom"
588 File "..\..\radius\dictionary.valemount"
589 File "..\..\radius\dictionary.versanet"
590 File "..\..\radius\dictionary.vqp"
591 File "..\..\radius\dictionary.walabi"
592 File "..\..\radius\dictionary.waverider"
593 File "..\..\radius\dictionary.wichorus"
594 File "..\..\radius\dictionary.wimax"
595 File "..\..\radius\dictionary.wimax.wichorus"
596 File "..\..\radius\dictionary.wispr"
597 File "..\..\radius\dictionary.xedia"
598 File "..\..\radius\dictionary.zyxel"
599 !include "custom_radius_dict.txt"
600 SetOutPath $INSTDIR
601
602 ;
603 ; install the dtds in the dtds subdirectory
604 ;
605 SetOutPath $INSTDIR\dtds
606 File "..\..\dtds\dc.dtd"
607 File "..\..\dtds\itunes.dtd"
608 File "..\..\dtds\mscml.dtd"
609 File "..\..\dtds\pocsettings.dtd"
610 File "..\..\dtds\presence.dtd"
611 File "..\..\dtds\reginfo.dtd"
612 File "..\..\dtds\rlmi.dtd"
613 File "..\..\dtds\rss.dtd"
614 File "..\..\dtds\smil.dtd"
615 File "..\..\dtds\xcap-caps.dtd"
616 File "..\..\dtds\xcap-error.dtd"
617 File "..\..\dtds\watcherinfo.dtd"
618 SetOutPath $INSTDIR
619
620 ; Install the TPNCP DAT file in the "tpncp" subdirectory
621 ; of the installation directory.
622 SetOutPath $INSTDIR\tpncp
623 File "..\..\tpncp\tpncp.dat"
624
625 ;
626 ; install the wimaxasncp TLV definitions in the wimaxasncp subdirectory
627 ;
628 SetOutPath $INSTDIR\wimaxasncp
629 File "..\..\wimaxasncp\dictionary.xml"
630 File "..\..\wimaxasncp\dictionary.dtd"
631 SetOutPath $INSTDIR
632
633 SetOutPath $INSTDIR\help
634 File "${STAGING_DIR}\help\toc"
635 File "${STAGING_DIR}\help\overview.txt"
636 File "${STAGING_DIR}\help\getting_started.txt"
637 File "${STAGING_DIR}\help\capturing.txt"
638 File "${STAGING_DIR}\help\capture_filters.txt"
639 File "${STAGING_DIR}\help\display_filters.txt"
640 File "${STAGING_DIR}\help\faq.txt"
641
642 ; Write the uninstall keys for Windows
643 ; http://nsis.sourceforge.net/Add_uninstall_information_to_Add/Remove_Programs
644 ; http://msdn.microsoft.com/en-us/library/ms954376.aspx
645 ; http://msdn.microsoft.com/en-us/library/windows/desktop/aa372105.aspx
646 !define UNINSTALL_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}"
647
648 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "Comments" "${DISPLAY_NAME}"
649 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "DisplayIcon" "$INSTDIR\${PROGRAM_NAME_PATH_GTK},0"
650 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "DisplayName" "${DISPLAY_NAME}"
651 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "DisplayVersion" "${VERSION}"
652 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "HelpLink" "http://ask.wireshark.org/"
653 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "InstallLocation" "$INSTDIR"
654 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "Publisher" "The Wireshark developer community, http://www.wireshark.org"
655 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "URLInfoAbout" "http://www.wireshark.org"
656 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "URLUpdateInfo" "http://www.wireshark.org/download.html"
657
658 WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "NoModify" 1
659 WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "NoRepair" 1
660 WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "VersionMajor" ${VERSION_MAJOR}
661 WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "VersionMinor" ${VERSION_MINOR}
662
663 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "UninstallString" '"$INSTDIR\${UNINSTALLER_NAME}"'
664 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "QuietUninstallString" '"$INSTDIR\${UNINSTALLER_NAME}" /S'
665
666 ; Write an entry for ShellExecute
667 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME_PATH_GTK}" "" '$INSTDIR\${PROGRAM_NAME_PATH_GTK}'
668 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME_PATH_GTK}" "Path" '$INSTDIR'
669 !ifdef QT_DIR
670 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME_PATH_QT}" "" '$INSTDIR\${PROGRAM_NAME_PATH_QT}'
671 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME_PATH_QT}" "Path" '$INSTDIR'
672 !endif
673
674 ; Create start menu entries (depending on additional tasks page)
675 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 2" "State"
676 StrCmp $0 "0" SecRequired_skip_StartMenu
677 SetOutPath $PROFILE
678 ;CreateDirectory "$SMPROGRAMS\${PROGRAM_NAME}"
679 ; To quote "http://download.microsoft.com/download/0/4/6/046bbd36-0812-4c22-a870-41911c6487a6/WindowsUserExperience.pdf"
680 ; "Do not include Readme, Help, or Uninstall entries on the Programs menu."
681 Delete "$SMPROGRAMS\${PROGRAM_NAME}\Wireshark Web Site.lnk"
682 ;WriteINIStr "$SMPROGRAMS\${PROGRAM_NAME}\Wireshark Web Site.url" "InternetShortcut" "URL" "http://www.wireshark.org/"
683 CreateShortCut "$SMPROGRAMS\${PROGRAM_NAME_GTK}.lnk" "$INSTDIR\${PROGRAM_NAME_PATH_GTK}" "" "$INSTDIR\${PROGRAM_NAME_PATH_GTK}" 0 "" "" "${PROGRAM_FULL_NAME_GTK}"
684 ;CreateShortCut "$SMPROGRAMS\${PROGRAM_NAME}\Wireshark Manual.lnk" "$INSTDIR\wireshark.html"
685 ;CreateShortCut "$SMPROGRAMS\${PROGRAM_NAME}\Display Filters Manual.lnk" "$INSTDIR\wireshark-filter.html"
686 ;CreateShortCut "$SMPROGRAMS\${PROGRAM_NAME}\Wireshark Program Directory.lnk" "$INSTDIR"
687 SecRequired_skip_StartMenu:
688
689 ; is command line option "/desktopicon" set?
690 ${GetParameters} $R0
691 ${GetOptions} $R0 "/desktopicon=" $R1
692 StrCmp $R1 "no" SecRequired_skip_DesktopIcon
693 StrCmp $R1 "yes" SecRequired_install_DesktopIcon
694
695 ; Create desktop icon (depending on additional tasks page and command line option)
696 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 3" "State"
697 StrCmp $0 "0" SecRequired_skip_DesktopIcon
698 SecRequired_install_DesktopIcon:
699 CreateShortCut "$DESKTOP\${PROGRAM_NAME_GTK}.lnk" "$INSTDIR\${PROGRAM_NAME_PATH_GTK}" "" "$INSTDIR\${PROGRAM_NAME_PATH_GTK}" 0 "" "" "${PROGRAM_FULL_NAME_GTK}"
700 SecRequired_skip_DesktopIcon:
701
702 ; is command line option "/quicklaunchicon" set?
703 ${GetParameters} $R0
704 ${GetOptions} $R0 "/quicklaunchicon=" $R1
705 StrCmp $R1 "no" SecRequired_skip_QuickLaunchIcon
706 StrCmp $R1 "yes" SecRequired_install_QuickLaunchIcon
707
708 ; Create quick launch icon (depending on additional tasks page and command line option)
709 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 4" "State"
710 StrCmp $0 "0" SecRequired_skip_QuickLaunchIcon
711 SecRequired_install_QuickLaunchIcon:
712 CreateShortCut "$QUICKLAUNCH\${PROGRAM_NAME_GTK}.lnk" "$INSTDIR\${PROGRAM_NAME_PATH_GTK}" "" "$INSTDIR\${PROGRAM_NAME_PATH_GTK}" 0 "" "" "${PROGRAM_FULL_NAME_GTK}"
713 SecRequired_skip_QuickLaunchIcon:
714
715 ; Create File Extensions (depending on additional tasks page)
716 ; None Associate
717 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 11" "State"
718 StrCmp $0 "1" SecRequired_skip_FileExtensions
719 ; GTK+ Associate
720 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 9" "State"
721 StrCmp $0 "1" SecRequired_GTK_FileExtensions
722 ; Qt Associate
723 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 10" "State"
724 StrCmp $0 "1" SecRequired_QT_FileExtensions
725
726 SecRequired_GTK_FileExtensions:
727 WriteRegStr HKCR ${WIRESHARK_ASSOC} "" "Wireshark capture file"
728 WriteRegStr HKCR "${WIRESHARK_ASSOC}\Shell\open\command" "" '"$INSTDIR\${PROGRAM_NAME_PATH_GTK}" "%1"'
729 WriteRegStr HKCR "${WIRESHARK_ASSOC}\DefaultIcon" "" '"$INSTDIR\${PROGRAM_NAME_PATH_GTK}",1'
730 Goto SecRequired_Associate_FileExtensions
731
732 SecRequired_QT_FileExtensions:
733 WriteRegStr HKCR ${WIRESHARK_ASSOC} "" "Wireshark capture file"
734 WriteRegStr HKCR "${WIRESHARK_ASSOC}\Shell\open\command" "" '"$INSTDIR\${PROGRAM_NAME_PATH_QT}" "%1"'
735 WriteRegStr HKCR "${WIRESHARK_ASSOC}\DefaultIcon" "" '"$INSTDIR\${PROGRAM_NAME_PATH_QT}",1'
736 Goto SecRequired_Associate_FileExtensions
737
738
739 SecRequired_Associate_FileExtensions:
740 ; We refresh the icon cache down in -Finally.
741 Call Associate
742 ; if somethings added here, add it also to the uninstall section and the AdditionalTask page
743
744 SecRequired_skip_FileExtensions:
745
746
747
748 ; if running as a silent installer, don't try to install winpcap
749 IfSilent SecRequired_skip_Winpcap
750
751 ; Install WinPcap (depending on winpcap page setting)
752 ReadINIStr $0 "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "State"
753 StrCmp $0 "0" SecRequired_skip_Winpcap
754 ; Uinstall old WinPcap first
755 ReadRegStr $WINPCAP_UNINSTALL HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinPcapInst" "UninstallString"
756 IfErrors lbl_winpcap_notinstalled ;if RegKey is unavailable, WinPcap is not installed
757 ; from released version 3.1, WinPcap will uninstall an old version by itself
758 ;ExecWait '$WINPCAP_UNINSTALL' $0
759 ;DetailPrint "WinPcap uninstaller returned $0"
760 lbl_winpcap_notinstalled:
761 SetOutPath $INSTDIR
762 File "${WIRESHARK_LIB_DIR}\WinPcap_${WINPCAP_VERSION}.exe"
763 ExecWait '"$INSTDIR\WinPcap_${WINPCAP_VERSION}.exe"' $0
764 DetailPrint "WinPcap installer returned $0"
765 SecRequired_skip_Winpcap:
766
767 ; If no user profile exists for Wireshark but for Ethereal, copy it over
768 SetShellVarContext current
769 IfFileExists $APPDATA\Wireshark profile_done
770 IfFileExists $APPDATA\Ethereal 0 profile_done
771 ;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
772 CreateDirectory $APPDATA\Wireshark
773 CopyFiles $APPDATA\Ethereal\*.* $APPDATA\Wireshark
774 profile_done:
775 SetShellVarContext all
776
777 SectionEnd ; "Required"
778
779 !ifdef GTK_DIR
780 Section "${PROGRAM_NAME}" SecWiresharkGtk
781 ;-------------------------------------------
782 SetOutPath $INSTDIR
783 File "${STAGING_DIR}\${PROGRAM_NAME_PATH_GTK}"
784 File "${STAGING_DIR}\${GDK_DLL}"
785 File "${STAGING_DIR}\libgdk_pixbuf-2.0-0.dll"
786 File "${STAGING_DIR}\${GTK_DLL}"
787 File "${STAGING_DIR}\libatk-1.0-0.dll"
788 File "${STAGING_DIR}\libpango-1.0-0.dll"
789 File "${STAGING_DIR}\libpangowin32-1.0-0.dll"
790 !ifdef NEED_CAIRO_GOBJECT_DLL
791 File "${STAGING_DIR}\libcairo-gobject-2.dll"
792 !endif
793 !ifdef NEED_CAIRO_DLL
794 File "${STAGING_DIR}\libcairo-2.dll"
795 File "${STAGING_DIR}\libpangocairo-1.0-0.dll"
796 !endif
797 !ifdef NEED_EXPAT_DLL
798 File "${STAGING_DIR}\${EXPAT_DLL}"
799 !endif
800 !ifdef NEED_FFI_DLL
801 File "${STAGING_DIR}\${FFI_DLL}"
802 !endif
803 !ifdef NEED_FONTCONFIG_DLL
804 File "${STAGING_DIR}\${FONTCONFIG_DLL}"
805 !endif
806 !ifdef NEED_FREETYPE_DLL
807 File "${STAGING_DIR}\libpangoft2-1.0-0.dll"
808 File "${STAGING_DIR}\${FREETYPE_DLL}"
809 !endif
810 !ifdef NEED_HARFBUZZ_DLL
811 File "${STAGING_DIR}\${HARFBUZZ_DLL}"
812 !endif
813 !ifdef NEED_JASPER_DLL
814 File "${STAGING_DIR}\${JASPER_DLL}"
815 !endif
816 !ifdef NEED_JPEG_DLL
817 File "${STAGING_DIR}\${JPEG_DLL}"
818 !endif
819 !ifdef NEED_LZMA_DLL
820 File "${STAGING_DIR}\${LZMA_DLL}"
821 !endif
822 !ifdef NEED_PIXMAN_DLL
823 File "${STAGING_DIR}\${PIXMAN_DLL}"
824 !endif
825 !ifdef NEED_PNG_DLL
826 File "${STAGING_DIR}\${PNG_DLL}"
827 !endif
828 !ifdef NEED_SEH_DLL
829 File "${STAGING_DIR}\${SEH_DLL}"
830 !endif
831 !ifdef NEED_SJLJ_DLL
832 File "${STAGING_DIR}\${SJLJ_DLL}"
833 !endif
834 !ifdef NEED_TIFF_DLL
835 File "${STAGING_DIR}\${TIFF_DLL}"
836 !endif
837 !ifdef NEED_XML_DLL
838 File "${STAGING_DIR}\${XML_DLL}"
839 !endif
840
841 SetOutPath $INSTDIR\${GTK_ETC_DIR}
842 File "${GTK_DIR}\${GTK_ETC_DIR}\*.*"
843
844 !ifdef GTK_ENGINES_DIR
845 SetOutPath $INSTDIR\${GTK_ENGINES_DIR}
846 File "${STAGING_DIR}\${GTK_ENGINES_DIR}\libpixmap.dll"
847 File "${STAGING_DIR}\${GTK_ENGINES_DIR}\libwimp.dll"
848 !endif
849
850 !ifdef GTK_MODULES_DIR
851 SetOutPath $INSTDIR\${GTK_MODULES_DIR}
852 File "${STAGING_DIR}\${GTK_MODULES_DIR}\libgail.dll"
853 !endif
854
855 !ifdef GTK_SCHEMAS_DIR
856 SetOutPath $INSTDIR\${GTK_SCHEMAS_DIR}
857 File "${STAGING_DIR}\${GTK_SCHEMAS_DIR}\*.*"
858 !endif
859
860 SectionEnd ; "Wireshark"
861 !endif
862
863
864 Section "TShark" SecTShark
865 ;-------------------------------------------
866 SetOutPath $INSTDIR
867 File "${STAGING_DIR}\tshark.exe"
868 File "..\..\doc\tshark.html"
869 SectionEnd
870
871 !ifdef QT_DIR
872 Section "${PROGRAM_NAME} 2 Preview" SecWiresharkQt
873 ;-------------------------------------------
874 ; by default, QtShark is installed but file is always associate with Wireshark GTK+
875 SetOutPath $INSTDIR
876 File "${QT_DIR}\${PROGRAM_NAME_PATH_QT}"
877 !ifdef NEED_QT4_DLL
878 File "${QT_DIR}\QtCore4.dll"
879 File "${QT_DIR}\QtGui4.dll"
880 !endif
881 !ifdef NEED_QT5_DLL
882 File "${QT_DIR}\Qt5Core.dll"
883 File "${QT_DIR}\Qt5Gui.dll"
884 File "${QT_DIR}\Qt5Widgets.dll"
885 File "${QT_DIR}\Qt5PrintSupport.dll"
886 SetOutPath $INSTDIR\platforms
887 File "${QT_DIR}\platforms\qwindows.dll"
888 !endif
889
890 Push $0
891 ;SectionGetFlags ${SecWiresharkQt} $0
892 ;IntOp  $0 $0 & 1
893 ;CreateShortCut "$SMPROGRAMS\${PROGRAM_NAME_QT}.lnk" "$INSTDIR\${PROGRAM_NAME_PATH_QT}" "" "$INSTDIR\${PROGRAM_NAME_PATH_QT}" 0 "" "" "${PROGRAM_FULL_NAME_QT}"
894
895 ; Create start menu entries (depending on additional tasks page)
896 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 5" "State"
897 StrCmp $0 "0" SecRequired_skip_StartMenuQt
898 CreateShortCut "$SMPROGRAMS\${PROGRAM_NAME_QT}.lnk" "$INSTDIR\${PROGRAM_NAME_PATH_QT}" "" "$INSTDIR\${PROGRAM_NAME_PATH_QT}" 0 "" "" "${PROGRAM_FULL_NAME_QT}"
899 SecRequired_skip_StartMenuQt:
900
901
902 ; is command line option "/desktopicon" set?
903 ${GetParameters} $R0
904 ${GetOptions} $R0 "/desktopicon=" $R1
905 StrCmp $R1 "no" SecRequired_skip_DesktopIconQt
906 StrCmp $R1 "yes" SecRequired_install_DesktopIconQt
907
908 ; Create desktop icon (depending on additional tasks page and command line option)
909 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "State"
910 StrCmp $0 "0" SecRequired_skip_DesktopIconQt
911 SecRequired_install_DesktopIconQt:
912 CreateShortCut "$DESKTOP\${PROGRAM_NAME_QT}.lnk" "$INSTDIR\${PROGRAM_NAME_PATH_QT}" "" "$INSTDIR\${PROGRAM_NAME_PATH_QT}" 0 "" "" "${PROGRAM_FULL_NAME_QT}"
913 SecRequired_skip_DesktopIconQt:
914
915 ; is command line option "/quicklaunchicon" set?
916 ${GetParameters} $R0
917 ${GetOptions} $R0 "/quicklaunchicon=" $R1
918 StrCmp $R1 "no" SecRequired_skip_QuickLaunchIconQt
919 StrCmp $R1 "yes" SecRequired_install_QuickLaunchIconQt
920
921 ; Create quick launch icon (depending on additional tasks page and command line option)
922 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 7" "State"
923 StrCmp $0 "0" SecRequired_skip_QuickLaunchIconQt
924 SecRequired_install_QuickLaunchIconQt:
925 CreateShortCut "$QUICKLAUNCH\${PROGRAM_NAME_QT}.lnk" "$INSTDIR\${PROGRAM_NAME_PATH_QT}" "" "$INSTDIR\${PROGRAM_NAME_PATH_QT}" 0 "" "" "${PROGRAM_FULL_NAME_QT}"
926 SecRequired_skip_QuickLaunchIconQt:
927
928 Pop $0
929 SectionEnd
930 !endif
931
932 SectionGroup "Plugins / Extensions" SecPluginsGroup
933
934 Section "Dissector Plugins" SecPlugins
935 ;-------------------------------------------
936 SetOutPath '$INSTDIR\plugins\${VERSION}'
937 File "${STAGING_DIR}\plugins\${VERSION}\docsis.dll"
938 File "${STAGING_DIR}\plugins\${VERSION}\ethercat.dll"
939 File "${STAGING_DIR}\plugins\${VERSION}\gryphon.dll"
940 File "${STAGING_DIR}\plugins\${VERSION}\irda.dll"
941 File "${STAGING_DIR}\plugins\${VERSION}\m2m.dll"
942 File "${STAGING_DIR}\plugins\${VERSION}\opcua.dll"
943 File "${STAGING_DIR}\plugins\${VERSION}\profinet.dll"
944 File "${STAGING_DIR}\plugins\${VERSION}\unistim.dll"
945 File "${STAGING_DIR}\plugins\${VERSION}\wimax.dll"
946 File "${STAGING_DIR}\plugins\${VERSION}\wimaxasncp.dll"
947 File "${STAGING_DIR}\plugins\${VERSION}\wimaxmacphy.dll"
948 !include "custom_plugins.txt"
949 SectionEnd
950
951 Section "Tree Statistics Plugin" SecStatsTree
952 ;-------------------------------------------
953 SetOutPath '$INSTDIR\plugins\${VERSION}'
954 File "${STAGING_DIR}\plugins\${VERSION}\stats_tree.dll"
955 SectionEnd
956
957 Section "Mate - Meta Analysis and Tracing Engine" SecMate
958 ;-------------------------------------------
959 SetOutPath '$INSTDIR\plugins\${VERSION}'
960 File "${STAGING_DIR}\plugins\${VERSION}\mate.dll"
961 SectionEnd
962
963 Section "Configuration Profiles" SecProfiles
964 ;-------------------------------------------
965 ; This should be a function or macro
966 SetOutPath '$INSTDIR\profiles\Bluetooth'
967 File "${STAGING_DIR}\profiles\Bluetooth\colorfilters"
968 SetOutPath '$INSTDIR\profiles\Classic'
969 File "${STAGING_DIR}\profiles\Classic\colorfilters"
970 SectionEnd
971
972 !ifdef SMI_DIR
973 Section "SNMP MIBs" SecMIBs
974 ;-------------------------------------------
975 SetOutPath $INSTDIR\snmp\mibs
976 File "${SMI_DIR}\share\mibs\iana\*"
977 File "${SMI_DIR}\share\mibs\ietf\*"
978 File "${SMI_DIR}\share\mibs\irtf\*"
979 File "${SMI_DIR}\share\mibs\tubs\*"
980 File "${SMI_DIR}\share\pibs\*"
981 File "${SMI_DIR}\share\yang\*.yang"
982 !include "custom_mibs.txt"
983 SectionEnd
984 !endif
985
986 SectionGroupEnd ; "Plugins / Extensions"
987
988
989 SectionGroup "Tools" SecToolsGroup
990
991 Section "Editcap" SecEditcap
992 ;-------------------------------------------
993 SetOutPath $INSTDIR
994 File "${STAGING_DIR}\editcap.exe"
995 File "..\..\doc\editcap.html"
996 SectionEnd
997
998 Section "Text2Pcap" SecText2Pcap
999 ;-------------------------------------------
1000 SetOutPath $INSTDIR
1001 File "${STAGING_DIR}\text2pcap.exe"
1002 File "..\..\doc\text2pcap.html"
1003 SectionEnd
1004
1005 Section "Mergecap" SecMergecap
1006 ;-------------------------------------------
1007 SetOutPath $INSTDIR
1008 File "${STAGING_DIR}\mergecap.exe"
1009 File "..\..\doc\mergecap.html"
1010 SectionEnd
1011
1012 Section "Reordercap" SecReordercap
1013 ;-------------------------------------------
1014 SetOutPath $INSTDIR
1015 File "${STAGING_DIR}\reordercap.exe"
1016 SectionEnd
1017
1018 Section "Capinfos" SecCapinfos
1019 ;-------------------------------------------
1020 SetOutPath $INSTDIR
1021 File "${STAGING_DIR}\capinfos.exe"
1022 File "..\..\doc\capinfos.html"
1023 SectionEnd
1024
1025 Section "Rawshark" SecRawshark
1026 ;-------------------------------------------
1027 SetOutPath $INSTDIR
1028 File "${STAGING_DIR}\rawshark.exe"
1029 File "..\..\doc\rawshark.html"
1030 SectionEnd
1031
1032 SectionGroupEnd ; "Tools"
1033
1034 !ifdef HHC_DIR
1035 Section "User's Guide" SecUsersGuide
1036 ;-------------------------------------------
1037 SetOutPath $INSTDIR
1038 File "user-guide.chm"
1039 SectionEnd
1040 !endif
1041
1042 Section "-Finally"
1043
1044 !insertmacro UpdateIcons
1045
1046 ; Compute and write the installation directory size
1047 ${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
1048 IntFmt $0 "0x%08X" $0
1049 WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "EstimatedSize" "$0"
1050
1051 SectionEnd
1052
1053
1054 ; ============================================================================
1055 ; PLEASE MAKE SURE, THAT THE DESCRIPTIVE TEXT FITS INTO THE DESCRIPTION FIELD!
1056 ; ============================================================================
1057 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
1058 !ifdef GTK_DIR
1059   !insertmacro MUI_DESCRIPTION_TEXT ${SecWiresharkGtk} "The main network protocol analyzer application."
1060 !endif
1061   !insertmacro MUI_DESCRIPTION_TEXT ${SecTShark} "Text based network protocol analyzer."
1062 !ifdef QT_DIR
1063   !insertmacro MUI_DESCRIPTION_TEXT ${SecWiresharkQt} "Preview of the next major release."
1064 !endif
1065
1066   !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsGroup} "Plugins and extensions for both ${PROGRAM_NAME} and TShark."
1067   !insertmacro MUI_DESCRIPTION_TEXT ${SecPlugins} "Additional protocol dissectors."
1068   !insertmacro MUI_DESCRIPTION_TEXT ${SecStatsTree} "Extended statistics."
1069   !insertmacro MUI_DESCRIPTION_TEXT ${SecMate} "Plugin - Meta Analysis and Tracing Engine (Experimental)."
1070
1071   !insertmacro MUI_DESCRIPTION_TEXT ${SecProfiles} "Configuration profiles"
1072
1073 !ifdef SMI_DIR
1074   !insertmacro MUI_DESCRIPTION_TEXT ${SecMIBs} "SNMP MIBs for better SNMP dissection."
1075 !endif
1076
1077   !insertmacro MUI_DESCRIPTION_TEXT ${SecToolsGroup} "Additional command line based tools."
1078   !insertmacro MUI_DESCRIPTION_TEXT ${SecEditCap} "Copy packets to a new file, optionally trimmming packets, omitting them, or saving to a different format."
1079   !insertmacro MUI_DESCRIPTION_TEXT ${SecText2Pcap} "Read an ASCII hex dump and write the data into a libpcap-style capture file."
1080   !insertmacro MUI_DESCRIPTION_TEXT ${SecMergecap} "Combine multiple saved capture files into a single output file"
1081   !insertmacro MUI_DESCRIPTION_TEXT ${SecReordercap} "Copy packets to a new file, sorted by time."
1082   !insertmacro MUI_DESCRIPTION_TEXT ${SecCapinfos} "Pring information about capture files."
1083   !insertmacro MUI_DESCRIPTION_TEXT ${SecRawshark} "Raw packet filter."
1084
1085 !ifdef HHC_DIR
1086   !insertmacro MUI_DESCRIPTION_TEXT ${SecUsersGuide} "Install an offline copy of the User's Guide."
1087 !endif
1088 !insertmacro MUI_FUNCTION_DESCRIPTION_END
1089
1090 ; ============================================================================
1091 ; Callback functions
1092 ; ============================================================================
1093 !ifdef GTK_DIR
1094 ; Disable File extensions and icon if Wireshark (GTK+ / QT ) isn't selected
1095 Function .onSelChange
1096     Push $0
1097     Goto onSelChange.checkgtk
1098
1099 ;Check Wireshark GTK+ and after check Qt
1100 onSelChange.checkgtk:
1101     SectionGetFlags ${SecWiresharkGtk} $0
1102     IntOp  $0 $0 & 1
1103     IntCmp $0 0 onSelChange.unselectgtk
1104     IntCmp $0 1 onSelChange.selectgtk
1105     Goto onSelChange.checkqt
1106
1107 onSelChange.unselectgtk:
1108     ;GTK Icon
1109     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 2" "Flags" "DISABLED"
1110     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 2" "State" 0
1111     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 3" "Flags" "DISABLED"
1112     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 3" "State" 0
1113     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 4" "Flags" "DISABLED"
1114     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 4" "State" 0
1115     ;GTK Association
1116     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 9" "State" 0
1117     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 9" "Flags" "DISABLED"
1118     ; Select "None Association"
1119     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 11" "State" 1
1120     Goto onSelChange.checkqt
1121
1122 onSelChange.selectgtk:
1123     ;GTK Icon
1124     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 2" "Flags" ""
1125     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 2" "State" 1
1126     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 3" "Flags" ""
1127     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 3" "State" 0
1128     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 4" "Flags" ""
1129     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 4" "State" 1
1130     ;GTK Association
1131     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 9" "State" 1
1132     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 9" "Flags" ""
1133     ; Force None and Qt Association to no selected
1134     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 11" "State" 0
1135     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 10" "State" 0
1136     Goto onSelChange.checkqt
1137
1138 ;Check Wireshark Qt+
1139 onSelChange.checkqt:
1140 !ifdef QT_DIR
1141     SectionGetFlags ${SecWiresharkQt} $0
1142     IntOp  $0 $0 & 1
1143     IntCmp $0 0 onSelChange.unselectqt
1144     IntCmp $0 1 onSelChange.selectqt
1145 !endif
1146     Goto onSelChange.end
1147
1148 !ifdef QT_DIR
1149 onSelChange.unselectqt:
1150     ;Qt Icon
1151     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 5" "Flags" "DISABLED"
1152     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 5" "State" 0
1153     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "Flags" "DISABLED"
1154     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "State" 0
1155     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 7" "Flags" "DISABLED"
1156     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 7" "State" 0
1157     ;Qt Association
1158     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 10" "Flags" "DISABLED"
1159     Goto onSelChange.end
1160
1161 onSelChange.selectqt:
1162     ;Qt Icon
1163     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 5" "Flags" ""
1164     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 5" "State" 1
1165     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "Flags" ""
1166     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "State" 0
1167     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 7" "Flags" ""
1168     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 7" "State" 1
1169     ;Qt Association
1170     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 10" "Flags" ""
1171     Goto onSelChange.end
1172 !endif
1173
1174 onSelChange.end:
1175     Pop $0
1176 FunctionEnd
1177 !endif
1178
1179
1180 !include "GetWindowsVersion.nsh"
1181 !include WinMessages.nsh
1182 !include "VersionCompare.nsh"
1183
1184 Var WINPCAP_NAME ; DisplayName from WinPcap installation
1185 Var WINWINPCAP_VERSION ; DisplayVersion from WinPcap installation
1186
1187 Function myShowCallback
1188
1189 !ifdef QT_DIR
1190     ; if Qt is available enable icon and associate from additional tasks
1191     ;Qt Icon
1192     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 5" "Flags" ""
1193     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 5" "State" 1
1194     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "Flags" ""
1195     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "State" 0
1196     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 7" "Flags" ""
1197     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 7" "State" 1
1198     ;Qt Association
1199     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 10" "Flags" ""
1200 !endif
1201
1202     ; Get the Windows version
1203     Call GetWindowsVersion
1204     Pop $R0 ; Windows Version
1205
1206     ; Check if we're able to run with this version
1207     StrCmp $R0 '95' lbl_winversion_unsupported
1208     StrCmp $R0 '98' lbl_winversion_unsupported
1209     StrCmp $R0 'ME' lbl_winversion_unsupported
1210     StrCmp $R0 'NT 4.0' lbl_winversion_unsupported_nt4
1211     StrCmp $R0 '2000' lbl_winversion_unsupported_2000
1212     StrCmp $R0 'XP' lbl_winversion_warn_xp
1213     Goto lbl_winversion_supported
1214
1215 lbl_winversion_unsupported:
1216     MessageBox MB_OK \
1217         "Windows $R0 is no longer supported.$\nPlease install Ethereal 0.99.0 instead." \
1218         /SD IDOK
1219     Quit
1220
1221 lbl_winversion_unsupported_nt4:
1222     MessageBox MB_OK \
1223             "Windows $R0 is no longer supported.$\nPlease install Wireshark 0.99.4 instead." \
1224             /SD IDOK
1225     Quit
1226
1227 lbl_winversion_unsupported_2000:
1228     MessageBox MB_OK \
1229         "Windows $R0 is no longer supported.$\nPlease install Wireshark 1.2 or 1.0 instead." \
1230         /SD IDOK
1231     Quit
1232
1233 lbl_winversion_warn_xp:
1234     MessageBox MB_OK \
1235         "This version of ${PROGRAM_NAME} may not work on Windows $R0.$\nWe recommend Wireshark 1.10 instead." \
1236         /SD IDOK
1237     ; Don't quit.
1238
1239 lbl_winversion_supported:
1240     ; detect if WinPcap should be installed
1241     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "Text" "Install WinPcap ${PCAP_DISPLAY_VERSION}"
1242     ReadRegStr $WINPCAP_NAME HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinPcapInst" "DisplayName"
1243     IfErrors 0 lbl_winpcap_installed ;if RegKey is available, WinPcap is already installed
1244     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 2" "Text" "WinPcap is currently not installed"
1245     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 2" "Flags" "DISABLED"
1246     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Text" "(Use Add/Remove Programs first to uninstall any undetected old WinPcap versions)"
1247     Goto lbl_winpcap_done
1248
1249 lbl_winpcap_installed:
1250     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 2" "Text" "$WINPCAP_NAME"
1251     ; Compare the installed build against the one we have.
1252     ReadRegStr $WINWINPCAP_VERSION HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinPcapInst" "DisplayVersion"
1253     StrCmp $WINWINPCAP_VERSION "" lbl_winpcap_do_install ; WinPcap is really old(?) or installed improperly.
1254     ${VersionCompare} $WINWINPCAP_VERSION "4.1.0.2980" $1 ; WinPcap 4.1.3
1255     StrCmp $1 "2" lbl_winpcap_do_install
1256
1257 ;lbl_winpcap_dont_install:
1258     ; The installed version is >= to what we have, so don't install
1259     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "State" "0"
1260     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Text" "If selected, the currently installed $WINPCAP_NAME will be uninstalled first."
1261     Goto lbl_winpcap_done
1262
1263 ;lbl_winpcap_dont_upgrade:
1264     ; force the user to upgrade by hand
1265     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "State" "0"
1266     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "Flags" "DISABLED"
1267     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Text" "If you wish to install WinPcap ${PCAP_DISPLAY_VERSION}, please uninstall $WINPCAP_NAME manually first."
1268     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Flags" "DISABLED"
1269     Goto lbl_winpcap_done
1270
1271 lbl_winpcap_do_install:
1272     ; seems to be an old version, install newer one
1273     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "State" "1"
1274     WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Text" "The currently installed $WINPCAP_NAME will be uninstalled first."
1275
1276 lbl_winpcap_done:
1277
1278     ; if Wireshark was previously installed, unselect previously not installed icons etc.
1279     ; detect if Wireshark is already installed ->
1280     ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark" "UninstallString"
1281     IfErrors lbl_wireshark_notinstalled ;if RegKey is unavailable, Wireshark is not installed
1282
1283     ; only select Start Menu Group, if previously installed
1284     ; (we use the "all users" start menu, so select it first)
1285     SetShellVarContext all
1286
1287     ;Set State=1 to Desktop icon (no enable by default)
1288     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 3" "State" "1"
1289 !ifdef QT_DIR
1290     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "State" "1"
1291 !endif
1292     IfFileExists "$SMPROGRAMS\${PROGRAM_NAME}\${PROGRAM_NAME}.lnk" lbl_have_gtk_startmenu
1293     IfFileExists "$SMPROGRAMS\${PROGRAM_NAME}.lnk" lbl_have_gtk_startmenu
1294     IfFileExists "$SMPROGRAMS\${PROGRAM_NAME_GTK}.lnk" lbl_have_gtk_startmenu
1295     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 2" "State" "0"
1296 lbl_have_gtk_startmenu:
1297
1298     ; only select Desktop Icon, if previously installed
1299     IfFileExists "$DESKTOP\${PROGRAM_NAME}.lnk" lbl_have_gtk_desktopicon
1300     IfFileExists "$DESKTOP\${PROGRAM_NAME_GTK}.lnk" lbl_have_gtk_desktopicon
1301     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 3" "State" "0"
1302 lbl_have_gtk_desktopicon:
1303
1304     ; only select Quick Launch Icon, if previously installed
1305     IfFileExists "$QUICKLAUNCH\${PROGRAM_NAME}.lnk" lbl_have_gtk_quicklaunchicon
1306     IfFileExists "$QUICKLAUNCH\${PROGRAM_NAME_GTK}.lnk" lbl_have_gtk_quicklaunchicon
1307     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 4" "State" "0"
1308 lbl_have_gtk_quicklaunchicon:
1309
1310 !ifdef QT_DIR
1311     IfFileExists "$SMPROGRAMS\${PROGRAM_NAME_QT}.lnk" lbl_have_qt_startmenu
1312     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 5" "State" "0"
1313 lbl_have_qt_startmenu:
1314
1315     ; only select Desktop Icon, if previously installed
1316     IfFileExists "$DESKTOP\${PROGRAM_NAME_QT}.lnk" lbl_have_qt_desktopicon
1317     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "State" "0"
1318 lbl_have_qt_desktopicon:
1319
1320     ; only select Quick Launch Icon, if previously installed
1321     IfFileExists "$QUICKLAUNCH\${PROGRAM_NAME_QT}.lnk" lbl_have_qt_quicklaunchicon
1322     WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 7" "State" "0"
1323 lbl_have_qt_quicklaunchicon:
1324 !endif
1325
1326 lbl_wireshark_notinstalled:
1327
1328 FunctionEnd
1329
1330 ;
1331 ; Editor modelines  -  http://www.wireshark.org/tools/modelines.html
1332 ;
1333 ; Local variables:
1334 ; c-basic-offset: 4
1335 ; tab-width: 8
1336 ; indent-tabs-mode: nil
1337 ; End:
1338 ;
1339 ; vi: set shiftwidth=4 tabstop=8 expandtab:
1340 ; :indentSize=4:tabSize=8:noTabs=true:
1341 ;