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