NSIS: Add an initial donation page.

Add a donation page to the Wireshark installer.
This commit is contained in:
Gerald Combs 2022-12-14 14:10:14 -08:00 committed by AndersBroman
parent c6ee65db6b
commit 963dba2d60
2 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,19 @@
[Settings]
NumFields=2
[Field 1]
Type=Label
Left=10
Right=250
Top=10
Bottom=34
Text=The Wireshark Foundation believes that everyone should be able to learn about network protocols and analyze their networks. Your donation helps to support Wireshark and host SharkFest.
[Field 2]
Type=Link
Left=10
Right=250
Top=50
Bottom=58
Text=You can learn more and donate at https://www.wiresharkfoundation.org.
State=https://www.wiresharkfoundation.org/

View File

@ -91,6 +91,8 @@ BrandingText "Wireshark${U+00ae} Installer"
!define MUI_LICENSEPAGE_BUTTON "Noted"
!insertmacro MUI_PAGE_LICENSE "${STAGING_DIR}\COPYING.txt"
Page custom DisplayDonatePage
!insertmacro MUI_PAGE_COMPONENTS
!ifdef QT_DIR
Page custom DisplayAdditionalTasksPage LeaveAdditionalTasksPage
@ -117,6 +119,7 @@ Page custom DisplayUSBPcapPage
; Old Modern 1 UI: https://nsis.sourceforge.io/Docs/Modern%20UI/Readme.html
; To do: Upgrade to the Modern 2 UI:
;ReserveFile "AdditionalTasksPage.ini"
ReserveFile "DonatePage.ini"
ReserveFile "NpcapPage.ini"
ReserveFile "USBPcapPage.ini"
ReserveFile /plugin InstallOptions.dll
@ -453,6 +456,7 @@ done:
;Extract InstallOptions INI files
;!insertmacro INSTALLOPTIONS_EXTRACT "AdditionalTasksPage.ini"
!insertmacro INSTALLOPTIONS_EXTRACT "DonatePage.ini"
!insertmacro INSTALLOPTIONS_EXTRACT "NpcapPage.ini"
!insertmacro INSTALLOPTIONS_EXTRACT "USBPcapPage.ini"
FunctionEnd
@ -463,6 +467,11 @@ Function DisplayAdditionalTasksPage
FunctionEnd
!endif
Function DisplayDonatePage
!insertmacro MUI_HEADER_TEXT "Donate Today" "We could use your help."
!insertmacro INSTALLOPTIONS_DISPLAY "DonatePage.ini"
FunctionEnd
Function DisplayNpcapPage
!insertmacro MUI_HEADER_TEXT "Packet Capture" "Wireshark requires either Npcap or WinPcap to capture live network data."
!insertmacro INSTALLOPTIONS_DISPLAY "NpcapPage.ini"