Stop building and distributing the asn1 plugin. I bleleve it to be obsolete.
[metze/wireshark/wip.git] / packaging / nsis / wireshark.nsi
1 ;
2 ; wireshark.nsi
3 ;
4 ; $Id$
5
6
7 ; Set the compression mechanism first.
8 ; As of NSIS 2.07, solid compression which makes installer about 1MB smaller
9 ; is no longer the default, so use the /SOLID switch.
10 ; This unfortunately is unknown to NSIS prior to 2.07 and creates an error.
11 ; So if you get an error here, please update to at least NSIS 2.07!
12 SetCompressor /SOLID lzma
13 SetCompressorDictSize 64 ; MB
14
15 !include "common.nsh"
16 !include 'LogicLib.nsh'
17
18 ; ============================================================================
19 ; Header configuration
20 ; ============================================================================
21
22 ; The file to write
23 OutFile "${PROGRAM_NAME}-${WIRESHARK_TARGET_PLATFORM}-${VERSION}.exe"
24 ; Installer icon
25 Icon "..\..\image\wiresharkinst.ico"
26
27 ; ============================================================================
28 ; Modern UI
29 ; ============================================================================
30 ; The modern user interface will look much better than the common one.
31 ; However, as the development of the modern UI is still going on, and the script
32 ; syntax changes, you will need exactly that NSIS version, which this script is
33 ; made for. This is the current (December 2003) latest version: V2.0b4
34 ; If you are using a different version, it's not predictable what will happen.
35
36 !include "MUI.nsh"
37 ;!addplugindir ".\Plugins"
38
39 !define MUI_ICON "..\..\image\wiresharkinst.ico"
40
41 !define MUI_COMPONENTSPAGE_SMALLDESC
42 !define MUI_FINISHPAGE_NOAUTOCLOSE
43 !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."
44 ;!define MUI_FINISHPAGE_LINK "Install WinPcap to be able to capture packets from a network."
45 ;!define MUI_FINISHPAGE_LINK_LOCATION "http://www.winpcap.org"
46
47 ; NSIS shows Readme files by opening the Readme file with the default application for
48 ; the file's extension. "README.win32" won't work in most cases, because extension "win32"
49 ; is usually not associated with an appropriate text editor. We should use extension "txt"
50 ; for a text file or "html" for an html README file.
51 !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\NEWS.txt"
52 !define MUI_FINISHPAGE_SHOWREADME_TEXT "Show News"
53 !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
54 !define MUI_FINISHPAGE_RUN "$INSTDIR\${PROGRAM_NAME}.exe"
55 !define MUI_FINISHPAGE_RUN_NOTCHECKED
56
57 !define MUI_PAGE_CUSTOMFUNCTION_SHOW myShowCallback
58
59 ; ============================================================================
60 ; MUI Pages
61 ; ============================================================================
62
63 !insertmacro MUI_PAGE_WELCOME
64 !insertmacro MUI_PAGE_LICENSE "..\..\COPYING"
65 !insertmacro MUI_PAGE_COMPONENTS
66 Page custom DisplayAdditionalTasksPage
67 !insertmacro MUI_PAGE_DIRECTORY
68 Page custom DisplayWinPcapPage
69 !insertmacro MUI_PAGE_INSTFILES
70 !insertmacro MUI_PAGE_FINISH
71
72 ; ============================================================================
73 ; MUI Languages
74 ; ============================================================================
75
76 !insertmacro MUI_LANGUAGE "English"
77
78 ; ============================================================================
79 ; Reserve Files
80 ; ============================================================================
81
82   ;Things that need to be extracted on first (keep these lines before any File command!)
83   ;Only useful for BZIP2 compression
84
85   ReserveFile "AdditionalTasksPage.ini"
86   ReserveFile "WinPcapPage.ini"
87   !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
88
89 ; ============================================================================
90 ; Section macros
91 ; ============================================================================
92 !include "Sections.nsh"
93
94 ; ========= Macro to unselect and disable a section =========
95
96 !macro DisableSection SECTION
97
98   Push $0
99     SectionGetFlags "${SECTION}" $0
100     IntOp $0 $0 & ${SECTION_OFF}
101     IntOp $0 $0 | ${SF_RO}
102     SectionSetFlags "${SECTION}" $0
103   Pop $0
104
105 !macroend
106
107 ; ========= Macro to enable (unreadonly) a section =========
108 !define SECTION_ENABLE   0xFFFFFFEF
109 !macro EnableSection SECTION
110
111   Push $0
112     SectionGetFlags "${SECTION}" $0
113     IntOp $0 $0 & ${SECTION_ENABLE}
114     SectionSetFlags "${SECTION}" $0
115   Pop $0
116
117 !macroend
118
119 ; ============================================================================
120 ; Command Line
121 ; ============================================================================
122 !include "FileFunc.nsh"
123
124 !insertmacro GetParameters
125 !insertmacro GetOptions
126
127 ; ============================================================================
128 ; License page configuration
129 ; ============================================================================
130 LicenseText "Wireshark is distributed under the GNU General Public License."
131 LicenseData "..\..\COPYING"
132
133 ; ============================================================================
134 ; Component page configuration
135 ; ============================================================================
136 ComponentText "The following components are available for installation."
137
138 ; ============================================================================
139 ; Directory selection page configuration
140 ; ============================================================================
141 ; The text to prompt the user to enter a directory
142 DirText "Choose a directory in which to install ${PROGRAM_NAME}."
143
144 ; The default installation directory
145 !if ${WIRESHARK_TARGET_PLATFORM} == "win64"
146   InstallDir $PROGRAMFILES64\${PROGRAM_NAME}
147 !else
148   InstallDir $PROGRAMFILES\${PROGRAM_NAME}
149 !endif
150
151 ; See if this is an upgrade; if so, use the old InstallDir as default
152 InstallDirRegKey HKEY_LOCAL_MACHINE SOFTWARE\${PROGRAM_NAME} "InstallDir"
153
154
155 ; ============================================================================
156 ; Install page configuration
157 ; ============================================================================
158 ShowInstDetails show
159
160 ; ============================================================================
161 ; Functions and macros
162 ; ============================================================================
163
164 Var EXTENSION
165 ; http://msdn.microsoft.com/en-us/library/windows/desktop/cc144148.aspx
166 Function Associate
167         Push $R0
168 !insertmacro PushFileExtensions
169
170         Pop $EXTENSION
171
172         ${DoUntil} $EXTENSION == ${FILE_EXTENSION_MARKER}
173                 ReadRegStr $R0 HKCR $EXTENSION ""
174                 StrCmp $R0 "" Associate.doRegister
175                 Goto Associate.end
176
177 Associate.doRegister:
178                 ;The extension is not associated to any program, we can do the link
179                 WriteRegStr HKCR $EXTENSION "" ${WIRESHARK_ASSOC}
180                 DetailPrint "Registered file type: $EXTENSION"
181
182 Associate.end:
183                 Pop $EXTENSION
184         ${Loop}
185
186         Pop $R0
187 FunctionEnd
188
189 Var OLD_UNINSTALLER
190 Var OLD_INSTDIR
191 Var OLD_DISPLAYNAME
192 Var TMP_UNINSTALLER
193
194 ; ============================================================================
195 ; 64-bit support
196 ; ============================================================================
197 !include x64.nsh
198
199 Function .onInit
200   !if ${WIRESHARK_TARGET_PLATFORM} == "win64"
201     ; http://forums.winamp.com/printthread.php?s=16ffcdd04a8c8d52bee90c0cae273ac5&threadid=262873
202     ${IfNot} ${RunningX64}
203       MessageBox MB_OK "This version of Wireshark only runs on x64 machines.$\nTry installing the 32-bit version instead." /SD IDOK
204       Abort
205     ${EndIf}
206   !endif
207
208 !insertmacro IsWiresharkRunning
209
210   ; Copied from http://nsis.sourceforge.net/Auto-uninstall_old_before_installing_new
211   ReadRegStr $OLD_UNINSTALLER HKLM \
212     "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}" \
213     "UninstallString"
214   StrCmp $OLD_UNINSTALLER "" done
215
216   ReadRegStr $OLD_INSTDIR HKLM \
217     "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME}.exe" \
218     "Path"
219   StrCmp $OLD_INSTDIR "" done
220
221   ReadRegStr $OLD_DISPLAYNAME HKLM \
222     "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}" \
223     "DisplayName"
224   StrCmp $OLD_DISPLAYNAME "" done
225
226   MessageBox MB_YESNOCANCEL|MB_ICONQUESTION \
227     "$OLD_DISPLAYNAME is already installed.\
228      $\n$\nWould you like to uninstall it first?" \
229       /SD IDYES \
230       IDYES prep_uninstaller \
231       IDNO done
232   Abort
233
234 ; Copy the uninstaller to $TEMP and run it.
235 ; The uninstaller normally does this by itself, but doesn't wait around
236 ; for the executable to finish, which means ExecWait won't work correctly.
237 prep_uninstaller:
238   ClearErrors
239   StrCpy $TMP_UNINSTALLER "$TEMP\${PROGRAM_NAME}_uninstaller.exe"
240   ; ...because we surround UninstallString in quotes.
241   StrCpy $0 $OLD_UNINSTALLER -1 1
242   StrCpy $1 "$TEMP\${PROGRAM_NAME}_uninstaller.exe"
243   StrCpy $2 1
244   System::Call 'kernel32::CopyFile(t r0, t r1, b r2) 1'
245   ExecWait "$TMP_UNINSTALLER /S _?=$OLD_INSTDIR"
246
247   Delete "$TMP_UNINSTALLER"
248
249 done:
250   ;Extract InstallOptions INI files
251   !insertmacro MUI_INSTALLOPTIONS_EXTRACT "AdditionalTasksPage.ini"
252   !insertmacro MUI_INSTALLOPTIONS_EXTRACT "WinpcapPage.ini"
253 FunctionEnd
254
255 Function DisplayAdditionalTasksPage
256   !insertmacro MUI_HEADER_TEXT "Select Additional Tasks" "Which additional tasks should be done?"
257   !insertmacro MUI_INSTALLOPTIONS_DISPLAY "AdditionalTasksPage.ini"
258 FunctionEnd
259
260 Function DisplayWinPcapPage
261   !insertmacro MUI_HEADER_TEXT "Install WinPcap?" "WinPcap is required to capture live network data. Should WinPcap be installed?"
262   !insertmacro MUI_INSTALLOPTIONS_DISPLAY "WinPcapPage.ini"
263 FunctionEnd
264
265 ; ============================================================================
266 ; Installation execution commands
267 ; ============================================================================
268
269 Var WINPCAP_UNINSTALL ;declare variable for holding the value of a registry key
270 ;Var WIRESHARK_UNINSTALL ;declare variable for holding the value of a registry key
271
272 !ifdef VCREDIST_EXE
273 Var VCREDIST_FLAGS ; silent vs passive, norestart
274 !endif
275
276 !define PROGRAM_NAME_GTK "${PROGRAM_NAME} (GTK+)"
277 !define PROGRAM_NAME_QT "${PROGRAM_NAME} (Qt)"
278 !define PROGRAM_FULL_NAME_GTK "The ${PROGRAM_NAME} Network Protocol Analyzer (GTK+)"
279 !define PROGRAM_FULL_NAME_QT "The ${PROGRAM_NAME} Network Protocol Analyzer (Qt)"
280
281 Section "-Required"
282 ;-------------------------------------------
283
284 ;
285 ; Install for every user
286 ;
287 SetShellVarContext all
288
289
290 SetOutPath $INSTDIR
291 File "${STAGING_DIR}\${UNINSTALLER_NAME}"
292 File "${STAGING_DIR}\wiretap-${WTAP_VERSION}.dll"
293 !ifdef ENABLE_LIBWIRESHARK
294 File "${STAGING_DIR}\libwireshark.dll"
295 !endif
296 File "${STAGING_DIR}\libwsutil.dll"
297 File "${STAGING_DIR}\libgio-2.0-0.dll"
298 File "${STAGING_DIR}\libglib-2.0-0.dll"
299 File "${STAGING_DIR}\libgobject-2.0-0.dll"
300 File "${STAGING_DIR}\libgmodule-2.0-0.dll"
301 File "${STAGING_DIR}\libgthread-2.0-0.dll"
302 !ifdef ICONV_DIR
303 File "${STAGING_DIR}\iconv.dll"
304 !endif
305 File "${STAGING_DIR}\${INTL_DLL}"
306 !ifdef ZLIB_DIR
307 File "${STAGING_DIR}\zlib1.dll"
308 !endif
309 !ifdef C_ARES_DIR
310 File "${STAGING_DIR}\libcares-2.dll"
311 !endif
312 !ifdef ADNS_DIR
313 File "${STAGING_DIR}\adns_dll.dll"
314 !endif
315 !ifdef KFW_DIR
316 File "${STAGING_DIR}\comerr32.dll"
317 File "${STAGING_DIR}\krb5_32.dll"
318 File "${STAGING_DIR}\k5sprt32.dll"
319 !endif
320 !ifdef GNUTLS_DIR
321 File "${STAGING_DIR}\libgcrypt-11.dll"
322 File "${STAGING_DIR}\libgnutls-26.dll"
323 File "${STAGING_DIR}\libgpg-error-0.dll"
324 File "${STAGING_DIR}\libtasn1-3.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}\lua5.1.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\sunping.xml"
438 File "..\..\diameter\TGPPGmb.xml"
439 File "..\..\diameter\TGPPRx.xml"
440 File "..\..\diameter\TGPPS9.xml"
441 File "..\..\diameter\TGPPSh.xml"
442 File "..\..\diameter\VerizonWireless.xml"
443 File "..\..\diameter\Vodafone.xml"
444 !include "custom_diameter_xmls.txt"
445 SetOutPath $INSTDIR
446
447 ;
448 ; Install the RADIUS directory files in the "radius" subdirectory
449 ; of the installation directory.
450 ;
451 SetOutPath $INSTDIR\radius
452 File "..\..\radius\README.radius_dictionary"
453 File "..\..\radius\custom.includes"
454 File "..\..\radius\dictionary"
455 File "..\..\radius\dictionary.3com"
456 File "..\..\radius\dictionary.3gpp"
457 File "..\..\radius\dictionary.3gpp2"
458 File "..\..\radius\dictionary.acc"
459 File "..\..\radius\dictionary.acme"
460 File "..\..\radius\dictionary.airespace"
461 File "..\..\radius\dictionary.alcatel"
462 File "..\..\radius\dictionary.alcatel.esam"
463 File "..\..\radius\dictionary.alcatel.sr"
464 File "..\..\radius\dictionary.alcatel-lucent.aaa"
465 File "..\..\radius\dictionary.alcatel-lucent.xylan"
466 File "..\..\radius\dictionary.alteon"
467 File "..\..\radius\dictionary.altiga"
468 File "..\..\radius\dictionary.alvarion"
469 File "..\..\radius\dictionary.apc"
470 File "..\..\radius\dictionary.aptis"
471 File "..\..\radius\dictionary.aruba"
472 File "..\..\radius\dictionary.ascend"
473 File "..\..\radius\dictionary.asn"
474 File "..\..\radius\dictionary.audiocodes"
475 File "..\..\radius\dictionary.avaya"
476 File "..\..\radius\dictionary.azaire"
477 File "..\..\radius\dictionary.bay"
478 File "..\..\radius\dictionary.bintec"
479 File "..\..\radius\dictionary.bristol"
480 File "..\..\radius\dictionary.cablelabs"
481 File "..\..\radius\dictionary.cabletron"
482 File "..\..\radius\dictionary.chillispot"
483 File "..\..\radius\dictionary.cisco"
484 File "..\..\radius\dictionary.cisco.bbsm"
485 File "..\..\radius\dictionary.cisco.vpn3000"
486 File "..\..\radius\dictionary.cisco.vpn5000"
487 File "..\..\radius\dictionary.clavister"
488 File "..\..\radius\dictionary.colubris"
489 File "..\..\radius\dictionary.columbia_university"
490 File "..\..\radius\dictionary.compat"
491 File "..\..\radius\dictionary.cosine"
492 File "..\..\radius\dictionary.dhcp"
493 File "..\..\radius\dictionary.digium"
494 File "..\..\radius\dictionary.eltex"
495 File "..\..\radius\dictionary.epygi"
496 File "..\..\radius\dictionary.ericsson"
497 File "..\..\radius\dictionary.erx"
498 File "..\..\radius\dictionary.extreme"
499 File "..\..\radius\dictionary.fortinet"
500 File "..\..\radius\dictionary.foundry"
501 File "..\..\radius\dictionary.freeradius"
502 File "..\..\radius\dictionary.freeradius.internal"
503 File "..\..\radius\dictionary.freeswitch"
504 File "..\..\radius\dictionary.gandalf"
505 File "..\..\radius\dictionary.garderos"
506 File "..\..\radius\dictionary.gemtek"
507 File "..\..\radius\dictionary.h3c"
508 File "..\..\radius\dictionary.hp"
509 File "..\..\radius\dictionary.huawei"
510 File "..\..\radius\dictionary.iea"
511 File "..\..\radius\dictionary.infonet"
512 File "..\..\radius\dictionary.ipunplugged"
513 File "..\..\radius\dictionary.issanni"
514 File "..\..\radius\dictionary.itk"
515 File "..\..\radius\dictionary.jradius"
516 File "..\..\radius\dictionary.juniper"
517 File "..\..\radius\dictionary.karlnet"
518 File "..\..\radius\dictionary.lancom"
519 File "..\..\radius\dictionary.livingston"
520 File "..\..\radius\dictionary.localweb"
521 File "..\..\radius\dictionary.lucent"
522 File "..\..\radius\dictionary.manzara"
523 File "..\..\radius\dictionary.merit"
524 File "..\..\radius\dictionary.microsoft"
525 File "..\..\radius\dictionary.mikrotik"
526 File "..\..\radius\dictionary.motorola"
527 File "..\..\radius\dictionary.motorola.wimax"
528 File "..\..\radius\dictionary.navini"
529 File "..\..\radius\dictionary.netscreen"
530 File "..\..\radius\dictionary.networkphysics"
531 File "..\..\radius\dictionary.nexans"
532 File "..\..\radius\dictionary.nokia"
533 File "..\..\radius\dictionary.nokia.conflict"
534 File "..\..\radius\dictionary.nomadix"
535 File "..\..\radius\dictionary.nortel"
536 File "..\..\radius\dictionary.ntua"
537 File "..\..\radius\dictionary.openser"
538 File "..\..\radius\dictionary.packeteer"
539 File "..\..\radius\dictionary.patton"
540 File "..\..\radius\dictionary.propel"
541 File "..\..\radius\dictionary.prosoft"
542 File "..\..\radius\dictionary.quiconnect"
543 File "..\..\radius\dictionary.quintum"
544 File "..\..\radius\dictionary.redback"
545 File "..\..\radius\dictionary.redcreek"
546 File "..\..\radius\dictionary.rfc2865"
547 File "..\..\radius\dictionary.rfc2866"
548 File "..\..\radius\dictionary.rfc2867"
549 File "..\..\radius\dictionary.rfc2868"
550 File "..\..\radius\dictionary.rfc2869"
551 File "..\..\radius\dictionary.rfc3162"
552 File "..\..\radius\dictionary.rfc3576"
553 File "..\..\radius\dictionary.rfc3580"
554 File "..\..\radius\dictionary.rfc4072"
555 File "..\..\radius\dictionary.rfc4372"
556 File "..\..\radius\dictionary.rfc4603"
557 File "..\..\radius\dictionary.rfc4675"
558 File "..\..\radius\dictionary.rfc4679"
559 File "..\..\radius\dictionary.rfc4818"
560 File "..\..\radius\dictionary.rfc4849"
561 File "..\..\radius\dictionary.rfc5090"
562 File "..\..\radius\dictionary.rfc5176"
563 File "..\..\radius\dictionary.rfc5447"
564 File "..\..\radius\dictionary.rfc5580"
565 File "..\..\radius\dictionary.rfc5607"
566 File "..\..\radius\dictionary.rfc5904"
567 File "..\..\radius\dictionary.rfc6519"
568 File "..\..\radius\dictionary.rfc6572"
569 File "..\..\radius\dictionary.riverstone"
570 File "..\..\radius\dictionary.roaringpenguin"
571 File "..\..\radius\dictionary.shasta"
572 File "..\..\radius\dictionary.shiva"
573 File "..\..\radius\dictionary.slipstream"
574 File "..\..\radius\dictionary.sofaware"
575 File "..\..\radius\dictionary.sonicwall"
576 File "..\..\radius\dictionary.springtide"
577 File "..\..\radius\dictionary.starent"
578 File "..\..\radius\dictionary.t_systems_nova"
579 File "..\..\radius\dictionary.telebit"
580 File "..\..\radius\dictionary.telkom"
581 File "..\..\radius\dictionary.trapeze"
582 File "..\..\radius\dictionary.tropos"
583 File "..\..\radius\dictionary.ukerna"
584 File "..\..\radius\dictionary.unix"
585 File "..\..\radius\dictionary.usr"
586 File "..\..\radius\dictionary.utstarcom"
587 File "..\..\radius\dictionary.valemount"
588 File "..\..\radius\dictionary.versanet"
589 File "..\..\radius\dictionary.vqp"
590 File "..\..\radius\dictionary.walabi"
591 File "..\..\radius\dictionary.waverider"
592 File "..\..\radius\dictionary.wichorus"
593 File "..\..\radius\dictionary.wimax"
594 File "..\..\radius\dictionary.wimax.wichorus"
595 File "..\..\radius\dictionary.wispr"
596 File "..\..\radius\dictionary.xedia"
597 File "..\..\radius\dictionary.zyxel"
598 !include "custom_radius_dict.txt"
599 SetOutPath $INSTDIR
600
601 ;
602 ; install the dtds in the dtds subdirectory
603 ;
604 SetOutPath $INSTDIR\dtds
605 File "..\..\dtds\dc.dtd"
606 File "..\..\dtds\itunes.dtd"
607 File "..\..\dtds\mscml.dtd"
608 File "..\..\dtds\pocsettings.dtd"
609 File "..\..\dtds\presence.dtd"
610 File "..\..\dtds\reginfo.dtd"
611 File "..\..\dtds\rlmi.dtd"
612 File "..\..\dtds\rss.dtd"
613 File "..\..\dtds\smil.dtd"
614 File "..\..\dtds\xcap-caps.dtd"
615 File "..\..\dtds\xcap-error.dtd"
616 File "..\..\dtds\watcherinfo.dtd"
617 SetOutPath $INSTDIR
618
619 ; Install the TPNCP DAT file in the "tpncp" subdirectory
620 ; of the installation directory.
621 SetOutPath $INSTDIR\tpncp
622 File "..\..\tpncp\tpncp.dat"
623
624 ;
625 ; install the wimaxasncp TLV definitions in the wimaxasncp subdirectory
626 ;
627 SetOutPath $INSTDIR\wimaxasncp
628 File "..\..\wimaxasncp\dictionary.xml"
629 File "..\..\wimaxasncp\dictionary.dtd"
630 SetOutPath $INSTDIR
631
632 SetOutPath $INSTDIR\help
633 File "${STAGING_DIR}\help\toc"
634 File "${STAGING_DIR}\help\overview.txt"
635 File "${STAGING_DIR}\help\getting_started.txt"
636 File "${STAGING_DIR}\help\capturing.txt"
637 File "${STAGING_DIR}\help\capture_filters.txt"
638 File "${STAGING_DIR}\help\display_filters.txt"
639 File "${STAGING_DIR}\help\faq.txt"
640
641 ; Write the uninstall keys for Windows
642 ; http://nsis.sourceforge.net/Add_uninstall_information_to_Add/Remove_Programs
643 ; http://msdn.microsoft.com/en-us/library/ms954376.aspx
644 ; http://msdn.microsoft.com/en-us/library/windows/desktop/aa372105.aspx
645 !define UNINSTALL_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}"
646
647 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "Comments" "${DISPLAY_NAME}"
648 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "DisplayIcon" "$INSTDIR\${PROGRAM_NAME}.exe,0"
649 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "DisplayName" "${DISPLAY_NAME}"
650 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "DisplayVersion" "${VERSION}"
651 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "HelpLink" "http://ask.wireshark.org/"
652 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "InstallLocation" "$INSTDIR"
653 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "Publisher" "The Wireshark developer community, http://www.wireshark.org"
654 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "URLInfoAbout" "http://www.wireshark.org"
655 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "URLUpdateInfo" "http://www.wireshark.org/download.html"
656
657 WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "NoModify" 1
658 WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "NoRepair" 1
659 WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "VersionMajor" ${VERSION_MAJOR}
660 WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "VersionMinor" ${VERSION_MINOR}
661
662 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "UninstallString" '"$INSTDIR\${UNINSTALLER_NAME}"'
663 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "QuietUninstallString" '"$INSTDIR\${UNINSTALLER_NAME}" /S'
664
665 ; Write an entry for ShellExecute
666 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME}.exe" "" '$INSTDIR\${PROGRAM_NAME}.exe'
667 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME}.exe" "Path" '$INSTDIR'
668
669 ; Create start menu entries (depending on additional tasks page)
670 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 2" "State"
671 StrCmp $0 "0" SecRequired_skip_StartMenu
672 SetOutPath $PROFILE
673 ;CreateDirectory "$SMPROGRAMS\${PROGRAM_NAME}"
674 ; To quote "http://download.microsoft.com/download/0/4/6/046bbd36-0812-4c22-a870-41911c6487a6/WindowsUserExperience.pdf"
675 ; "Do not include Readme, Help, or Uninstall entries on the Programs menu."
676 Delete "$SMPROGRAMS\${PROGRAM_NAME}\Wireshark Web Site.lnk"
677 ;WriteINIStr "$SMPROGRAMS\${PROGRAM_NAME}\Wireshark Web Site.url" "InternetShortcut" "URL" "http://www.wireshark.org/"
678 CreateShortCut "$SMPROGRAMS\${PROGRAM_NAME_GTK}.lnk" "$INSTDIR\${PROGRAM_NAME}.exe" "" "$INSTDIR\${PROGRAM_NAME}.exe" 0 "" "" "${PROGRAM_FULL_NAME_GTK}"
679 ;CreateShortCut "$SMPROGRAMS\${PROGRAM_NAME}\Wireshark Manual.lnk" "$INSTDIR\wireshark.html"
680 ;CreateShortCut "$SMPROGRAMS\${PROGRAM_NAME}\Display Filters Manual.lnk" "$INSTDIR\wireshark-filter.html"
681 ;CreateShortCut "$SMPROGRAMS\${PROGRAM_NAME}\Wireshark Program Directory.lnk" "$INSTDIR"
682 SecRequired_skip_StartMenu:
683
684 ; is command line option "/desktopicon" set?
685 ${GetParameters} $R0
686 ${GetOptions} $R0 "/desktopicon=" $R1
687 StrCmp $R1 "no" SecRequired_skip_DesktopIcon
688 StrCmp $R1 "yes" SecRequired_install_DesktopIcon
689
690 ; Create desktop icon (depending on additional tasks page and command line option)
691 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 3" "State"
692 StrCmp $0 "0" SecRequired_skip_DesktopIcon
693 SecRequired_install_DesktopIcon:
694 CreateShortCut "$DESKTOP\${PROGRAM_NAME_GTK}.lnk" "$INSTDIR\${PROGRAM_NAME}.exe" "" "$INSTDIR\${PROGRAM_NAME}.exe" 0 "" "" "${PROGRAM_FULL_NAME_GTK}"
695 SecRequired_skip_DesktopIcon:
696
697 ; is command line option "/quicklaunchicon" set?
698 ${GetParameters} $R0
699 ${GetOptions} $R0 "/quicklaunchicon=" $R1
700 StrCmp $R1 "no" SecRequired_skip_QuickLaunchIcon
701 StrCmp $R1 "yes" SecRequired_install_QuickLaunchIcon
702
703 ; Create quick launch icon (depending on additional tasks page and command line option)
704 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 4" "State"
705 StrCmp $0 "0" SecRequired_skip_QuickLaunchIcon
706 SecRequired_install_QuickLaunchIcon:
707 CreateShortCut "$QUICKLAUNCH\${PROGRAM_NAME_GTK}.lnk" "$INSTDIR\${PROGRAM_NAME}.exe" "" "$INSTDIR\${PROGRAM_NAME}.exe" 0 "" "" "${PROGRAM_FULL_NAME_GTK}"
708 SecRequired_skip_QuickLaunchIcon:
709
710 ; Create File Extensions (depending on additional tasks page)
711 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "State"
712 StrCmp $0 "0" SecRequired_skip_FileExtensions
713 WriteRegStr HKCR ${WIRESHARK_ASSOC} "" "Wireshark capture file"
714 WriteRegStr HKCR "${WIRESHARK_ASSOC}\Shell\open\command" "" '"$INSTDIR\${PROGRAM_NAME}.exe" "%1"'
715 WriteRegStr HKCR "${WIRESHARK_ASSOC}\DefaultIcon" "" '"$INSTDIR\${PROGRAM_NAME}.exe",1'
716
717 ; We refresh the icon cache down in -Finally.
718 Call Associate
719 ; if somethings added here, add it also to the uninstall section and the AdditionalTask page
720
721 SecRequired_skip_FileExtensions:
722
723 ; if running as a silent installer, don't try to install winpcap
724 IfSilent SecRequired_skip_Winpcap
725
726 ; Install WinPcap (depending on winpcap page setting)
727 ReadINIStr $0 "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "State"
728 StrCmp $0 "0" SecRequired_skip_Winpcap
729 ; Uinstall old WinPcap first
730 ReadRegStr $WINPCAP_UNINSTALL HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinPcapInst" "UninstallString"
731 IfErrors lbl_winpcap_notinstalled ;if RegKey is unavailable, WinPcap is not installed
732 ; from released version 3.1, WinPcap will uninstall an old version by itself
733 ;ExecWait '$WINPCAP_UNINSTALL' $0
734 ;DetailPrint "WinPcap uninstaller returned $0"
735 lbl_winpcap_notinstalled:
736 SetOutPath $INSTDIR
737 File "${WIRESHARK_LIB_DIR}\WinPcap_${WINPCAP_VERSION}.exe"
738 ExecWait '"$INSTDIR\WinPcap_${WINPCAP_VERSION}.exe"' $0
739 DetailPrint "WinPcap installer returned $0"
740 SecRequired_skip_Winpcap:
741
742 ; If no user profile exists for Wireshark but for Ethereal, copy it over
743 SetShellVarContext current
744 IfFileExists $APPDATA\Wireshark profile_done
745 IfFileExists $APPDATA\Ethereal 0 profile_done
746 ;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
747 CreateDirectory $APPDATA\Wireshark
748 CopyFiles $APPDATA\Ethereal\*.* $APPDATA\Wireshark
749 profile_done:
750 SetShellVarContext all
751
752 SectionEnd ; "Required"
753
754 !ifdef GTK_DIR
755 Section "${PROGRAM_NAME} GTK+ UI (stable)" SecWiresharkGtk
756 ;-------------------------------------------
757 SetOutPath $INSTDIR
758 File "${STAGING_DIR}\${PROGRAM_NAME}.exe"
759 File "${STAGING_DIR}\${GDK_DLL}"
760 File "${STAGING_DIR}\libgdk_pixbuf-2.0-0.dll"
761 File "${STAGING_DIR}\${GTK_DLL}"
762 File "${STAGING_DIR}\libatk-1.0-0.dll"
763 File "${STAGING_DIR}\libpango-1.0-0.dll"
764 File "${STAGING_DIR}\libpangowin32-1.0-0.dll"
765 !ifdef NEED_CAIRO_GOBJECT_DLL
766 File "${STAGING_DIR}\libcairo-gobject-2.dll"
767 !endif
768 !ifdef NEED_CAIRO_DLL
769 File "${STAGING_DIR}\libcairo-2.dll"
770 File "${STAGING_DIR}\libpangocairo-1.0-0.dll"
771 !endif
772 !ifdef NEED_EXPAT_DLL
773 File "${STAGING_DIR}\${EXPAT_DLL}"
774 !endif
775 !ifdef NEED_FFI_DLL
776 File "${STAGING_DIR}\${FFI_DLL}"
777 !endif
778 !ifdef NEED_FONTCONFIG_DLL
779 File "${STAGING_DIR}\${FONTCONFIG_DLL}"
780 !endif
781 !ifdef NEED_FREETYPE_DLL
782 File "${STAGING_DIR}\libpangoft2-1.0-0.dll"
783 File "${STAGING_DIR}\${FREETYPE_DLL}"
784 !endif
785 !ifdef NEED_JASPER_DLL
786 File "${STAGING_DIR}\${JASPER_DLL}"
787 !endif
788 !ifdef NEED_JPEG_DLL
789 File "${STAGING_DIR}\${JPEG_DLL}"
790 !endif
791 !ifdef NEED_LZMA_DLL
792 File "${STAGING_DIR}\${LZMA_DLL}"
793 !endif
794 !ifdef NEED_PIXMAN_DLL
795 File "${STAGING_DIR}\${PIXMAN_DLL}"
796 !endif
797 !ifdef NEED_PNG_DLL
798 File "${STAGING_DIR}\${PNG_DLL}"
799 !endif
800 !ifdef NEED_TIFF_DLL
801 File "${STAGING_DIR}\${TIFF_DLL}"
802 !endif
803 !ifdef NEED_XML_DLL
804 File "${STAGING_DIR}\${XML_DLL}"
805 !endif
806
807 SetOutPath $INSTDIR\${GTK_ETC_DIR}
808 File "${GTK_DIR}\${GTK_ETC_DIR}\*.*"
809
810 !ifdef GTK_ENGINES_DIR
811 SetOutPath $INSTDIR\${GTK_ENGINES_DIR}
812 File "${STAGING_DIR}\${GTK_ENGINES_DIR}\libpixmap.dll"
813 File "${STAGING_DIR}\${GTK_ENGINES_DIR}\libwimp.dll"
814 !endif
815
816 !ifdef GTK_MODULES_DIR
817 SetOutPath $INSTDIR\${GTK_MODULES_DIR}
818 File "${STAGING_DIR}\${GTK_MODULES_DIR}\libgail.dll"
819 !endif
820
821 !ifdef GTK_SCHEMAS_DIR
822 SetOutPath $INSTDIR\${GTK_SCHEMAS_DIR}
823 File "${STAGING_DIR}\${GTK_SCHEMAS_DIR}\*.*"
824 !endif
825
826 SectionEnd ; "Wireshark"
827 !endif
828
829
830 Section "TShark" SecTShark
831 ;-------------------------------------------
832 SetOutPath $INSTDIR
833 File "${STAGING_DIR}\tshark.exe"
834 File "..\..\doc\tshark.html"
835 SectionEnd
836
837 !ifdef QT_DIR
838 Section "${PROGRAM_NAME} Qt UI (alpha)" SecWiresharkQt
839 ;-------------------------------------------
840 ; by default, QtShark is not installed
841 SetOutPath $INSTDIR
842 File "${QT_DIR}\qtshark.exe"
843 !ifdef NEED_QT4_DLL
844 File "${QT_DIR}\QtCore4.dll"
845 File "${QT_DIR}\QtGui4.dll"
846 !endif
847 !ifdef NEED_QT5_DLL
848 File "${QT_DIR}\Qt5Core.dll"
849 File "${QT_DIR}\Qt5Gui.dll"
850 File "${QT_DIR}\Qt5Widgets.dll"
851 File "${QT_DIR}\Qt5PrintSupport.dll"
852 SetOutPath $INSTDIR\platforms
853 File "${QT_DIR}\platforms\qwindows.dll"
854 !endif
855 Push $0
856 SectionGetFlags ${SecWiresharkQt} $0
857 IntOp  $0 $0 & 1
858 CreateShortCut "$SMPROGRAMS\${PROGRAM_NAME_QT}.lnk" "$INSTDIR\qtshark.exe" "" "$INSTDIR\qtshark.exe" 0 "" "" "${PROGRAM_FULL_NAME_QT}"
859
860 ; is command line option "/desktopicon" set?
861 ${GetParameters} $R0
862 ${GetOptions} $R0 "/desktopicon=" $R1
863 StrCmp $R1 "no" SecRequired_skip_DesktopIconQt
864 StrCmp $R1 "yes" SecRequired_install_DesktopIconQt
865
866 ; Create desktop icon (depending on additional tasks page and command line option)
867 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 3" "State"
868 StrCmp $0 "0" SecRequired_skip_DesktopIconQt
869 SecRequired_install_DesktopIconQt:
870 CreateShortCut "$DESKTOP\${PROGRAM_NAME_QT}.lnk" "$INSTDIR\qtshark.exe" "" "$INSTDIR\qtshark.exe" 0 "" "" "${PROGRAM_FULL_NAME_QT}"
871 SecRequired_skip_DesktopIconQt:
872
873 ; is command line option "/quicklaunchicon" set?
874 ${GetParameters} $R0
875 ${GetOptions} $R0 "/quicklaunchicon=" $R1
876 StrCmp $R1 "no" SecRequired_skip_QuickLaunchIconQt
877 StrCmp $R1 "yes" SecRequired_install_QuickLaunchIconQt
878
879 ; Create quick launch icon (depending on additional tasks page and command line option)
880 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 4" "State"
881 StrCmp $0 "0" SecRequired_skip_QuickLaunchIconQt
882 SecRequired_install_QuickLaunchIconQt:
883 CreateShortCut "$QUICKLAUNCH\${PROGRAM_NAME_QT}.lnk" "$INSTDIR\qtshark.exe" "" "$INSTDIR\qtshark.exe" 0 "" "" "${PROGRAM_FULL_NAME_QT}"
884 SecRequired_skip_QuickLaunchIconQt:
885
886 Pop $0
887 SectionEnd
888 !endif
889
890 SectionGroup "Plugins / Extensions" SecPluginsGroup
891
892 Section "Dissector Plugins" SecPlugins
893 ;-------------------------------------------
894 SetOutPath '$INSTDIR\plugins\${VERSION}'
895 File "${STAGING_DIR}\plugins\${VERSION}\docsis.dll"
896 File "${STAGING_DIR}\plugins\${VERSION}\ethercat.dll"
897 File "${STAGING_DIR}\plugins\${VERSION}\gryphon.dll"
898 File "${STAGING_DIR}\plugins\${VERSION}\irda.dll"
899 File "${STAGING_DIR}\plugins\${VERSION}\m2m.dll"
900 File "${STAGING_DIR}\plugins\${VERSION}\opcua.dll"
901 File "${STAGING_DIR}\plugins\${VERSION}\profinet.dll"
902 File "${STAGING_DIR}\plugins\${VERSION}\unistim.dll"
903 File "${STAGING_DIR}\plugins\${VERSION}\wimax.dll"
904 File "${STAGING_DIR}\plugins\${VERSION}\wimaxasncp.dll"
905 File "${STAGING_DIR}\plugins\${VERSION}\wimaxmacphy.dll"
906 !include "custom_plugins.txt"
907 SectionEnd
908
909 Section "Tree Statistics Plugin" SecStatsTree
910 ;-------------------------------------------
911 SetOutPath '$INSTDIR\plugins\${VERSION}'
912 File "${STAGING_DIR}\plugins\${VERSION}\stats_tree.dll"
913 SectionEnd
914
915 Section "Mate - Meta Analysis and Tracing Engine" SecMate
916 ;-------------------------------------------
917 SetOutPath '$INSTDIR\plugins\${VERSION}'
918 File "${STAGING_DIR}\plugins\${VERSION}\mate.dll"
919 SectionEnd
920
921 Section "Configuration Profiles" SecProfiles
922 ;-------------------------------------------
923 ; This should be a function or macro
924 SetOutPath '$INSTDIR\profiles\Bluetooth'
925 File "${STAGING_DIR}\profiles\Bluetooth\colorfilters"
926 SetOutPath '$INSTDIR\profiles\Classic'
927 File "${STAGING_DIR}\profiles\Classic\colorfilters"
928 SectionEnd
929
930 !ifdef SMI_DIR
931 Section "SNMP MIBs" SecMIBs
932 ;-------------------------------------------
933 SetOutPath $INSTDIR\snmp\mibs
934 File "${SMI_DIR}\share\mibs\iana\*"
935 File "${SMI_DIR}\share\mibs\ietf\*"
936 File "${SMI_DIR}\share\mibs\irtf\*"
937 File "${SMI_DIR}\share\mibs\tubs\*"
938 File "${SMI_DIR}\share\pibs\*"
939 File "${SMI_DIR}\share\yang\*.yang"
940 !include "custom_mibs.txt"
941 SectionEnd
942 !endif
943
944 SectionGroupEnd ; "Plugins / Extensions"
945
946
947 SectionGroup "Tools" SecToolsGroup
948
949 Section "Editcap" SecEditcap
950 ;-------------------------------------------
951 SetOutPath $INSTDIR
952 File "${STAGING_DIR}\editcap.exe"
953 File "..\..\doc\editcap.html"
954 SectionEnd
955
956 Section "Text2Pcap" SecText2Pcap
957 ;-------------------------------------------
958 SetOutPath $INSTDIR
959 File "${STAGING_DIR}\text2pcap.exe"
960 File "..\..\doc\text2pcap.html"
961 SectionEnd
962
963 Section "Mergecap" SecMergecap
964 ;-------------------------------------------
965 SetOutPath $INSTDIR
966 File "${STAGING_DIR}\mergecap.exe"
967 File "..\..\doc\mergecap.html"
968 SectionEnd
969
970 Section "Reordercap" SecReordercap
971 ;-------------------------------------------
972 SetOutPath $INSTDIR
973 File "${STAGING_DIR}\reordercap.exe"
974 SectionEnd
975
976 Section "Capinfos" SecCapinfos
977 ;-------------------------------------------
978 SetOutPath $INSTDIR
979 File "${STAGING_DIR}\capinfos.exe"
980 File "..\..\doc\capinfos.html"
981 SectionEnd
982
983 Section "Rawshark" SecRawshark
984 ;-------------------------------------------
985 SetOutPath $INSTDIR
986 File "${STAGING_DIR}\rawshark.exe"
987 File "..\..\doc\rawshark.html"
988 SectionEnd
989
990 SectionGroupEnd ; "Tools"
991
992 !ifdef HHC_DIR
993 Section "User's Guide" SecUsersGuide
994 ;-------------------------------------------
995 SetOutPath $INSTDIR
996 File "user-guide.chm"
997 SectionEnd
998 !endif
999
1000 Section "-Finally"
1001
1002 !insertmacro UpdateIcons
1003
1004 ; Compute and write the installation directory size
1005 ${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
1006 IntFmt $0 "0x%08X" $0
1007 WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "EstimatedSize" "$0"
1008
1009 SectionEnd
1010
1011
1012 ; ============================================================================
1013 ; PLEASE MAKE SURE, THAT THE DESCRIPTIVE TEXT FITS INTO THE DESCRIPTION FIELD!
1014 ; ============================================================================
1015 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
1016 !ifdef GTK_DIR
1017   !insertmacro MUI_DESCRIPTION_TEXT ${SecWiresharkGtk} "${PROGRAM_NAME} is a GUI network protocol analyzer. (GTK+ UI)"
1018 !endif
1019   !insertmacro MUI_DESCRIPTION_TEXT ${SecTShark} "TShark is a text based network protocol analyzer."
1020 !ifdef QT_DIR
1021   !insertmacro MUI_DESCRIPTION_TEXT ${SecWiresharkQt} "${PROGRAM_NAME} is a GUI network protocol analyzer. (Qt UI, alpha)"
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} "Editcap is a program that reads a capture file and writes some or all of the packets into another capture file."
1037   !insertmacro MUI_DESCRIPTION_TEXT ${SecText2Pcap} "Text2pcap is a program that reads in an ASCII hex dump and writes the data into a libpcap-style capture file."
1038   !insertmacro MUI_DESCRIPTION_TEXT ${SecMergecap} "Mergecap is a program that combines multiple saved capture files into a single output file"
1039   !insertmacro MUI_DESCRIPTION_TEXT ${SecReordercap} "Reordercap is a program that copies frames from an input capture to an output capture after sorting by time."
1040   !insertmacro MUI_DESCRIPTION_TEXT ${SecCapinfos} "Capinfos is a program that provides information on capture files."
1041   !insertmacro MUI_DESCRIPTION_TEXT ${SecRawshark} "Rawshark is a raw packet filter."
1042
1043 !ifdef HHC_DIR
1044   !insertmacro MUI_DESCRIPTION_TEXT ${SecUsersGuide} "Install the user's guide, so an internet connection is not required to read the help pages."
1045 !endif
1046 !insertmacro MUI_FUNCTION_DESCRIPTION_END
1047
1048 ; ============================================================================
1049 ; Callback functions
1050 ; ============================================================================
1051 !ifdef GTK_DIR
1052 ; Disable File extensions if Wireshark isn't selected
1053 Function .onSelChange
1054         Push $0
1055         SectionGetFlags ${SecWiresharkGtk} $0
1056         IntOp  $0 $0 & 1
1057         IntCmp $0 0 onSelChange.unselect
1058         WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "State" 1
1059         WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "Flags" ""
1060         WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 7" "Flags" ""
1061         WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 8" "Flags" ""
1062         Goto onSelChange.end
1063
1064 onSelChange.unselect:
1065         WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "State" 0
1066         WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "Flags" "DISABLED"
1067         WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 7" "Flags" "DISABLED"
1068         WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 8" "Flags" "DISABLED"
1069         Goto onSelChange.end
1070
1071 onSelChange.end:
1072         Pop $0
1073 FunctionEnd
1074 !endif
1075
1076
1077 !include "GetWindowsVersion.nsh"
1078 !include WinMessages.nsh
1079 !include "VersionCompare.nsh"
1080
1081 Var WINPCAP_NAME ; DisplayName from WinPcap installation
1082 Var WINWINPCAP_VERSION ; DisplayVersion from WinPcap installation
1083
1084 Function myShowCallback
1085
1086         ; Get the Windows version
1087         Call GetWindowsVersion
1088         Pop $R0 ; Windows Version
1089
1090         ; Check if we're able to run with this version
1091         StrCmp $R0 '95' lbl_winversion_unsupported
1092         StrCmp $R0 '98' lbl_winversion_unsupported
1093         StrCmp $R0 'ME' lbl_winversion_unsupported
1094         StrCmp $R0 'NT 4.0' lbl_winversion_unsupported_nt4
1095         StrCmp $R0 '2000' lbl_winversion_unsupported_2000
1096         Goto lbl_winversion_supported
1097 lbl_winversion_unsupported:
1098         MessageBox MB_OK \
1099             "Windows $R0 is no longer supported. The last known version working with 98/ME was Ethereal 0.99.0." \
1100             /SD IDOK
1101         Quit
1102
1103 lbl_winversion_unsupported_nt4:
1104         MessageBox MB_OK \
1105             "Windows $R0 is no longer supported. The last known version working with NT 4.0 was Wireshark 0.99.4." \
1106             /SD IDOK
1107         Quit
1108
1109 lbl_winversion_unsupported_2000:
1110         MessageBox MB_OK \
1111             "Windows $R0 is no longer supported. Please install Wireshark 1.2 or 1.0." \
1112             /SD IDOK
1113         Quit
1114
1115 lbl_winversion_supported:
1116         ; detect if WinPcap should be installed
1117         WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "Text" "Install WinPcap ${PCAP_DISPLAY_VERSION}"
1118         ReadRegStr $WINPCAP_NAME HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinPcapInst" "DisplayName"
1119         IfErrors 0 lbl_winpcap_installed ;if RegKey is available, WinPcap is already installed
1120         WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 2" "Text" "WinPcap is currently not installed"
1121         WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 2" "Flags" "DISABLED"
1122         WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Text" "(Use Add/Remove Programs first to uninstall any undetected old WinPcap versions)"
1123         Goto lbl_winpcap_done
1124
1125 lbl_winpcap_installed:
1126         WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 2" "Text" "$WINPCAP_NAME"
1127         ; Compare the installed build against the one we have.
1128         ReadRegStr $WINWINPCAP_VERSION HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinPcapInst" "DisplayVersion"
1129         StrCmp $WINWINPCAP_VERSION "" lbl_winpcap_do_install ; WinPcap is really old(?) or installed improperly.
1130         ${VersionCompare} $WINWINPCAP_VERSION "4.1.0.2980" $1 ; WinPcap 4.1.3
1131         StrCmp $1 "2" lbl_winpcap_do_install
1132
1133 ;lbl_winpcap_dont_install:
1134         ; The installed version is >= to what we have, so don't install
1135         WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "State" "0"
1136         WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Text" "If selected, the currently installed $WINPCAP_NAME will be uninstalled first."
1137         Goto lbl_winpcap_done
1138
1139 ;lbl_winpcap_dont_upgrade:
1140         ; force the user to upgrade by hand
1141         WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "State" "0"
1142         WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "Flags" "DISABLED"
1143         WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Text" "If you wish to install WinPcap ${PCAP_DISPLAY_VERSION}, please uninstall $WINPCAP_NAME manually first."
1144         WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Flags" "DISABLED"
1145         Goto lbl_winpcap_done
1146
1147 lbl_winpcap_do_install:
1148         ; seems to be an old version, install newer one
1149         WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "State" "1"
1150         WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Text" "The currently installed $WINPCAP_NAME will be uninstalled first."
1151
1152 lbl_winpcap_done:
1153
1154         ; if Wireshark was previously installed, unselect previously not installed icons etc.
1155         ; detect if Wireshark is already installed ->
1156         ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark" "UninstallString"
1157         IfErrors lbl_wireshark_notinstalled ;if RegKey is unavailable, Wireshark is not installed
1158
1159         ; only select Start Menu Group, if previously installed
1160         ; (we use the "all users" start menu, so select it first)
1161         SetShellVarContext all
1162         IfFileExists "$SMPROGRAMS\${PROGRAM_NAME}\${PROGRAM_NAME}.lnk" lbl_have_startmenu
1163         IfFileExists "$SMPROGRAMS\${PROGRAM_NAME}.lnk" lbl_have_startmenu
1164         WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 2" "State" "0"
1165 lbl_have_startmenu:
1166
1167         ; only select Desktop Icon, if previously installed
1168         IfFileExists "$DESKTOP\${PROGRAM_NAME}.lnk" lbl_have_desktopicon
1169         WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 3" "State" "0"
1170 lbl_have_desktopicon:
1171
1172         ; only select Quick Launch Icon, if previously installed
1173         IfFileExists "$QUICKLAUNCH\${PROGRAM_NAME}.lnk" lbl_have_quicklaunchicon
1174         WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 4" "State" "0"
1175 lbl_have_quicklaunchicon:
1176
1177 lbl_wireshark_notinstalled:
1178
1179 FunctionEnd
1180
1181 ;
1182 ; Editor modelines  -  http://www.wireshark.org/tools/modelines.html
1183 ;
1184 ; Local variables:
1185 ; c-basic-offset: 4
1186 ; tab-width: 8
1187 ; indent-tabs-mode: nil
1188 ; End:
1189 ;
1190 ; vi: set shiftwidth=4 tabstop=8 expandtab:
1191 ; :indentSize=4:tabSize=8:noTabs=true:
1192 ;