From 8c7e3f0d302200f22ea80822f47d9c7081c5f5b4 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Wed, 27 Apr 2022 14:38:38 -0700 Subject: [PATCH] Packaging: Add a Logwolf NSIS config. Create Logwolf-specific copies of the various Wireshark NSIS config files and modify them to install and uninstall Logwolf. There are still a bunch of rough edges, but the installer works for a test capture I have here. --- CMakeLists.txt | 7 + packaging/nsis/CMakeLists.txt | 208 ++- .../nsis/logwolf-additional-tasks.nsddef | 17 + .../nsis/logwolf-additional-tasks.nsdinc | 75 ++ packaging/nsis/logwolf-common.nsh | 128 ++ packaging/nsis/logwolf-config.nsh.in | 31 + packaging/nsis/logwolf.nsi | 1139 +++++++++++++++++ packaging/nsis/uninstall-logwolf.nsi | 268 ++++ packaging/nsis/uninstall-wireshark.nsi | 4 - ...ddef => wireshark-additional-tasks.nsddef} | 0 ...dinc => wireshark-additional-tasks.nsdinc} | 0 ...{config.nsh.in => wireshark-config.nsh.in} | 2 +- packaging/nsis/wireshark.nsi | 2 +- 13 files changed, 1832 insertions(+), 49 deletions(-) create mode 100644 packaging/nsis/logwolf-additional-tasks.nsddef create mode 100644 packaging/nsis/logwolf-additional-tasks.nsdinc create mode 100644 packaging/nsis/logwolf-common.nsh create mode 100644 packaging/nsis/logwolf-config.nsh.in create mode 100644 packaging/nsis/logwolf.nsi create mode 100644 packaging/nsis/uninstall-logwolf.nsi rename packaging/nsis/{AdditionalTasksPage.nsddef => wireshark-additional-tasks.nsddef} (100%) rename packaging/nsis/{AdditionalTasksPage.nsdinc => wireshark-additional-tasks.nsdinc} (100%) rename packaging/nsis/{config.nsh.in => wireshark-config.nsh.in} (93%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ddc11b964..e20cb784cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,8 +30,10 @@ endif() if(WIN32) set(_project_name Wireshark) + set(_log_project_name Logwolf) else() set(_project_name wireshark) + set(_log_project_name logwolf) endif() project(${_project_name} C CXX) @@ -50,6 +52,11 @@ endif() set(PROJECT_VERSION "${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT_PATCH_VERSION}${PROJECT_VERSION_EXTENSION}") +set(LOG_PROJECT_NAME ${_log_project_name}) +set(LOG_PROJECT_MAJOR_VERSION 0) +set(LOG_PROJECT_MINOR_VERSION 8) +set(LOG_PROJECT_VERSION "${LOG_PROJECT_MAJOR_VERSION}.${LOG_PROJECT_MINOR_VERSION}.${PROJECT_PATCH_VERSION}${PROJECT_VERSION_EXTENSION}") + include( CMakeOptions.txt ) # We require minimum C11 diff --git a/packaging/nsis/CMakeLists.txt b/packaging/nsis/CMakeLists.txt index c3559e4854..6065e9d8de 100644 --- a/packaging/nsis/CMakeLists.txt +++ b/packaging/nsis/CMakeLists.txt @@ -12,7 +12,7 @@ set(WIRESHARK_NSIS_GENERATED_FILES ${CMAKE_CURRENT_BINARY_DIR}/wireshark-manifest.nsh - ${CMAKE_CURRENT_BINARY_DIR}/config.nsh + ${CMAKE_CURRENT_BINARY_DIR}/wireshark-config.nsh ${CMAKE_CURRENT_BINARY_DIR}/wireshark-qt-manifest.nsh ) set(WIRESHARK_NSIS_GENERATED_FILES ${WIRESHARK_NSIS_GENERATED_FILES} PARENT_SCOPE) @@ -30,8 +30,29 @@ set(WIRESHARK_NSIS_FILES PARENT_SCOPE ) +set(LOGWOLF_NSIS_GENERATED_FILES + ${CMAKE_CURRENT_BINARY_DIR}/logwolf-manifest.nsh + ${CMAKE_CURRENT_BINARY_DIR}/logwolf-config.nsh + ${CMAKE_CURRENT_BINARY_DIR}/logwolf-qt-manifest.nsh +) +set(LOGWOLF_NSIS_GENERATED_FILES ${LOGWOLF_NSIS_GENERATED_FILES} PARENT_SCOPE) + +set(LOGWOLF_NSIS_FILES + logwolf.nsi + uninstall-logwolf.nsi + logwolf-common.nsh + GetWindowsVersion.nsh + servicelib.nsh + AdditionalTasksPage.ini + NpcapPage.ini + USBPcapPage.ini + ${LOGWOLF_NSIS_GENERATED_FILES} + PARENT_SCOPE +) + # Variables required for config.nsh set(PROGRAM_NAME ${CMAKE_PROJECT_NAME}) +set(LOG_PROGRAM_NAME ${LOG_PROJECT_NAME}) file(TO_NATIVE_PATH "${CMAKE_SOURCE_DIR}" TOP_SRC_DIR) # STAGING_DIR depends on the build configuration so we pass it # on the command line below. @@ -50,21 +71,21 @@ set(NPCAP_PACKAGE_VERSION "1.60") set(USBPCAP_PACKAGE_VERSION "1.5.4.0") -set(PRODUCT_VERSION ${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT_PATCH_VERSION}.${PROJECT_BUILD_VERSION}) - # To do: # - Sync the various version names between CMake and NSIS. # - Set CMakeLists.txt version strings in tools/make-version.pl # - Add a VERSION_EXTRA cmake option -set (VERSION "${PROJECT_VERSION}") -set (PRODUCT_VERSION=${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}.${VERSION_BUILD}) +set (VERSION ${PROJECT_VERSION}) +set (PRODUCT_VERSION ${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT_PATCH_VERSION}.${PROJECT_BUILD_VERSION}) +set (LOG_VERSION ${LOG_PROJECT_VERSION}) +set (LOG_PRODUCT_VERSION ${LOG_PROJECT_MAJOR_VERSION}.${LOG_PROJECT_MINOR_VERSION}.${PROJECT_PATCH_VERSION}.${PROJECT_BUILD_VERSION}) #add_custom_target(build_nsis_package # DEPENDS # wireshark-$(WIRESHARK_TARGET_PLATFORM)-$(VERSION).exe #) -if(BUILD_wireshark AND QT_FOUND) +if((BUILD_wireshark OR BUILD_logwolf) AND QT_FOUND) set (QT_DIR "\${STAGING_DIR}") endif() @@ -131,41 +152,81 @@ if(_vcredist) get_filename_component(VCREDIST_EXE ${_vcredist} NAME) endif() -# Ideally we would generate this at compile time using a separate cmake -# module, e.g. cmake/modules/configure_nsis_file.cmake. However we would -# have to figure out a clean way to pass in the variables above. -file(READ "${CMAKE_CURRENT_SOURCE_DIR}/config.nsh.in" _config_nsh_contents) -string(CONFIGURE "${_config_nsh_contents}" _config_nsh_contents) -string(REPLACE "#define" "!define" _config_nsh_contents "${_config_nsh_contents}") -string(REPLACE "#undef" "!undef" _config_nsh_contents "${_config_nsh_contents}") -file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/config.nsh" "${_config_nsh_contents}") +if (BUILD_wireshark) + # Ideally we would generate this at compile time using a separate cmake + # module, e.g. cmake/modules/configure_nsis_file.cmake. However we would + # have to figure out a clean way to pass in the variables above. + file(READ "${CMAKE_CURRENT_SOURCE_DIR}/wireshark-config.nsh.in" _config_nsh_contents) + string(CONFIGURE "${_config_nsh_contents}" _config_nsh_contents) + string(REPLACE "#define" "!define" _config_nsh_contents "${_config_nsh_contents}") + string(REPLACE "#undef" "!undef" _config_nsh_contents "${_config_nsh_contents}") + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/wireshark-config.nsh" "${_config_nsh_contents}") -# wireshark-manifest.nsh. Can be created at configure time. -set(_all_manifest "${CMAKE_CURRENT_BINARY_DIR}/wireshark-manifest.nsh") -set(_all_manifest_contents "# Files required for all sections. Generated by CMake.\n") -set(_all_manifest_contents "${_all_manifest_contents}!ifdef BUNDLE_DEBUG_DLLS\n") -foreach(_dll ${GLIB2_DLLS_DEBUG}) - set(_all_manifest_contents "${_all_manifest_contents}File \"\${STAGING_DIR}\\${_dll}\"\n") -endforeach() -set(_all_manifest_contents "${_all_manifest_contents}!else\n") -foreach(_dll ${GLIB2_DLLS_RELEASE}) - set(_all_manifest_contents "${_all_manifest_contents}File \"\${STAGING_DIR}\\${_dll}\"\n") -endforeach() -set(_all_manifest_contents "${_all_manifest_contents}!endif\n") -foreach(_dll ${CARES_DLL} ${PCRE2_DLL} ${GCRYPT_DLLS} - ${GNUTLS_DLLS} ${KERBEROS_DLLS} ${LIBSSH_DLLS} ${LUA_DLL} - ${LZ4_DLL} ${NGHTTP2_DLL} ${SBC_DLL} ${SMI_DLL} ${SNAPPY_DLL} - ${SPANDSP_DLL} ${BCG729_DLL} ${LIBXML2_DLLS} ${WINSPARKLE_DLL} - ${ZLIB_DLL} ${BROTLI_DLLS} ${ZSTD_DLL} ${ILBC_DLL} ${OPUS_DLL} - # Needed for mmdbresolve - ${MAXMINDDB_DLL} - ) - set(_all_manifest_contents "${_all_manifest_contents}File \"\${STAGING_DIR}\\${_dll}\"\n") -endforeach() -foreach(_script "init.lua" "console.lua" "dtd_gen.lua") - set(_all_manifest_contents "${_all_manifest_contents}File \"\${STAGING_DIR}\\${_script}\"\n") -endforeach() -file(WRITE "${_all_manifest}" "${_all_manifest_contents}") + # wireshark-manifest.nsh. Can be created at configure time. + set(_all_manifest "${CMAKE_CURRENT_BINARY_DIR}/wireshark-manifest.nsh") + set(_all_manifest_contents "# Files required for all sections. Generated by CMake.\n") + set(_all_manifest_contents "${_all_manifest_contents}!ifdef BUNDLE_DEBUG_DLLS\n") + foreach(_dll ${GLIB2_DLLS_DEBUG}) + set(_all_manifest_contents "${_all_manifest_contents}File \"\${STAGING_DIR}\\${_dll}\"\n") + endforeach() + set(_all_manifest_contents "${_all_manifest_contents}!else\n") + foreach(_dll ${GLIB2_DLLS_RELEASE}) + set(_all_manifest_contents "${_all_manifest_contents}File \"\${STAGING_DIR}\\${_dll}\"\n") + endforeach() + set(_all_manifest_contents "${_all_manifest_contents}!endif\n") + foreach(_dll ${CARES_DLL} ${PCRE2_DLL} ${GCRYPT_DLLS} + ${GNUTLS_DLLS} ${KERBEROS_DLLS} ${LIBSSH_DLLS} ${LUA_DLL} + ${LZ4_DLL} ${NGHTTP2_DLL} ${SBC_DLL} ${SMI_DLL} ${SNAPPY_DLL} + ${SPANDSP_DLL} ${BCG729_DLL} ${LIBXML2_DLLS} ${WINSPARKLE_DLL} + ${ZLIB_DLL} ${BROTLI_DLLS} ${ZSTD_DLL} ${ILBC_DLL} ${OPUS_DLL} + # Needed for mmdbresolve + ${MAXMINDDB_DLL} + ) + set(_all_manifest_contents "${_all_manifest_contents}File \"\${STAGING_DIR}\\${_dll}\"\n") + endforeach() + foreach(_script "init.lua" "console.lua" "dtd_gen.lua") + set(_all_manifest_contents "${_all_manifest_contents}File \"\${STAGING_DIR}\\${_script}\"\n") + endforeach() + file(WRITE "${_all_manifest}" "${_all_manifest_contents}") +endif() + +if (BUILD_logwolf) + # Ideally we would generate this at compile time using a separate cmake + # module, e.g. cmake/modules/configure_nsis_file.cmake. However we would + # have to figure out a clean way to pass in the variables above. + file(READ "${CMAKE_CURRENT_SOURCE_DIR}/logwolf-config.nsh.in" _config_nsh_contents) + string(CONFIGURE "${_config_nsh_contents}" _config_nsh_contents) + string(REPLACE "#define" "!define" _config_nsh_contents "${_config_nsh_contents}") + string(REPLACE "#undef" "!undef" _config_nsh_contents "${_config_nsh_contents}") + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/logwolf-config.nsh" "${_config_nsh_contents}") + + # logwolf-manifest.nsh. Can be created at configure time. + set(_all_manifest "${CMAKE_CURRENT_BINARY_DIR}/logwolf-manifest.nsh") + set(_all_manifest_contents "# Files required for all sections. Generated by CMake.\n") + set(_all_manifest_contents "${_all_manifest_contents}!ifdef BUNDLE_DEBUG_DLLS\n") + foreach(_dll ${GLIB2_DLLS_DEBUG}) + set(_all_manifest_contents "${_all_manifest_contents}File \"\${STAGING_DIR}\\${_dll}\"\n") + endforeach() + set(_all_manifest_contents "${_all_manifest_contents}!else\n") + foreach(_dll ${GLIB2_DLLS_RELEASE}) + set(_all_manifest_contents "${_all_manifest_contents}File \"\${STAGING_DIR}\\${_dll}\"\n") + endforeach() + set(_all_manifest_contents "${_all_manifest_contents}!endif\n") + foreach(_dll ${CARES_DLL} ${PCRE2_DLL} ${GCRYPT_DLLS} + ${GNUTLS_DLLS} ${KERBEROS_DLLS} ${LIBSSH_DLLS} ${LUA_DLL} + ${LZ4_DLL} ${NGHTTP2_DLL} ${SBC_DLL} ${SMI_DLL} ${SNAPPY_DLL} + ${SPANDSP_DLL} ${BCG729_DLL} ${LIBXML2_DLLS} ${WINSPARKLE_DLL} + ${ZLIB_DLL} ${BROTLI_DLLS} ${ZSTD_DLL} ${ILBC_DLL} ${OPUS_DLL} + # Needed for mmdbresolve + ${MAXMINDDB_DLL} + ) + set(_all_manifest_contents "${_all_manifest_contents}File \"\${STAGING_DIR}\\${_dll}\"\n") + endforeach() + foreach(_script "init.lua" "console.lua" "dtd_gen.lua") + set(_all_manifest_contents "${_all_manifest_contents}File \"\${STAGING_DIR}\\${_script}\"\n") + endforeach() + file(WRITE "${_all_manifest}" "${_all_manifest_contents}") +endif() file(TO_NATIVE_PATH "${DATAFILE_DIR}" _staging_dir) file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}" _outfile_dir) @@ -205,6 +266,18 @@ macro( ADD_NSIS_UNINSTALLER_TARGETS ) else() message(WARNING "The NSIS installer cannot be built if the Wireshark program isn't built.") endif() + + if(BUILD_logwolf) + add_custom_command(OUTPUT ${DATAFILE_DIR}/uninstall-logwolf.exe + DEPENDS ${_nsis_source_dir}/uninstall-logwolf.nsi + ${_nsis_source_dir}/logwolf-common.nsh + COMMAND ${MAKENSIS_EXECUTABLE} ${NSIS_OPTIONS} + uninstall-logwolf.nsi + COMMAND ${POWERSHELL_COMMAND} "${_nsis_source_dir}/makeUninstall.ps1" ${DATAFILE_DIR}/uninstall_logwolf_installer.exe + COMMAND ${CMAKE_COMMAND} -E remove ${DATAFILE_DIR}/uninstall_logwolf_installer.exe + WORKING_DIRECTORY ${_nsis_source_dir} + ) + endif() endmacro( ADD_NSIS_UNINSTALLER_TARGETS ) macro( ADD_NSIS_PACKAGE_TARGETS ) @@ -259,14 +332,63 @@ macro( ADD_NSIS_PACKAGE_TARGETS ) EXCLUDE_FROM_DEFAULT_BUILD True ) endif() + + if(BUILD_logwolf) + #set (_nsis_package ${CMAKE_BINARY_DIR}/packaging/nsis/Wireshark-$(WIRESHARK_TARGET_PLATFORM)-$(VERSION).exe) + + # logwolf-qt-manifest.nsh. Created using Wireshark.exe. + add_custom_command(OUTPUT ${_nsis_binary_dir}/logwolf-qt-manifest.nsh + COMMAND set "PATH=${QT_BIN_PATH};%PATH%" + COMMAND ${POWERSHELL_COMMAND} "${_nsis_source_dir}/windeployqt-to-nsis.ps1" + -Executable $ + -FilePath ${_nsis_binary_dir}/logwolf-qt-manifest.nsh + $<$:-DebugConfig> + DEPENDS "${_nsis_source_dir}/windeployqt-to-nsis.ps1" + ) + + # Build NSIS package dependencies. We build the package in + # two stages so that logwolf_nsis below doesn't trigger + # any dependencies that might clobber any signed executables. + add_custom_target(logwolf_nsis_prep + DEPENDS + ${LOGWOLF_NSIS_FILES} + copy_data_files + user_guide_html + faq_html + ${DATAFILE_DIR}/uninstall-logwolf.exe + ) + set_target_properties(logwolf_nsis_prep PROPERTIES + FOLDER "Packaging" + EXCLUDE_FROM_DEFAULT_BUILD True + ) + + # Dump the installer into + # ${CMAKE_CURRENT_SOURCE_DIR}/packaging/nsis + # Note that executables and DLLs *must* be built separately + add_custom_target(logwolf_nsis + COMMAND ${MAKENSIS_EXECUTABLE} ${NSIS_OPTIONS} + $<$:/DBUNDLE_DEBUG_DLLS> + logwolf.nsi + WORKING_DIRECTORY ${_nsis_source_dir} + ) + set_target_properties(logwolf_nsis PROPERTIES + FOLDER "Packaging" + EXCLUDE_FROM_DEFAULT_BUILD True + ) + endif() endmacro( ADD_NSIS_PACKAGE_TARGETS ) set(CLEAN_FILES - wireshark-manifest.nsh - config.nsh #NEWS.txt - wireshark-qt-manifest.nsh #user-guide.chm ${DATAFILE_DIR}/uninstall-wireshark.exe wireshark-$(WIRESHARK_TARGET_PLATFORM)-$(VERSION).exe + wireshark-config.nsh + wireshark-manifest.nsh + wireshark-qt-manifest.nsh + ${DATAFILE_DIR}/uninstall-logwolf.exe + logwolf-$(WIRESHARK_TARGET_PLATFORM)-$(VERSION).exe + logwolf-config.nsh + logwolf-manifest.nsh + logwolf-qt-manifest.nsh ) diff --git a/packaging/nsis/logwolf-additional-tasks.nsddef b/packaging/nsis/logwolf-additional-tasks.nsddef new file mode 100644 index 0000000000..9113e89da6 --- /dev/null +++ b/packaging/nsis/logwolf-additional-tasks.nsddef @@ -0,0 +1,17 @@ + + + + ; Defined in logwolf.nsi +Call InitAdditionalTasksPage + diff --git a/packaging/nsis/logwolf-additional-tasks.nsdinc b/packaging/nsis/logwolf-additional-tasks.nsdinc new file mode 100644 index 0000000000..962d773bfa --- /dev/null +++ b/packaging/nsis/logwolf-additional-tasks.nsdinc @@ -0,0 +1,75 @@ +; ========================================================= +; This file was generated by NSISDialogDesigner 1.5.0.0 +; https://coolsoft.altervista.org/nsisdialogdesigner +; +; Do not edit it manually, use NSISDialogDesigner instead! +; ========================================================= + +; handle variables +Var hCtl_AdditionalTasksPage +Var hCtl_AdditionalTasksPage_ExtensionsLabel +Var hCtl_AdditionalTasksPage_AssociateExtensionsCheckBox +Var hCtl_AdditionalTasksPage_QuickLaunchCheckBox +Var hCtl_AdditionalTasksPage_DesktopIconCheckBox +Var hCtl_AdditionalTasksPage_StartMenuCheckBox +Var hCtl_AdditionalTasksPage_FileExtensionsLabel +Var hCtl_AdditionalTasksPage_CreateShortcutsLabel +Var hCtl_AdditionalTasksPage_Font1 + + +; dialog create function +Function fnc_AdditionalTasksPage_Create + + ; custom font definitions + CreateFont $hCtl_AdditionalTasksPage_Font1 "Microsoft Sans Serif" "8.25" "700" + + ; === AdditionalTasksPage (type: Dialog) === + nsDialogs::Create 1018 + Pop $hCtl_AdditionalTasksPage + ${If} $hCtl_AdditionalTasksPage == error + Abort + ${EndIf} + !insertmacro MUI_HEADER_TEXT "Additional Tasks" "Create shortcuts and associate file extensions." + + ; === ExtensionsLabel (type: Label) === + ${NSD_CreateLabel} 14u 93u 245u 32u "Extensions include scap." + Pop $hCtl_AdditionalTasksPage_ExtensionsLabel + + ; === AssociateExtensionsCheckBox (type: Checkbox) === + ${NSD_CreateCheckbox} 14u 78u 267u 9u "Associate log file extensions with Logwolf" + Pop $hCtl_AdditionalTasksPage_AssociateExtensionsCheckBox + + ; === QuickLaunchCheckBox (type: Checkbox) === + ${NSD_CreateCheckbox} 14u 46u 267u 9u "Logwolf Quick Launch Icon" + Pop $hCtl_AdditionalTasksPage_QuickLaunchCheckBox + + ; === DesktopIconCheckBox (type: Checkbox) === + ${NSD_CreateCheckbox} 14u 33u 267u 9u "Logwolf Desktop Icon" + Pop $hCtl_AdditionalTasksPage_DesktopIconCheckBox + + ; === StartMenuCheckBox (type: Checkbox) === + ${NSD_CreateCheckbox} 14u 21u 267u 9u "Logwolf Start Menu Item" + Pop $hCtl_AdditionalTasksPage_StartMenuCheckBox + + ; === FileExtensionsLabel (type: Label) === + ${NSD_CreateLabel} 8u 62u 280u 9u "Associate File Extensions" + Pop $hCtl_AdditionalTasksPage_FileExtensionsLabel + SendMessage $hCtl_AdditionalTasksPage_FileExtensionsLabel ${WM_SETFONT} $hCtl_AdditionalTasksPage_Font1 0 + + ; === CreateShortcutsLabel (type: Label) === + ${NSD_CreateLabel} 8u 6u 280u 9u "Create Shortcuts" + Pop $hCtl_AdditionalTasksPage_CreateShortcutsLabel + SendMessage $hCtl_AdditionalTasksPage_CreateShortcutsLabel ${WM_SETFONT} $hCtl_AdditionalTasksPage_Font1 0 + + ; CreateFunctionCustomScript + ; Defined in logwolf.nsi + Call InitAdditionalTasksPage + + +FunctionEnd + +; dialog show function +Function fnc_AdditionalTasksPage_Show + Call fnc_AdditionalTasksPage_Create + nsDialogs::Show +FunctionEnd diff --git a/packaging/nsis/logwolf-common.nsh b/packaging/nsis/logwolf-common.nsh new file mode 100644 index 0000000000..6d222a911d --- /dev/null +++ b/packaging/nsis/logwolf-common.nsh @@ -0,0 +1,128 @@ + +; ============================================================================ +; Name and version information +; ============================================================================ + +Unicode true +; This improves the installer's appearance considerably here on a display scaled +; to 225%, but checkboxes are comically small. We might be able to fix this +; using the SysCompImg extension: +; http://forums.winamp.com/showthread.php?t=443754 +ManifestDPIAware true +; These might be correct in the future, but are currently undocumented: +; http://forums.winamp.com/showthread.php?t=452632 +; ManifestDPIAware System +; ManifestDPIAwareness "PerMonitorV2,System" + +!ifdef NSIS_INCLUDE_DIR +!addincludedir ${NSIS_INCLUDE_DIR} +!endif + +!include "logwolf-config.nsh" + +!define BITS 64 + +!define DISPLAY_NAME "${PROGRAM_NAME} ${VERSION} ${BITS}-bit" +Name "${DISPLAY_NAME}" + +!define PROGRAM_FULL_NAME "The ${PROGRAM_NAME} Log Analyzer" +!define PROGRAM_NAME_PATH "${PROGRAM_NAME}.exe" + +!define UNINSTALLER_NAME "uninstall-logwolf.exe" + +VIAddVersionKey "ProductName" "${PROGRAM_NAME}" +VIAddVersionKey "Comments" "It's a great product with a great story to tell. I'm pumped!" +VIAddVersionKey "CompanyName" "${PROGRAM_NAME} development team" +; NSIS handles U+00a9 but not a UTF-8 encoded copyright symbol. +VIAddVersionKey "LegalCopyright" "${U+00a9} Gerald Combs and many others" +VIAddVersionKey "LegalTrademarks" "Logwolf and the 'wolf' logo are registered trademarks" +VIAddVersionKey "FileDescription" "${PROGRAM_NAME} installer for ${BITS}-bit Windows" +VIAddVersionKey "Language" "English" +VIAddVersionKey "ProductVersion" "${PRODUCT_VERSION}" +VIAddVersionKey "FileVersion" "${PRODUCT_VERSION}" +VIProductVersion "${PRODUCT_VERSION}" + +XPStyle on + + +; ============================================================================ +; Functions and macros +; ============================================================================ + +; Used to refresh the display of file association +!define SHCNE_ASSOCCHANGED 0x08000000 +!define SHCNF_IDLIST 0 + +!macro UpdateIcons + Push $R0 + Push $R1 + Push $R2 + + !define UPDATEICONS_UNIQUE ${__LINE__} + + IfFileExists "$SYSDIR\shell32.dll" UpdateIcons.ok_shell32_${UPDATEICONS_UNIQUE} UpdateIcons.error_shell32_${UPDATEICONS_UNIQUE} +UpdateIcons.ok_shell32_${UPDATEICONS_UNIQUE}: + System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)' + Goto UpdateIcons.quit_${UPDATEICONS_UNIQUE} + +UpdateIcons.error_shell32_${UPDATEICONS_UNIQUE}: + MessageBox MB_OK|MB_ICONSTOP \ + "Can't find 'shell32.dll' library. Impossible to update icons" \ + /SD IDOK + Goto UpdateIcons.quit_${UPDATEICONS_UNIQUE} + +UpdateIcons.quit_${UPDATEICONS_UNIQUE}: + !undef UPDATEICONS_UNIQUE + Pop $R2 + Pop $R1 + Pop $R0 + +; Force the icon cache to refresh +; https://superuser.com/questions/499078/refresh-icon-cache-without-rebooting +IfFileExists "$SYSDIR\ie4uinit.exe" 0 +2 +Exec '"$SYSDIR\ie4uinit.exe" -ClearIconCache' + +!macroend + +; ============================================================================ +; Push our known file extensions onto the stack, prepended with a marker +; Note that this is a subset of dump_open_table in wiretap/file_access.c. We +; probably don't want to grab JPEG or MP3 files. +; ============================================================================ + +; Used to add associations between file extensions and Logwolf +!define LOGWOLF_ASSOC "logwolf-log-file" + +!define FILE_EXTENSION_MARKER "FILE_EXTENSION_MARKER" + +!macro PushFileExtensions + Push "${FILE_EXTENSION_MARKER}" + Push ".scap" +!macroend + +!macro IsLogwolfRunning +; See if Logwolf is running +; https://nsis.sourceforge.io/Check_whether_your_application_is_running +${Do} + + System::Call 'kernel32::OpenMutex(i 0x100000, b 0, t "Global\${PROGRAM_NAME}-is-running-{9CA78EEA-EA4D-4490-9240-FC01FCEF464B}") i .R0' + IntCmp $R0 0 checkRunningSession + System::Call 'kernel32::CloseHandle(i $R0)' + Goto isRunning + +checkRunningSession: + System::Call 'kernel32::OpenMutex(i 0x100000, b 0, t "${PROGRAM_NAME}-is-running-{9CA78EEA-EA4D-4490-9240-FC01FCEF464B}") i .R0' + IntCmp $R0 0 notRunning + System::Call 'kernel32::CloseHandle(i $R0)' + +isRunning: + ; You'd better go catch it. + MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION "${PROGRAM_NAME} or one of its associated programs is running.$\r$\nPlease close it first." /SD IDCANCEL IDRETRY continueChecking + Quit + +notRunning: + ${ExitDo} + +continueChecking: +${Loop} +!macroend diff --git a/packaging/nsis/logwolf-config.nsh.in b/packaging/nsis/logwolf-config.nsh.in new file mode 100644 index 0000000000..6dd97ef14b --- /dev/null +++ b/packaging/nsis/logwolf-config.nsh.in @@ -0,0 +1,31 @@ +# ============================================================================ +# NSIS configuration definitions. Generated from wireshark-config.nsh.in. +# ============================================================================ + +# Do not prefix comments with ";". They will be removed by CMake. + +# MUST match " "${_TEMPFILE}"' + !else + ; Posix - sh + !system 'if [ -e "${_FILE_NAME}" ]; then echo "!define ${_VAR_NAME}" > "${_TEMPFILE}"; fi' + !endif + !include '${_TEMPFILE}' + !delfile '${_TEMPFILE}' + !undef _TEMPFILE +!macroend +!define !defineifexist "!insertmacro !defineifexist" + +; ============================================================================ +; Header configuration +; ============================================================================ + +; The file to write +OutFile "${OUTFILE_DIR}\${PROGRAM_NAME}-${WIRESHARK_TARGET_PLATFORM}-${VERSION}.exe" +; Installer icon +Icon "${TOP_SRC_DIR}\resources\icons\wiresharkinst.ico" + +; ============================================================================ +; Modern UI +; ============================================================================ +; The modern user interface will look much better than the common one. +; However, as the development of the modern UI is still going on, and the script +; syntax changes, you will need exactly that NSIS version, which this script is +; made for. This is the current (December 2003) latest version: V2.0b4 +; If you are using a different version, it's not predictable what will happen. + +!include "MUI2.nsh" +!include "InstallOptions.nsh" +;!addplugindir ".\Plugins" + +!define MUI_ICON "${TOP_SRC_DIR}\resources\icons\wiresharkinst.ico" +BrandingText "Logwolf${U+00ae} Installer" + +!define MUI_COMPONENTSPAGE_SMALLDESC +!define MUI_FINISHPAGE_NOAUTOCLOSE +!define MUI_WELCOMEPAGE_TITLE_3LINES +!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." + +; NSIS shows Readme files by opening the Readme file with the default application for +; the file's extension. "README.win32" won't work in most cases, because extension "win32" +; is usually not associated with an appropriate text editor. We should use extension "txt" +; for a text file or "html" for an html README file. +!define MUI_FINISHPAGE_TITLE_3LINES +!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\NEWS.txt" +!define MUI_FINISHPAGE_SHOWREADME_TEXT "Show News" +!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED +; NSIS runs as Administrator and will run Logwolf as Administrator +; if these are enabled. +;!define MUI_FINISHPAGE_RUN "$INSTDIR\${PROGRAM_NAME_PATH}" +;!define MUI_FINISHPAGE_RUN_NOTCHECKED + +; ============================================================================ +; MUI Pages +; ============================================================================ + +!insertmacro MUI_PAGE_WELCOME + +!define MUI_LICENSEPAGE_TEXT_TOP "Logwolf is distributed under the GNU General Public License." +!define MUI_LICENSEPAGE_TEXT_BOTTOM "This is not an end user license agreement (EULA). It is provided here for informational purposes only." +!define MUI_LICENSEPAGE_BUTTON "Noted" +!insertmacro MUI_PAGE_LICENSE "${STAGING_DIR}\COPYING.txt" + +!insertmacro MUI_PAGE_COMPONENTS +!ifdef QT_DIR +Page custom DisplayAdditionalTasksPage LeaveAdditionalTasksPage +!endif +!insertmacro MUI_PAGE_DIRECTORY +!insertmacro MUI_PAGE_INSTFILES +!insertmacro MUI_PAGE_FINISH + +; ============================================================================ +; MUI Languages +; ============================================================================ + +!insertmacro MUI_LANGUAGE "English" + +; ============================================================================ +; Reserve Files +; ============================================================================ + + ;Things that need to be extracted on first (keep these lines before any File command!) + ;Only useful for BZIP2 compression + + ; 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 /plugin InstallOptions.dll + + ; Modern UI 2 / nsDialog pages. + ; https://nsis.sourceforge.io/Docs/Modern%20UI%202/Readme.html + ; https://nsis.sourceforge.io/Docs/nsDialogs/Readme.html + !ifdef QT_DIR + !include "logwolf-additional-tasks.nsdinc" + !endif + +; ============================================================================ +; Section macros +; ============================================================================ +!include "Sections.nsh" + +; ============================================================================ +; Command Line +; ============================================================================ +!include "FileFunc.nsh" + +!insertmacro GetParameters +!insertmacro GetOptions + +; ========= Install extcap binary and help file ========= +!macro InstallExtcap EXTCAP_NAME + + SetOutPath $INSTDIR + File "${STAGING_DIR}\${EXTCAP_NAME}.html" + SetOutPath $INSTDIR\extcap + File "${STAGING_DIR}\extcap\${EXTCAP_NAME}.exe" + +!macroend + +; ========= Check if silent mode install of /EXTRACOMPONENTS ========= +!macro CheckExtrasFlag EXTRAS_NAME + !define EXTRAS_FLAG ${__LINE__} +Section + IfSilent +1 skip_${EXTRAS_FLAG} + push $R0 + push $R1 + push $R2 + ${GetParameters} $R0 + ${GetOptions} $R0 "/EXTRACOMPONENTS=" $R1 + IfErrors popreg_${EXTRAS_FLAG} + ${WordFind} $R1 "," "E+1" $R0 + +; No delimiters found - check for single word match + ${If} $R0 = 1 + StrCmp $R1 ${EXTRAS_NAME} install_${EXTRAS_FLAG} popreg_${EXTRAS_FLAG} + ${ENDIF} + +; Loop through all delimited words checking for match + IntOp $R2 0 + 1 + ${While} $R0 != 2 + StrCmp $R0 ${EXTRAS_NAME} install_${EXTRAS_FLAG} 0 + IntOp $R2 $R2 + 1 + ${WordFind} $R1 "," "E+$R2" $R0 + ${EndWhile} + Goto popreg_${EXTRAS_FLAG} + +install_${EXTRAS_FLAG}: + !insertmacro InstallExtcap ${EXTRAS_NAME} +popreg_${EXTRAS_FLAG}: + pop $R2 + pop $R1 + pop $R0 +skip_${EXTRAS_FLAG}: + !undef EXTRAS_FLAG +SectionEnd +!macroend + +; ============================================================================ +; Component page configuration +; ============================================================================ +ComponentText "The following components are available for installation." + +; ============================================================================ +; Directory selection page configuration +; ============================================================================ +; The text to prompt the user to enter a directory +DirText "Choose a directory in which to install ${PROGRAM_NAME}." + +; The default installation directory +!if ${WIRESHARK_TARGET_PLATFORM} == "win64" + InstallDir $PROGRAMFILES64\${PROGRAM_NAME} +!else + InstallDir $PROGRAMFILES\${PROGRAM_NAME} +!endif + +; See if this is an upgrade; if so, use the old InstallDir as default +InstallDirRegKey HKEY_LOCAL_MACHINE SOFTWARE\${PROGRAM_NAME} "InstallDir" + + +; ============================================================================ +; Install page configuration +; ============================================================================ +ShowInstDetails show + +; ============================================================================ +; Functions and macros +; ============================================================================ + +Var EXTENSION +; https://docs.microsoft.com/en-us/windows/win32/shell/fa-file-types +Function Associate + Push $R0 + !insertmacro PushFileExtensions + + Pop $EXTENSION + + ${DoUntil} $EXTENSION == ${FILE_EXTENSION_MARKER} + ReadRegStr $R0 HKCR $EXTENSION "" + StrCmp $R0 "" Associate.doRegister + Goto Associate.end + +Associate.doRegister: + ;The extension is not associated to any program, we can do the link + WriteRegStr HKCR $EXTENSION "" ${LOGWOLF_ASSOC} + DetailPrint "Registered file type: $EXTENSION" + +Associate.end: + Pop $EXTENSION + ${Loop} + + Pop $R0 +FunctionEnd + +; Control states +Var START_MENU_STATE +Var DESKTOP_ICON_STATE +Var QUICK_LAUNCH_STATE +Var FILE_ASSOCIATE_STATE + +; NSIS +Var OLD_UNINSTALLER +Var OLD_INSTDIR +Var OLD_DISPLAYNAME +Var TMP_UNINSTALLER + +; WiX +Var REGISTRY_BITS +Var TMP_PRODUCT_GUID +Var WIX_DISPLAYNAME +Var WIX_DISPLAYVERSION +Var WIX_UNINSTALLSTRING + +; ============================================================================ +; 64-bit support +; ============================================================================ +!include x64.nsh + +!include "GetWindowsVersion.nsh" +!include WinMessages.nsh + +Function .onInit + !if ${WIRESHARK_TARGET_PLATFORM} == "win64" + ; http://forums.winamp.com/printthread.php?s=16ffcdd04a8c8d52bee90c0cae273ac5&threadid=262873 + ${IfNot} ${RunningX64} + MessageBox MB_OK "Logwolf only runs on 64-bit machines." /SD IDOK + Abort + ${EndIf} + !endif + + ; Get the Windows version + ${GetWindowsVersion} $R0 + + ; This should match the following: + ; - The NTDDI_VERSION and _WIN32_WINNT parts of cmakeconfig.h.in + ; - The section in image\wireshark.exe.manifest.in + ; - The VersionNT parts of packaging\wix\Prerequisites.wxi + + ; Uncomment to test. + ; MessageBox MB_OK "You're running Windows $R0." + + ; Check if we're able to run with this version + StrCmp $R0 '95' lbl_winversion_unsupported + StrCmp $R0 '98' lbl_winversion_unsupported + StrCmp $R0 'ME' lbl_winversion_unsupported + StrCmp $R0 'NT 4.0' lbl_winversion_unsupported + StrCmp $R0 '2000' lbl_winversion_unsupported + StrCmp $R0 'XP' lbl_winversion_unsupported + StrCmp $R0 '2003' lbl_winversion_unsupported + StrCmp $R0 'Vista' lbl_winversion_unsupported + StrCmp $R0 '2008' lbl_winversion_unsupported + Goto lbl_winversion_supported + +lbl_winversion_unsupported: + MessageBox MB_OK \ + "Windows $R0 is not supported." \ + /SD IDOK + Quit + +lbl_winversion_supported: +!insertmacro IsLogwolfRunning + + ; Default control values. + StrCpy $START_MENU_STATE ${BST_CHECKED} + StrCpy $DESKTOP_ICON_STATE ${BST_UNCHECKED} + StrCpy $QUICK_LAUNCH_STATE ${BST_CHECKED} + StrCpy $FILE_ASSOCIATE_STATE ${BST_CHECKED} + + ; Copied from https://nsis.sourceforge.io/Auto-uninstall_old_before_installing_new + ReadRegStr $OLD_UNINSTALLER HKLM \ + "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}" \ + "UninstallString" + StrCmp $OLD_UNINSTALLER "" check_wix + + ReadRegStr $OLD_INSTDIR HKLM \ + "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME}.exe" \ + "Path" + StrCmp $OLD_INSTDIR "" check_wix + + ReadRegStr $OLD_DISPLAYNAME HKLM \ + "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}" \ + "DisplayName" + StrCmp $OLD_DISPLAYNAME "" done + + ; We're reinstalling. Flip our control states according to what the + ; user chose before. + ; (we use the "all users" start menu, so select it first) + SetShellVarContext all + ; MessageBox MB_OK|MB_ICONINFORMATION "oninit 1 sm $START_MENU_STATE di $DESKTOP_ICON_STATE ql $QUICK_LAUNCH_STATE" + ${IfNot} ${FileExists} $SMPROGRAMS\${PROGRAM_NAME}.lnk + StrCpy $START_MENU_STATE ${BST_UNCHECKED} + ${Endif} + ${If} ${FileExists} $DESKTOP\${PROGRAM_NAME}.lnk + StrCpy $DESKTOP_ICON_STATE ${BST_CHECKED} + ${Endif} + ${IfNot} ${FileExists} $QUICKLAUNCH\${PROGRAM_NAME}.lnk + StrCpy $QUICK_LAUNCH_STATE ${BST_UNCHECKED} + ${Endif} + ; Leave FILE_ASSOCIATE_STATE checked. + ; MessageBox MB_OK|MB_ICONINFORMATION "oninit 2 sm $START_MENU_STATE $SMPROGRAMS\${PROGRAM_NAME}\${PROGRAM_NAME}.lnk \ + ; $\ndi $DESKTOP_ICON_STATE $DESKTOP\${PROGRAM_NAME}.lnk \ + ; $\nql $QUICK_LAUNCH_STATE $QUICKLAUNCH\${PROGRAM_NAME}.lnk" + + MessageBox MB_YESNOCANCEL|MB_ICONQUESTION \ + "$OLD_DISPLAYNAME is already installed.\ + $\n$\nWould you like to uninstall it first?" \ + /SD IDYES \ + IDYES prep_nsis_uninstaller \ + IDNO done + Abort + +; Copy the uninstaller to $TEMP and run it. +; The uninstaller normally does this by itself, but doesn't wait around +; for the executable to finish, which means ExecWait won't work correctly. +prep_nsis_uninstaller: + ClearErrors + StrCpy $TMP_UNINSTALLER "$TEMP\${PROGRAM_NAME}_uninstaller.exe" + ; ...because we surround UninstallString in quotes. + StrCpy $0 $OLD_UNINSTALLER -1 1 + StrCpy $1 "$TEMP\${PROGRAM_NAME}_uninstaller.exe" + StrCpy $2 1 + System::Call 'kernel32::CopyFile(t r0, t r1, b r2) 1' + ExecWait "$TMP_UNINSTALLER /S _?=$OLD_INSTDIR" + + Delete "$TMP_UNINSTALLER" + +; Look for a WiX-installed package. + +check_wix: + StrCpy $REGISTRY_BITS 64 + SetRegView 64 + check_wix_restart: + StrCpy $0 0 + wix_reg_enum_loop: + EnumRegKey $TMP_PRODUCT_GUID HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" $0 + StrCmp $TMP_PRODUCT_GUID "" wix_enum_reg_done + IntOp $0 $0 + 1 + ReadRegStr $WIX_DISPLAYNAME HKLM \ + "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$TMP_PRODUCT_GUID" \ + "DisplayName" + ; MessageBox MB_OK|MB_ICONINFORMATION "Reading HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$1 DisplayName = $2" + ; Look for "Logwolf". + StrCmp $WIX_DISPLAYNAME "${PROGRAM_NAME}" wix_found wix_reg_enum_loop + + wix_found: + ReadRegStr $WIX_DISPLAYVERSION HKLM \ + "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$TMP_PRODUCT_GUID" \ + "DisplayVersion" + ReadRegStr $WIX_UNINSTALLSTRING HKLM \ + "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$TMP_PRODUCT_GUID" \ + "UninstallString" + StrCmp $WIX_UNINSTALLSTRING "" done + MessageBox MB_YESNOCANCEL|MB_ICONQUESTION \ + "$WIX_DISPLAYNAME $WIX_DISPLAYVERSION (msi) is already installed.\ + $\n$\nWould you like to uninstall it first?" \ + /SD IDYES \ + IDYES prep_wix_uninstaller \ + IDNO done + Abort + + ; Run the WiX-provided UninstallString. + prep_wix_uninstaller: + ClearErrors + ExecWait "$WIX_UNINSTALLSTRING" + + Goto done + + wix_enum_reg_done: + ; MessageBox MB_OK|MB_ICONINFORMATION "Checked $0 $REGISTRY_BITS bit keys" + IntCmp $REGISTRY_BITS 32 done + StrCpy $REGISTRY_BITS 32 + SetRegView 32 + Goto check_wix_restart + +done: + + ; Command line parameters + ${GetParameters} $R0 + + ${GetOptions} $R0 "/desktopicon=" $R1 + ${If} $R1 == "yes" + StrCpy $DESKTOP_ICON_STATE ${BST_CHECKED} + ${ElseIf} $R1 == "no" + StrCpy $DESKTOP_ICON_STATE ${BST_UNCHECKED} + ${Endif} + + ${GetOptions} $R0 "/quicklaunchicon=" $R1 + ${If} $R1 == "yes" + StrCpy $QUICK_LAUNCH_STATE ${BST_CHECKED} + ${ElseIf} $R1 == "no" + StrCpy $QUICK_LAUNCH_STATE ${BST_UNCHECKED} + ${Endif} + + ;Extract InstallOptions INI files + ;!insertmacro INSTALLOPTIONS_EXTRACT "AdditionalTasksPage.ini" +FunctionEnd + +!ifdef QT_DIR +Function DisplayAdditionalTasksPage + Call fnc_AdditionalTasksPage_Show +FunctionEnd +!endif + +; ============================================================================ +; Installation execution commands +; ============================================================================ + +Section "-Required" +;------------------------------------------- + +; +; Install for every user +; +SetShellVarContext all + +SetOutPath $INSTDIR +File "${STAGING_DIR}\${UNINSTALLER_NAME}" +File "${STAGING_DIR}\libwiretap.dll" +File "${STAGING_DIR}\libwireshark.dll" +File "${STAGING_DIR}\libwsutil.dll" + +!include logwolf-manifest.nsh + +File "${STAGING_DIR}\COPYING.txt" +File "${STAGING_DIR}\NEWS.txt" +File "${STAGING_DIR}\README.txt" +File "${STAGING_DIR}\README.windows.txt" +File "${STAGING_DIR}\AUTHORS-SHORT" +File "${STAGING_DIR}\manuf" +File "${STAGING_DIR}\wka" +File "${STAGING_DIR}\services" +File "${STAGING_DIR}\pdml2html.xsl" +File "${STAGING_DIR}\ws.css" +;File "${STAGING_DIR}\logwolf.html" +File "${STAGING_DIR}\wireshark-filter.html" +File "${STAGING_DIR}\dumpcap.exe" +File "${STAGING_DIR}\dumpcap.html" +File "${STAGING_DIR}\extcap.html" +File "${STAGING_DIR}\ipmap.html" + +; C-runtime redistributable +; vc_redist.x64.exe or vc_redist.x86.exe - copy and execute the redistributable installer +File "${VCREDIST_DIR}\${VCREDIST_EXE}" +; If the user already has the redistributable installed they will see a +; Big Ugly Dialog by default, asking if they want to uninstall or repair. +; Ideally we should add a checkbox for this somewhere. In the meantime, +; just do a "quiet" install. + +; http://asawicki.info/news_1597_installing_visual_c_redistributable_package_from_command_line.html +ExecWait '"$INSTDIR\${VCREDIST_EXE}" /install /quiet /norestart' $0 +DetailPrint "${VCREDIST_EXE} returned $0" + +; https://docs.microsoft.com/en-us/windows/desktop/Msi/error-codes +!define ERROR_SUCCESS 0 +!define ERROR_SUCCESS_REBOOT_INITIATED 1641 +!define ERROR_PRODUCT_VERSION 1638 +!define ERROR_SUCCESS_REBOOT_REQUIRED 3010 +${Switch} $0 + ${Case} ${ERROR_SUCCESS} + ${Case} ${ERROR_PRODUCT_VERSION} + ${Break} + ${Case} ${ERROR_SUCCESS_REBOOT_INITIATED} ; Shouldn't happen. + ${Case} ${ERROR_SUCCESS_REBOOT_REQUIRED} + SetRebootFlag true + ${Break} + ${Default} + MessageBox MB_OK "The Visual C++ Redistributable installer failed with error $0.$\nUnable to continue installation." /SD IDOK + Abort + ${Break} +${EndSwitch} + +Delete "$INSTDIR\${VCREDIST_EXE}" + + +; global config files - don't overwrite if already existing +;IfFileExists cfilters dont_overwrite_cfilters +File "${STAGING_DIR}\cfilters" +;dont_overwrite_cfilters: +;IfFileExists colorfilters dont_overwrite_colorfilters +File "${STAGING_DIR}\colorfilters" +;dont_overwrite_colorfilters: +;IfFileExists dfilters dont_overwrite_dfilters +File "${STAGING_DIR}\dfilters" +;dont_overwrite_dfilters: +;IfFileExists enterprises.tsv dont_overwrite_enterprises_tsv +File "${STAGING_DIR}\enterprises.tsv" +;dont_overwrite_dfilters: +;IfFileExists smi_modules dont_overwrite_smi_modules +File "${STAGING_DIR}\smi_modules" +;dont_overwrite_smi_modules: + + +; +; Install the Diameter DTD and XML files in the "diameter" subdirectory +; of the installation directory. +; +SetOutPath $INSTDIR\diameter +File "${STAGING_DIR}\diameter\AlcatelLucent.xml" +File "${STAGING_DIR}\diameter\chargecontrol.xml" +File "${STAGING_DIR}\diameter\Cisco.xml" +File "${STAGING_DIR}\diameter\CiscoSystems.xml" +File "${STAGING_DIR}\diameter\Custom.xml" +File "${STAGING_DIR}\diameter\dictionary.dtd" +File "${STAGING_DIR}\diameter\dictionary.xml" +File "${STAGING_DIR}\diameter\eap.xml" +File "${STAGING_DIR}\diameter\Ericsson.xml" +File "${STAGING_DIR}\diameter\etsie2e4.xml" +File "${STAGING_DIR}\diameter\HP.xml" +File "${STAGING_DIR}\diameter\Huawei.xml" +File "${STAGING_DIR}\diameter\Inovar.xml" +File "${STAGING_DIR}\diameter\Juniper.xml" +File "${STAGING_DIR}\diameter\Metaswitch.xml" +File "${STAGING_DIR}\diameter\Microsoft.xml" +File "${STAGING_DIR}\diameter\mobileipv4.xml" +File "${STAGING_DIR}\diameter\mobileipv6.xml" +File "${STAGING_DIR}\diameter\nasreq.xml" +File "${STAGING_DIR}\diameter\Nokia.xml" +File "${STAGING_DIR}\diameter\NokiaSolutionsAndNetworks.xml" +File "${STAGING_DIR}\diameter\Oracle.xml" +File "${STAGING_DIR}\diameter\Siemens.xml" +File "${STAGING_DIR}\diameter\sip.xml" +File "${STAGING_DIR}\diameter\Starent.xml" +File "${STAGING_DIR}\diameter\sunping.xml" +File "${STAGING_DIR}\diameter\Telefonica.xml" +File "${STAGING_DIR}\diameter\TGPP.xml" +File "${STAGING_DIR}\diameter\TGPP2.xml" +File "${STAGING_DIR}\diameter\Vodafone.xml" +File "${STAGING_DIR}\diameter\VerizonWireless.xml" +!include "custom_diameter_xmls.txt" +SetOutPath $INSTDIR + +; +; Install the RADIUS directory files in the "radius" subdirectory +; of the installation directory. +; +SetOutPath $INSTDIR\radius +File "${STAGING_DIR}\radius\README.radius_dictionary" +File "${STAGING_DIR}\radius\custom.includes" +File "${STAGING_DIR}\radius\dictionary" +File "${STAGING_DIR}\radius\dictionary.3com" +File "${STAGING_DIR}\radius\dictionary.3gpp" +File "${STAGING_DIR}\radius\dictionary.3gpp2" +File "${STAGING_DIR}\radius\dictionary.acc" +File "${STAGING_DIR}\radius\dictionary.acme" +File "${STAGING_DIR}\radius\dictionary.actelis" +File "${STAGING_DIR}\radius\dictionary.aerohive" +File "${STAGING_DIR}\radius\dictionary.airespace" +File "${STAGING_DIR}\radius\dictionary.alcatel" +File "${STAGING_DIR}\radius\dictionary.alcatel-lucent.aaa" +File "${STAGING_DIR}\radius\dictionary.alcatel.esam" +File "${STAGING_DIR}\radius\dictionary.alcatel.sr" +File "${STAGING_DIR}\radius\dictionary.alteon" +File "${STAGING_DIR}\radius\dictionary.altiga" +File "${STAGING_DIR}\radius\dictionary.alvarion" +File "${STAGING_DIR}\radius\dictionary.alvarion.wimax.v2_2" +File "${STAGING_DIR}\radius\dictionary.apc" +File "${STAGING_DIR}\radius\dictionary.aptilo" +File "${STAGING_DIR}\radius\dictionary.aptis" +File "${STAGING_DIR}\radius\dictionary.arbor" +File "${STAGING_DIR}\radius\dictionary.aruba" +File "${STAGING_DIR}\radius\dictionary.ascend" +File "${STAGING_DIR}\radius\dictionary.asn" +File "${STAGING_DIR}\radius\dictionary.audiocodes" +File "${STAGING_DIR}\radius\dictionary.avaya" +File "${STAGING_DIR}\radius\dictionary.azaire" +File "${STAGING_DIR}\radius\dictionary.bay" +File "${STAGING_DIR}\radius\dictionary.bintec" +File "${STAGING_DIR}\radius\dictionary.bluecoat" +File "${STAGING_DIR}\radius\dictionary.bristol" +File "${STAGING_DIR}\radius\dictionary.broadsoft" +File "${STAGING_DIR}\radius\dictionary.brocade" +File "${STAGING_DIR}\radius\dictionary.bskyb" +File "${STAGING_DIR}\radius\dictionary.bt" +File "${STAGING_DIR}\radius\dictionary.cablelabs" +File "${STAGING_DIR}\radius\dictionary.cabletron" +File "${STAGING_DIR}\radius\dictionary.camiant" +File "${STAGING_DIR}\radius\dictionary.chillispot" +File "${STAGING_DIR}\radius\dictionary.cisco" +File "${STAGING_DIR}\radius\dictionary.cisco.asa" +File "${STAGING_DIR}\radius\dictionary.cisco.bbsm" +File "${STAGING_DIR}\radius\dictionary.cisco.vpn3000" +File "${STAGING_DIR}\radius\dictionary.cisco.vpn5000" +File "${STAGING_DIR}\radius\dictionary.citrix" +File "${STAGING_DIR}\radius\dictionary.clavister" +File "${STAGING_DIR}\radius\dictionary.cnergee" +File "${STAGING_DIR}\radius\dictionary.colubris" +File "${STAGING_DIR}\radius\dictionary.columbia_university" +File "${STAGING_DIR}\radius\dictionary.compat" +File "${STAGING_DIR}\radius\dictionary.compatible" +File "${STAGING_DIR}\radius\dictionary.cosine" +File "${STAGING_DIR}\radius\dictionary.dante" +File "${STAGING_DIR}\radius\dictionary.dellemc" +File "${STAGING_DIR}\radius\dictionary.dhcp" +File "${STAGING_DIR}\radius\dictionary.digium" +File "${STAGING_DIR}\radius\dictionary.dlink" +File "${STAGING_DIR}\radius\dictionary.dragonwave" +File "${STAGING_DIR}\radius\dictionary.efficientip" +File "${STAGING_DIR}\radius\dictionary.eltex" +File "${STAGING_DIR}\radius\dictionary.enterasys" +File "${STAGING_DIR}\radius\dictionary.epygi" +File "${STAGING_DIR}\radius\dictionary.equallogic" +File "${STAGING_DIR}\radius\dictionary.ericsson" +File "${STAGING_DIR}\radius\dictionary.ericsson.ab" +File "${STAGING_DIR}\radius\dictionary.ericsson.packet.core.networks" +File "${STAGING_DIR}\radius\dictionary.extreme" +File "${STAGING_DIR}\radius\dictionary.f5" +File "${STAGING_DIR}\radius\dictionary.fdxtended" +File "${STAGING_DIR}\radius\dictionary.fortinet" +File "${STAGING_DIR}\radius\dictionary.foundry" +File "${STAGING_DIR}\radius\dictionary.freedhcp" +File "${STAGING_DIR}\radius\dictionary.freeradius" +File "${STAGING_DIR}\radius\dictionary.freeradius.internal" +File "${STAGING_DIR}\radius\dictionary.freeswitch" +File "${STAGING_DIR}\radius\dictionary.gandalf" +File "${STAGING_DIR}\radius\dictionary.garderos" +File "${STAGING_DIR}\radius\dictionary.gemtek" +File "${STAGING_DIR}\radius\dictionary.h3c" +File "${STAGING_DIR}\radius\dictionary.hp" +File "${STAGING_DIR}\radius\dictionary.huawei" +File "${STAGING_DIR}\radius\dictionary.iana" +File "${STAGING_DIR}\radius\dictionary.identity_engines" +File "${STAGING_DIR}\radius\dictionary.iea" +File "${STAGING_DIR}\radius\dictionary.infoblox" +File "${STAGING_DIR}\radius\dictionary.infonet" +File "${STAGING_DIR}\radius\dictionary.ipunplugged" +File "${STAGING_DIR}\radius\dictionary.issanni" +File "${STAGING_DIR}\radius\dictionary.itk" +File "${STAGING_DIR}\radius\dictionary.jradius" +File "${STAGING_DIR}\radius\dictionary.juniper" +File "${STAGING_DIR}\radius\dictionary.karlnet" +File "${STAGING_DIR}\radius\dictionary.kineto" +File "${STAGING_DIR}\radius\dictionary.lancom" +File "${STAGING_DIR}\radius\dictionary.livingston" +File "${STAGING_DIR}\radius\dictionary.localweb" +File "${STAGING_DIR}\radius\dictionary.lucent" +File "${STAGING_DIR}\radius\dictionary.manzara" +File "${STAGING_DIR}\radius\dictionary.meinberg" +File "${STAGING_DIR}\radius\dictionary.meraki" +File "${STAGING_DIR}\radius\dictionary.merit" +File "${STAGING_DIR}\radius\dictionary.meru" +File "${STAGING_DIR}\radius\dictionary.microsemi" +File "${STAGING_DIR}\radius\dictionary.microsoft" +File "${STAGING_DIR}\radius\dictionary.mikrotik" +File "${STAGING_DIR}\radius\dictionary.motorola" +File "${STAGING_DIR}\radius\dictionary.motorola.wimax" +File "${STAGING_DIR}\radius\dictionary.navini" +File "${STAGING_DIR}\radius\dictionary.netscreen" +File "${STAGING_DIR}\radius\dictionary.networkphysics" +File "${STAGING_DIR}\radius\dictionary.nexans" +File "${STAGING_DIR}\radius\dictionary.nokia" +File "${STAGING_DIR}\radius\dictionary.nokia.conflict" +File "${STAGING_DIR}\radius\dictionary.nomadix" +File "${STAGING_DIR}\radius\dictionary.nortel" +File "${STAGING_DIR}\radius\dictionary.ntua" +File "${STAGING_DIR}\radius\dictionary.openser" +File "${STAGING_DIR}\radius\dictionary.packeteer" +File "${STAGING_DIR}\radius\dictionary.paloalto" +File "${STAGING_DIR}\radius\dictionary.patton" +File "${STAGING_DIR}\radius\dictionary.perle" +File "${STAGING_DIR}\radius\dictionary.propel" +File "${STAGING_DIR}\radius\dictionary.prosoft" +File "${STAGING_DIR}\radius\dictionary.proxim" +File "${STAGING_DIR}\radius\dictionary.purewave" +File "${STAGING_DIR}\radius\dictionary.quiconnect" +File "${STAGING_DIR}\radius\dictionary.quintum" +File "${STAGING_DIR}\radius\dictionary.redcreek" +File "${STAGING_DIR}\radius\dictionary.rfc2865" +File "${STAGING_DIR}\radius\dictionary.rfc2866" +File "${STAGING_DIR}\radius\dictionary.rfc2867" +File "${STAGING_DIR}\radius\dictionary.rfc2868" +File "${STAGING_DIR}\radius\dictionary.rfc2869" +File "${STAGING_DIR}\radius\dictionary.rfc3162" +File "${STAGING_DIR}\radius\dictionary.rfc3576" +File "${STAGING_DIR}\radius\dictionary.rfc3580" +File "${STAGING_DIR}\radius\dictionary.rfc4072" +File "${STAGING_DIR}\radius\dictionary.rfc4372" +File "${STAGING_DIR}\radius\dictionary.rfc4603" +File "${STAGING_DIR}\radius\dictionary.rfc4675" +File "${STAGING_DIR}\radius\dictionary.rfc4679" +File "${STAGING_DIR}\radius\dictionary.rfc4818" +File "${STAGING_DIR}\radius\dictionary.rfc4849" +File "${STAGING_DIR}\radius\dictionary.rfc5090" +File "${STAGING_DIR}\radius\dictionary.rfc5176" +File "${STAGING_DIR}\radius\dictionary.rfc5447" +File "${STAGING_DIR}\radius\dictionary.rfc5580" +File "${STAGING_DIR}\radius\dictionary.rfc5607" +File "${STAGING_DIR}\radius\dictionary.rfc5904" +File "${STAGING_DIR}\radius\dictionary.rfc6519" +File "${STAGING_DIR}\radius\dictionary.rfc6572" +File "${STAGING_DIR}\radius\dictionary.rfc6677" +File "${STAGING_DIR}\radius\dictionary.rfc6911" +File "${STAGING_DIR}\radius\dictionary.rfc6929" +File "${STAGING_DIR}\radius\dictionary.rfc6930" +File "${STAGING_DIR}\radius\dictionary.rfc7055" +File "${STAGING_DIR}\radius\dictionary.rfc7155" +File "${STAGING_DIR}\radius\dictionary.rfc7268" +File "${STAGING_DIR}\radius\dictionary.rfc7499" +File "${STAGING_DIR}\radius\dictionary.rfc7930" +File "${STAGING_DIR}\radius\dictionary.riverbed" +File "${STAGING_DIR}\radius\dictionary.riverstone" +File "${STAGING_DIR}\radius\dictionary.roaringpenguin" +File "${STAGING_DIR}\radius\dictionary.ruckus" +File "${STAGING_DIR}\radius\dictionary.ruggedcom" +File "${STAGING_DIR}\radius\dictionary.sangoma" +File "${STAGING_DIR}\radius\dictionary.sg" +File "${STAGING_DIR}\radius\dictionary.shasta" +File "${STAGING_DIR}\radius\dictionary.shiva" +File "${STAGING_DIR}\radius\dictionary.siemens" +File "${STAGING_DIR}\radius\dictionary.slipstream" +File "${STAGING_DIR}\radius\dictionary.sofaware" +File "${STAGING_DIR}\radius\dictionary.sonicwall" +File "${STAGING_DIR}\radius\dictionary.springtide" +File "${STAGING_DIR}\radius\dictionary.starent" +File "${STAGING_DIR}\radius\dictionary.starent.vsa1" +File "${STAGING_DIR}\radius\dictionary.surfnet" +File "${STAGING_DIR}\radius\dictionary.symbol" +File "${STAGING_DIR}\radius\dictionary.t_systems_nova" +File "${STAGING_DIR}\radius\dictionary.telebit" +File "${STAGING_DIR}\radius\dictionary.telkom" +File "${STAGING_DIR}\radius\dictionary.terena" +File "${STAGING_DIR}\radius\dictionary.trapeze" +File "${STAGING_DIR}\radius\dictionary.travelping" +File "${STAGING_DIR}\radius\dictionary.tropos" +File "${STAGING_DIR}\radius\dictionary.ukerna" +File "${STAGING_DIR}\radius\dictionary.unisphere" +File "${STAGING_DIR}\radius\dictionary.unix" +File "${STAGING_DIR}\radius\dictionary.usr" +File "${STAGING_DIR}\radius\dictionary.utstarcom" +File "${STAGING_DIR}\radius\dictionary.valemount" +File "${STAGING_DIR}\radius\dictionary.versanet" +File "${STAGING_DIR}\radius\dictionary.verizon" +File "${STAGING_DIR}\radius\dictionary.vqp" +File "${STAGING_DIR}\radius\dictionary.walabi" +File "${STAGING_DIR}\radius\dictionary.waverider" +File "${STAGING_DIR}\radius\dictionary.wichorus" +File "${STAGING_DIR}\radius\dictionary.wimax" +File "${STAGING_DIR}\radius\dictionary.wimax.alvarion" +File "${STAGING_DIR}\radius\dictionary.wimax.wichorus" +File "${STAGING_DIR}\radius\dictionary.wispr" +File "${STAGING_DIR}\radius\dictionary.xedia" +File "${STAGING_DIR}\radius\dictionary.xylan" +File "${STAGING_DIR}\radius\dictionary.yubico" +File "${STAGING_DIR}\radius\dictionary.zeus" +File "${STAGING_DIR}\radius\dictionary.zte" +File "${STAGING_DIR}\radius\dictionary.zyxel" +!include "custom_radius_dict.txt" +SetOutPath $INSTDIR + +; +; install the dtds in the dtds subdirectory +; +SetOutPath $INSTDIR\dtds +File "${STAGING_DIR}\dtds\dc.dtd" +File "${STAGING_DIR}\dtds\itunes.dtd" +File "${STAGING_DIR}\dtds\mscml.dtd" +File "${STAGING_DIR}\dtds\pocsettings.dtd" +File "${STAGING_DIR}\dtds\presence.dtd" +File "${STAGING_DIR}\dtds\reginfo.dtd" +File "${STAGING_DIR}\dtds\rlmi.dtd" +File "${STAGING_DIR}\dtds\rss.dtd" +File "${STAGING_DIR}\dtds\smil.dtd" +File "${STAGING_DIR}\dtds\xcap-caps.dtd" +File "${STAGING_DIR}\dtds\xcap-error.dtd" +File "${STAGING_DIR}\dtds\watcherinfo.dtd" +SetOutPath $INSTDIR + +; Create the extcap directory +CreateDirectory $INSTDIR\extcap + +; +; install the protobuf .proto definitions in the protobuf subdirectory +; +SetOutPath $INSTDIR\protobuf +File "${STAGING_DIR}\protobuf\*.proto" + +; Install the TPNCP DAT file in the "tpncp" subdirectory +; of the installation directory. +SetOutPath $INSTDIR\tpncp +File "${STAGING_DIR}\tpncp\tpncp.dat" + +; Write the uninstall keys for Windows +; https://nsis.sourceforge.io/Add_uninstall_information_to_Add/Remove_Programs +; https://docs.microsoft.com/en-us/previous-versions/ms954376(v=msdn.10) +; https://docs.microsoft.com/en-us/windows/win32/msi/uninstall-registry-key +!define UNINSTALL_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}" + +WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "Comments" "${DISPLAY_NAME}" +!ifdef QT_DIR +WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "DisplayIcon" "$INSTDIR\${PROGRAM_NAME_PATH},0" +!endif +WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "DisplayName" "${DISPLAY_NAME}" +WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "DisplayVersion" "${VERSION}" +WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "HelpLink" "https://ask.wireshark.org/" +WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "InstallLocation" "$INSTDIR" +WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "Publisher" "The Logwolf developer community, https://www.wireshark.org" +WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "URLInfoAbout" "https://www.wireshark.org" +WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "URLUpdateInfo" "https://www.wireshark.org/download.html" + +WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "NoModify" 1 +WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "NoRepair" 1 +WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "VersionMajor" ${VERSION_MAJOR} +WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "VersionMinor" ${VERSION_MINOR} + +WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "UninstallString" '"$INSTDIR\${UNINSTALLER_NAME}"' +WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "QuietUninstallString" '"$INSTDIR\${UNINSTALLER_NAME}" /S' + +; To quote https://web.archive.org/web/20150911221413/http://download.microsoft.com/download/0/4/6/046bbd36-0812-4c22-a870-41911c6487a6/WindowsUserExperience.pdf: +; "Do not include Readme, Help, or Uninstall entries on the Programs menu." +Delete "$SMPROGRAMS\${PROGRAM_NAME}\Wireshark Web Site.lnk" + +; Create file extensions if the Associated Tasks page check box +; is checked. +${If} $FILE_ASSOCIATE_STATE == ${BST_CHECKED} +WriteRegStr HKCR ${LOGWOLF_ASSOC} "" "Logwolf log file" +WriteRegStr HKCR "${LOGWOLF_ASSOC}\Shell\open\command" "" '"$INSTDIR\${PROGRAM_NAME_PATH}" "%1"' +WriteRegStr HKCR "${LOGWOLF_ASSOC}\DefaultIcon" "" '"$INSTDIR\${PROGRAM_NAME_PATH}",1' +; We refresh the icon cache down in -Finally. +Call Associate +; If you add something here be sure to sync it with the uninstall section and the +; AdditionalTasks page +${Endif} + +SectionEnd ; "Required" + +!ifdef QT_DIR +Section "${PROGRAM_NAME}" SecLogwolfQt +;------------------------------------------- +; by default, Logwolf.exe is installed +SetOutPath $INSTDIR +File "${QT_DIR}\${PROGRAM_NAME_PATH}" +; Write an entry for ShellExecute +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME_PATH}" "" '$INSTDIR\${PROGRAM_NAME_PATH}' +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME_PATH}" "Path" '$INSTDIR' +!include logwolf-qt-manifest.nsh + +${!defineifexist} TRANSLATIONS_FOLDER "${QT_DIR}\translations" +SetOutPath $INSTDIR +!ifdef TRANSLATIONS_FOLDER + ; Starting from Qt 5.5, *.qm files are put in a translations subfolder + File /r "${QT_DIR}\translations" +!else + File "${QT_DIR}\*.qm" +!endif + +; Is the Start Menu check box checked? +${If} $START_MENU_STATE == ${BST_CHECKED} + CreateShortCut "$SMPROGRAMS\${PROGRAM_NAME}.lnk" "$INSTDIR\${PROGRAM_NAME_PATH}" "" "$INSTDIR\${PROGRAM_NAME_PATH}" 0 "" "" "${PROGRAM_FULL_NAME}" +${Endif} + +${If} $DESKTOP_ICON_STATE == ${BST_CHECKED} + CreateShortCut "$DESKTOP\${PROGRAM_NAME}.lnk" "$INSTDIR\${PROGRAM_NAME_PATH}" "" "$INSTDIR\${PROGRAM_NAME_PATH}" 0 "" "" "${PROGRAM_FULL_NAME}" +${Endif} + +${If} $QUICK_LAUNCH_STATE == ${BST_CHECKED} + CreateShortCut "$QUICKLAUNCH\${PROGRAM_NAME}.lnk" "$INSTDIR\${PROGRAM_NAME_PATH}" "" "$INSTDIR\${PROGRAM_NAME_PATH}" 0 "" "" "${PROGRAM_FULL_NAME}" +${Endif} + +SectionEnd ; "SecLogwolfQt" +!endif + + +Section "TShark" SecTShark +;------------------------------------------- +SetOutPath $INSTDIR +File "${STAGING_DIR}\tshark.exe" +File "${STAGING_DIR}\tshark.html" +SectionEnd + +SectionGroup "Plugins & Extensions" SecPluginsGroup + +Section "Dissector Plugins" SecPlugins +;------------------------------------------- +SetOutPath '$INSTDIR\plugins\${VERSION_MAJOR}.${VERSION_MINOR}\epan' +File "${STAGING_DIR}\plugins\${VERSION_MAJOR}.${VERSION_MINOR}\epan\falco-bridge.dll" +SetOutPath '$INSTDIR\plugins\${VERSION_MAJOR}.${VERSION_MINOR}\falco' +File "${STAGING_DIR}\plugins\${VERSION_MAJOR}.${VERSION_MINOR}\falco\cloudtrail.dll" +!include "custom_plugins.txt" +SectionEnd + +Section "Tree Statistics Plugin" SecStatsTree +;------------------------------------------- +SetOutPath '$INSTDIR\plugins\${VERSION_MAJOR}.${VERSION_MINOR}\epan' +File "${STAGING_DIR}\plugins\${VERSION_MAJOR}.${VERSION_MINOR}\epan\stats_tree.dll" +SectionEnd + +Section "Mate - Meta Analysis and Tracing Engine" SecMate +;------------------------------------------- +SetOutPath '$INSTDIR\plugins\${VERSION_MAJOR}.${VERSION_MINOR}\epan' +File "${STAGING_DIR}\plugins\${VERSION_MAJOR}.${VERSION_MINOR}\epan\mate.dll" +SectionEnd + +Section "Configuration Profiles" SecProfiles +;------------------------------------------- +; This should be a function or macro +SetOutPath '$INSTDIR\profiles\Bluetooth' +File "${STAGING_DIR}\profiles\Bluetooth\colorfilters" +File "${STAGING_DIR}\profiles\Bluetooth\preferences" +SetOutPath '$INSTDIR\profiles\Classic' +File "${STAGING_DIR}\profiles\Classic\colorfilters" +SetOutPath '$INSTDIR\profiles\No Reassembly' +File "${STAGING_DIR}\profiles\No Reassembly\preferences" +SectionEnd + +!ifdef SMI_DIR +Section "SNMP MIBs" SecMIBs +;------------------------------------------- +SetOutPath '$INSTDIR\snmp\mibs' +File "${SMI_DIR}\share\mibs\iana\*" +File "${SMI_DIR}\share\mibs\ietf\*" +File "${SMI_DIR}\share\mibs\irtf\*" +File "${SMI_DIR}\share\mibs\tubs\*" +File "${SMI_DIR}\share\pibs\*" +File "${SMI_DIR}\share\yang\*.yang" +!include "custom_mibs.txt" +SectionEnd +!endif + +SectionGroupEnd ; "Plugins / Extensions" + + +SectionGroup "Tools" SecToolsGroup + +Section "Editcap" SecEditcap +;------------------------------------------- +SetOutPath $INSTDIR +File "${STAGING_DIR}\editcap.exe" +File "${STAGING_DIR}\editcap.html" +SectionEnd + +Section "Text2Pcap" SecText2Pcap +;------------------------------------------- +SetOutPath $INSTDIR +File "${STAGING_DIR}\text2pcap.exe" +File "${STAGING_DIR}\text2pcap.html" +SectionEnd + +Section "Mergecap" SecMergecap +;------------------------------------------- +SetOutPath $INSTDIR +File "${STAGING_DIR}\mergecap.exe" +File "${STAGING_DIR}\mergecap.html" +SectionEnd + +Section "Reordercap" SecReordercap +;------------------------------------------- +SetOutPath $INSTDIR +File "${STAGING_DIR}\reordercap.exe" +File "${STAGING_DIR}\reordercap.html" +SectionEnd + +Section "DFTest" SecDFTest +;------------------------------------------- +SetOutPath $INSTDIR +File "${STAGING_DIR}\dftest.exe" +File "${STAGING_DIR}\dftest.html" +SectionEnd + +Section "Capinfos" SecCapinfos +;------------------------------------------- +SetOutPath $INSTDIR +File "${STAGING_DIR}\capinfos.exe" +File "${STAGING_DIR}\capinfos.html" +SectionEnd + +Section "Captype" SecCaptype +;------------------------------------------- +SetOutPath $INSTDIR +File "${STAGING_DIR}\captype.exe" +File "${STAGING_DIR}\captype.html" +SectionEnd + +Section /o "Randpkt" SecRandpkt +;------------------------------------------- +SetOutPath $INSTDIR +File "${STAGING_DIR}\randpkt.exe" +File "${STAGING_DIR}\randpkt.html" +SectionEnd + +!ifdef MMDBRESOLVE_EXE +Section "MMDBResolve" SecMMDBResolve +;------------------------------------------- +SetOutPath $INSTDIR +File "${STAGING_DIR}\mmdbresolve.html" +SetOutPath $INSTDIR +File "${STAGING_DIR}\mmdbresolve.exe" +SectionEnd +!endif + +Section /o "Etwdump" SecEtwdump +;------------------------------------------- + !insertmacro InstallExtcap "Etwdump" +SectionEnd +!insertmacro CheckExtrasFlag "Etwdump" + +SectionGroupEnd ; "Tools" + +!ifdef DOCBOOK_DIR +Section "Documentation" SecDocumentation +;------------------------------------------- +SetOutPath "$INSTDIR\Wireshark User's Guide" +File /r "${DOCBOOK_DIR}\wsug_html_chunked\*.*" + +SetOutPath $INSTDIR +File "${DOCBOOK_DIR}\faq.html" +SectionEnd +!endif + +Section "-Finally" + +!insertmacro UpdateIcons + +; Compute and write the installation directory size +${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2 +IntFmt $0 "0x%08X" $0 +WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "EstimatedSize" "$0" + +SectionEnd + +; ============================================================================ +; PLEASE MAKE SURE, THAT THE DESCRIPTIVE TEXT FITS INTO THE DESCRIPTION FIELD! +; ============================================================================ +!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN +!ifdef QT_DIR + !insertmacro MUI_DESCRIPTION_TEXT ${SecLogwolfQt} "The main network protocol analyzer application." +!endif + !insertmacro MUI_DESCRIPTION_TEXT ${SecTShark} "Text based network protocol analyzer." + + !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsGroup} "Plugins and extensions for both ${PROGRAM_NAME} and TShark." + !insertmacro MUI_DESCRIPTION_TEXT ${SecPlugins} "Additional protocol dissectors." + !insertmacro MUI_DESCRIPTION_TEXT ${SecStatsTree} "Extended statistics." + !insertmacro MUI_DESCRIPTION_TEXT ${SecMate} "Plugin - Meta Analysis and Tracing Engine (Experimental)." + !insertmacro MUI_DESCRIPTION_TEXT ${SecProfiles} "Configuration profiles" + +!ifdef SMI_DIR + !insertmacro MUI_DESCRIPTION_TEXT ${SecMIBs} "SNMP MIBs for better SNMP dissection." +!endif + + !insertmacro MUI_DESCRIPTION_TEXT ${SecToolsGroup} "Additional command line based tools." + !insertmacro MUI_DESCRIPTION_TEXT ${SecEtwdump} "Provide ETW reader" + !insertmacro MUI_DESCRIPTION_TEXT ${SecEditCap} "Copy packets to a new file, optionally trimming packets, omitting them, or saving to a different format." + !insertmacro MUI_DESCRIPTION_TEXT ${SecText2Pcap} "Read an ASCII hex dump and write the data into a libpcap-style capture file." + !insertmacro MUI_DESCRIPTION_TEXT ${SecMergecap} "Combine multiple saved capture files into a single output file" + !insertmacro MUI_DESCRIPTION_TEXT ${SecReordercap} "Copy packets to a new file, sorted by time." + !insertmacro MUI_DESCRIPTION_TEXT ${SecDFTest} "Shows display filter byte-code, for debugging dfilter routines" + !insertmacro MUI_DESCRIPTION_TEXT ${SecCapinfos} "Print information about capture files." + !insertmacro MUI_DESCRIPTION_TEXT ${SecCaptype} "Print the types capture files." + !insertmacro MUI_DESCRIPTION_TEXT ${SecRandpkt} "Random packet generator." + !insertmacro MUI_DESCRIPTION_TEXT ${SecMMDBResolve} "MaxMind Database resolution tool" + +!ifdef DOCBOOK_DIR + !insertmacro MUI_DESCRIPTION_TEXT ${SecDocumentation} "Install an offline copy of the User's Guide and FAQ." +!endif +!insertmacro MUI_FUNCTION_DESCRIPTION_END + +; ============================================================================ +; Callback functions +; ============================================================================ +!ifdef QT_DIR + +Var QT_SELECTED + +; Called from fnc_AdditionalTasksPage_Create via DisplayAdditionalTasksPage. +Function InitAdditionalTasksPage + ; We've created the Additional tasks page. Update our control states + ; before they are shown. + ; We set XXX_STATE -> XxxCheckBox here and go the other direction below. + ${NSD_SetState} $hCtl_AdditionalTasksPage_StartMenuCheckBox $START_MENU_STATE + ${NSD_SetState} $hCtl_AdditionalTasksPage_DesktopIconCheckBox $DESKTOP_ICON_STATE + ${NSD_SetState} $hCtl_AdditionalTasksPage_QuickLaunchCheckBox $QUICK_LAUNCH_STATE + ${NSD_SetState} $hCtl_AdditionalTasksPage_AssociateExtensionsCheckBox $FILE_ASSOCIATE_STATE + + StrCpy $QT_SELECTED 0 + ${If} ${SectionIsSelected} ${SecLogwolfQt} + StrCpy $QT_SELECTED 1 + ${Endif} + EnableWindow $hCtl_AdditionalTasksPage_CreateShortcutsLabel $QT_SELECTED + EnableWindow $hCtl_AdditionalTasksPage_StartMenuCheckBox $QT_SELECTED + EnableWindow $hCtl_AdditionalTasksPage_DesktopIconCheckBox $QT_SELECTED + EnableWindow $hCtl_AdditionalTasksPage_QuickLaunchCheckBox $QT_SELECTED + + EnableWindow $hCtl_AdditionalTasksPage_ExtensionsLabel $QT_SELECTED + EnableWindow $hCtl_AdditionalTasksPage_AssociateExtensionsCheckBox $QT_SELECTED + EnableWindow $hCtl_AdditionalTasksPage_FileExtensionsLabel $QT_SELECTED +FunctionEnd + +Function LeaveAdditionalTasksPage + ; We're leaving the Additional tasks page. Get our control states + ; before they're destroyed. + ; We set XxxCheckBox -> XXX_STATE here and go the other direction above. + ${NSD_GetState} $hCtl_AdditionalTasksPage_StartMenuCheckBox $START_MENU_STATE + ${NSD_GetState} $hCtl_AdditionalTasksPage_DesktopIconCheckBox $DESKTOP_ICON_STATE + ${NSD_GetState} $hCtl_AdditionalTasksPage_QuickLaunchCheckBox $QUICK_LAUNCH_STATE + ${NSD_GetState} $hCtl_AdditionalTasksPage_AssociateExtensionsCheckBox $FILE_ASSOCIATE_STATE +FunctionEnd + +!endif ; QT_DIR diff --git a/packaging/nsis/uninstall-logwolf.nsi b/packaging/nsis/uninstall-logwolf.nsi new file mode 100644 index 0000000000..6069da57c1 --- /dev/null +++ b/packaging/nsis/uninstall-logwolf.nsi @@ -0,0 +1,268 @@ +; +; uninstall-logwolf.nsi +; + +; Create an installer that only writes an uninstaller. +; https://nsis.sourceforge.io/Signing_an_Uninstaller + +!include "logwolf-common.nsh" +!include 'LogicLib.nsh' +!include x64.nsh +!include "StrFunc.nsh" + +SetCompress off +OutFile "${STAGING_DIR}\uninstall_logwolf_installer.exe" + +; InstType "un.Default (keep Personal Settings and Npcap)" +InstType "un.All (remove all)" + +; Uninstaller icon +UninstallIcon "..\..\resources\icons\wiresharkinst.ico" + +!include "MUI.nsh" + +!define MUI_UNICON "..\..\resources\icons\wiresharkinst.ico" + +; Uninstall stuff (NSIS 2.08: "\r\n" don't work here) +!define MUI_UNCONFIRMPAGE_TEXT_TOP "The following ${PROGRAM_NAME} installation will be removed. Click 'Next' to continue." +; Uninstall stuff (this text isn't used with the MODERN_UI!) +;UninstallText "This will uninstall ${PROGRAM_NAME}.\r\nBefore starting the uninstallation, make sure ${PROGRAM_NAME} is not running.\r\nClick 'Next' to continue." + +!define MUI_UNFINISHPAGE_NOAUTOCLOSE +!define MUI_WELCOMEPAGE_TITLE_3LINES +!define MUI_FINISHPAGE_TITLE_3LINES + +!insertmacro MUI_UNPAGE_WELCOME +!insertmacro MUI_UNPAGE_CONFIRM +!insertmacro MUI_UNPAGE_COMPONENTS +!insertmacro MUI_UNPAGE_INSTFILES +!insertmacro MUI_UNPAGE_FINISH + +!insertmacro MUI_LANGUAGE "English" + +; ============================================================================ +; Section macros +; ============================================================================ +!include "Sections.nsh" + +; ============================================================================ +; Uninstall page configuration +; ============================================================================ +ShowUninstDetails show + +; ============================================================================ +; Functions and macros +; ============================================================================ + +Function .onInit + ; MUST be the absolute path to our staging directory. + WriteUninstaller "${STAGING_DIR}\${UNINSTALLER_NAME}" + SetErrorLevel 0 + Quit +FunctionEnd + +Var EXTENSION +Function un.Disassociate + Push $R0 +!insertmacro PushFileExtensions + + Pop $EXTENSION + ${DoUntil} $EXTENSION == ${FILE_EXTENSION_MARKER} + ReadRegStr $R0 HKCR $EXTENSION "" + StrCmp $R0 ${LOGWOLF_ASSOC} un.Disassociate.doDeregister + Goto un.Disassociate.end +un.Disassociate.doDeregister: + ; The extension is associated with Logwolf so, we must destroy this! + DeleteRegKey HKCR $EXTENSION + DetailPrint "Deregistered file type: $EXTENSION" +un.Disassociate.end: + Pop $EXTENSION + ${Loop} + + Pop $R0 +FunctionEnd + +Section "-Required" +SectionEnd + +!define EXECUTABLE_MARKER "EXECUTABLE_MARKER" +Var EXECUTABLE + +Section "Uninstall" un.SecUinstall +;------------------------------------------- +; +; UnInstall for every user +; +SectionIn 1 2 +SetShellVarContext all + +!insertmacro IsLogwolfRunning + +Push "${EXECUTABLE_MARKER}" +Push "${PROGRAM_NAME}" +Push "capinfos" +Push "captype" +Push "dftest" +Push "dumpcap" +Push "editcap" +Push "mergecap" +Push "reordercap" +Push "text2pcap" + +!ifdef MMDBRESOLVE_EXE +Push "mmdbresolve" +!endif + +Pop $EXECUTABLE +${DoUntil} $EXECUTABLE == ${EXECUTABLE_MARKER} + + ; IsLogwolfRunning should make sure everything is closed down so we *shouldn't* run + ; into any problems here. + Delete "$INSTDIR\$EXECUTABLE.exe" + IfErrors 0 deletionSuccess + MessageBox MB_OK "$EXECUTABLE.exe could not be removed. Is it in use?" /SD IDOK IDOK 0 + Abort "$EXECUTABLE.exe could not be removed. Aborting the uninstall process." + +deletionSuccess: + Pop $EXECUTABLE + +${Loop} + + +DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}" +DeleteRegKey HKEY_LOCAL_MACHINE "Software\${PROGRAM_NAME}" +DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME}.exe" + +Call un.Disassociate + +DeleteRegKey HKCR ${LOGWOLF_ASSOC} +DeleteRegKey HKCR "${LOGWOLF_ASSOC}\Shell\open\command" +DeleteRegKey HKCR "${LOGWOLF_ASSOC}\DefaultIcon" + +Delete "$INSTDIR\*.dll" +Delete "$INSTDIR\*.exe" +Delete "$INSTDIR\*.html" +Delete "$INSTDIR\*.qm" +Delete "$INSTDIR\accessible\*.*" +Delete "$INSTDIR\AUTHORS-SHORT" +Delete "$INSTDIR\COPYING*" +Delete "$INSTDIR\audio\*.*" +Delete "$INSTDIR\bearer\*.*" +Delete "$INSTDIR\diameter\*.*" +Delete "$INSTDIR\help\*.*" +Delete "$INSTDIR\iconengines\*.*" +Delete "$INSTDIR\imageformats\*.*" +Delete "$INSTDIR\mediaservice\*.*" +Delete "$INSTDIR\platforms\*.*" +Delete "$INSTDIR\playlistformats\*.*" +Delete "$INSTDIR\printsupport\*.*" +Delete "$INSTDIR\share\glib-2.0\schemas\*.*" +Delete "$INSTDIR\snmp\*.*" +Delete "$INSTDIR\snmp\mibs\*.*" +Delete "$INSTDIR\styles\translations\*.*" +Delete "$INSTDIR\styles\*.*" +Delete "$INSTDIR\protobuf\*.*" +Delete "$INSTDIR\tpncp\*.*" +Delete "$INSTDIR\translations\*.*" +Delete "$INSTDIR\ui\*.*" +Delete "$INSTDIR\wimaxasncp\*.*" +Delete "$INSTDIR\ws.css" +Delete "$INSTDIR\README*" +Delete "$INSTDIR\NEWS.txt" +Delete "$INSTDIR\manuf" +Delete "$INSTDIR\wka" +Delete "$INSTDIR\services" +Delete "$INSTDIR\pdml2html.xsl" +Delete "$INSTDIR\pcrepattern.3.txt" +Delete "$INSTDIR\example_snmp_users_file" +Delete "$INSTDIR\ipmap.html" +Delete "$INSTDIR\radius\*.*" +Delete "$INSTDIR\dtds\*.*" + +RMDir "$INSTDIR\accessible" +RMDir "$INSTDIR\audio" +RMDir "$INSTDIR\bearer" +RMDir "$INSTDIR\extcap" +RMDir "$INSTDIR\iconengines" +RMDir "$INSTDIR\imageformats" +RMDir "$INSTDIR\mediaservice" +RMDir "$INSTDIR\platforms" +RMDir "$INSTDIR\playlistformats" +RMDir "$INSTDIR\printsupport" +RMDir "$INSTDIR\styles\translations" +RMDir "$INSTDIR\styles" +RMDir "$SMPROGRAMS\${PROGRAM_NAME}" +RMDir "$INSTDIR\help" +;RMDir /r "$INSTDIR\Wireshark User's Guide" +RMDir "$INSTDIR\diameter" +RMDir "$INSTDIR\snmp\mibs" +RMDir "$INSTDIR\snmp" +RMDir "$INSTDIR\radius" +RMDir "$INSTDIR\dtds" +RMDir "$INSTDIR\protobuf" +RMDir "$INSTDIR\tpncp" +RMDir "$INSTDIR\translations" +RMDir "$INSTDIR\ui" +RMDir "$INSTDIR\wimaxasncp" +RMDir "$INSTDIR" + +SectionEnd ; "Uinstall" + +Section "Un.Plugins" un.SecPlugins +;------------------------------------------- +SectionIn 1 2 +;Delete "$INSTDIR\plugins\${VERSION}\*.*" +;Delete "$INSTDIR\plugins\*.*" +;RMDir "$INSTDIR\plugins\${VERSION}" +;RMDir "$INSTDIR\plugins" +RMDir /r "$INSTDIR\plugins" +SectionEnd + +Section "Un.Global Profiles" un.SecProfiles +;------------------------------------------- +SectionIn 1 2 +RMDir /r "$INSTDIR\profiles" +SectionEnd + +Section "Un.Global Settings" un.SecGlobalSettings +;------------------------------------------- +SectionIn 1 2 +Delete "$INSTDIR\cfilters" +Delete "$INSTDIR\colorfilters" +Delete "$INSTDIR\dfilters" +Delete "$INSTDIR\enterprises.tsv" +Delete "$INSTDIR\init.lua" +Delete "$INSTDIR\console.lua" +Delete "$INSTDIR\dtd_gen.lua" +Delete "$INSTDIR\smi_modules" +RMDir "$INSTDIR" +SectionEnd + +Section /o "Un.Personal Settings" un.SecPersonalSettings +;------------------------------------------- +SectionIn 2 +SetShellVarContext current +Delete "$APPDATA\${PROGRAM_NAME}\*.*" +RMDir "$APPDATA\${PROGRAM_NAME}" +DeleteRegKey HKCU "Software\${PROGRAM_NAME}" +SectionEnd + +Section "-Un.Finally" +;------------------------------------------- +SectionIn 1 2 + +!insertmacro UpdateIcons + +; this test must be done after all other things uninstalled (e.g. Global Settings) +IfFileExists "$INSTDIR" 0 NoFinalErrorMsg + MessageBox MB_OK "Unable to remove $INSTDIR." /SD IDOK IDOK 0 ; skipped if dir doesn't exist +NoFinalErrorMsg: +SectionEnd + +!insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN + !insertmacro MUI_DESCRIPTION_TEXT ${un.SecUinstall} "Uninstall all ${PROGRAM_NAME} components." + !insertmacro MUI_DESCRIPTION_TEXT ${un.SecPlugins} "Uninstall all Plugins (even from previous ${PROGRAM_NAME} versions)." + !insertmacro MUI_DESCRIPTION_TEXT ${un.SecProfiles} "Uninstall all global configuration profiles." + !insertmacro MUI_DESCRIPTION_TEXT ${un.SecGlobalSettings} "Uninstall global settings like: $INSTDIR\cfilters" + !insertmacro MUI_DESCRIPTION_TEXT ${un.SecPersonalSettings} "Uninstall personal settings like your preferences file from your profile: $PROFILE." +!insertmacro MUI_UNFUNCTION_DESCRIPTION_END diff --git a/packaging/nsis/uninstall-wireshark.nsi b/packaging/nsis/uninstall-wireshark.nsi index bdd8090df9..be3c4a8a88 100644 --- a/packaging/nsis/uninstall-wireshark.nsi +++ b/packaging/nsis/uninstall-wireshark.nsi @@ -236,10 +236,6 @@ RMDir "$INSTDIR\mediaservice" RMDir "$INSTDIR\platforms" RMDir "$INSTDIR\playlistformats" RMDir "$INSTDIR\printsupport" -RMDir "$INSTDIR\share\themes\Default\gtk-2.0" -RMDir "$INSTDIR\share\themes\Default" -RMDir "$INSTDIR\share\themes" -RMDir "$INSTDIR\share" RMDir "$INSTDIR\styles\translations" RMDir "$INSTDIR\styles" RMDir "$SMPROGRAMS\${PROGRAM_NAME}" diff --git a/packaging/nsis/AdditionalTasksPage.nsddef b/packaging/nsis/wireshark-additional-tasks.nsddef similarity index 100% rename from packaging/nsis/AdditionalTasksPage.nsddef rename to packaging/nsis/wireshark-additional-tasks.nsddef diff --git a/packaging/nsis/AdditionalTasksPage.nsdinc b/packaging/nsis/wireshark-additional-tasks.nsdinc similarity index 100% rename from packaging/nsis/AdditionalTasksPage.nsdinc rename to packaging/nsis/wireshark-additional-tasks.nsdinc diff --git a/packaging/nsis/config.nsh.in b/packaging/nsis/wireshark-config.nsh.in similarity index 93% rename from packaging/nsis/config.nsh.in rename to packaging/nsis/wireshark-config.nsh.in index 704eb02c49..bfb5cf6a10 100644 --- a/packaging/nsis/config.nsh.in +++ b/packaging/nsis/wireshark-config.nsh.in @@ -1,5 +1,5 @@ # ============================================================================ -# NSIS configuration definitions. Generated from config.nsh.in. +# NSIS configuration definitions. Generated from wireshark-config.nsh.in. # ============================================================================ # Do not prefix comments with ";". They will be removed by CMake. diff --git a/packaging/nsis/wireshark.nsi b/packaging/nsis/wireshark.nsi index 57b26c3743..d998c67bea 100644 --- a/packaging/nsis/wireshark.nsi +++ b/packaging/nsis/wireshark.nsi @@ -125,7 +125,7 @@ Page custom DisplayUSBPcapPage ; https://nsis.sourceforge.io/Docs/Modern%20UI%202/Readme.html ; https://nsis.sourceforge.io/Docs/nsDialogs/Readme.html !ifdef QT_DIR - !include "AdditionalTasksPage.nsdinc" + !include "wireshark-additional-tasks.nsdinc" !endif ; ============================================================================