diff options
Diffstat (limited to 'packaging/nsis/CMakeLists.txt')
-rw-r--r-- | packaging/nsis/CMakeLists.txt | 362 |
1 files changed, 235 insertions, 127 deletions
diff --git a/packaging/nsis/CMakeLists.txt b/packaging/nsis/CMakeLists.txt index 04f696dcbd..ff5775e6b3 100644 --- a/packaging/nsis/CMakeLists.txt +++ b/packaging/nsis/CMakeLists.txt @@ -8,63 +8,62 @@ # # We should use CPack to generate the NSIS package. Even better, -# we should use CPack to create a .msi using WIX. +# we should use CPack to create a .msi using WiX. -set(NSIS_GENERATED_FILES - ${CMAKE_CURRENT_BINARY_DIR}/all-manifest.nsh - ${CMAKE_CURRENT_BINARY_DIR}/config.nsh - ${CMAKE_CURRENT_BINARY_DIR}/qt-dll-manifest.nsh +set(WIRESHARK_NSIS_GENERATED_FILES + ${CMAKE_CURRENT_BINARY_DIR}/wireshark-manifest.nsh + ${CMAKE_CURRENT_BINARY_DIR}/wireshark-config.nsh +) +if(NOT SKIP_NSIS_QT_DLLS) + list(APPEND WIRESHARK_NSIS_GENERATED_FILES ${CMAKE_CURRENT_BINARY_DIR}/wireshark-qt-manifest.nsh) +endif() +set(WIRESHARK_NSIS_GENERATED_FILES ${WIRESHARK_NSIS_GENERATED_FILES} PARENT_SCOPE) + +set(WIRESHARK_NSIS_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/wireshark.nsi + ${CMAKE_CURRENT_SOURCE_DIR}/wireshark-common.nsh + ${CMAKE_CURRENT_SOURCE_DIR}/servicelib.nsh + ${CMAKE_CURRENT_SOURCE_DIR}/NpcapPage.ini + ${CMAKE_CURRENT_SOURCE_DIR}/USBPcapPage.ini + ${WIRESHARK_NSIS_GENERATED_FILES} + PARENT_SCOPE ) -set(NSIS_GENERATED_FILES ${NSIS_GENERATED_FILES} PARENT_SCOPE) -set(NSIS_FILES - wireshark.nsi - uninstall.nsi - common.nsh - GetWindowsVersion.nsh +set(LOGRAY_NSIS_GENERATED_FILES + ${CMAKE_CURRENT_BINARY_DIR}/logray-manifest.nsh + ${CMAKE_CURRENT_BINARY_DIR}/logray-config.nsh + ${CMAKE_CURRENT_BINARY_DIR}/logray-qt-manifest.nsh +) +set(LOGRAY_NSIS_GENERATED_FILES ${LOGRAY_NSIS_GENERATED_FILES} PARENT_SCOPE) + +set(LOGRAY_NSIS_FILES + logray.nsi + logray-common.nsh servicelib.nsh - AdditionalTasksPage.ini NpcapPage.ini USBPcapPage.ini - ${NSIS_GENERATED_FILES} + ${LOGRAY_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. +file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/doc" DOC_DIR) file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/docbook" DOCBOOK_DIR) -if(WIRESHARK_TARGET_PLATFORM STREQUAL "win32") - set(TARGET_MACHINE x86) -elseif(WIRESHARK_TARGET_PLATFORM STREQUAL "win64") - set(TARGET_MACHINE x64) -else() - message(FATAL_ERROR "Your mysterious moon-man architecture \"${WIRESHARK_TARGET_PLATFORM}\" frightens and confuses us.") -endif() set (MMDBRESOLVE_EXE ${MAXMINDDB_FOUND}) -# Must match ${EXTRA_INSTALLER_DIR}/Npcap-X.Y.Z.exe -set(NPCAP_PACKAGE_VERSION "1.55") - -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 +# - Set CMakeLists.txt version strings in tools/make-version.py # - Add a VERSION_EXTRA cmake option -set (VERSION "${PROJECT_VERSION}") -set (PRODUCT_VERSION=${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}.${VERSION_BUILD}) - -#add_custom_target(build_nsis_package -# DEPENDS -# wireshark-$(WIRESHARK_TARGET_PLATFORM)-$(VERSION).exe -#) +set (PRODUCT_VERSION ${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT_PATCH_VERSION}.${PROJECT_BUILD_VERSION}) +set (LOG_PRODUCT_VERSION ${LOG_PROJECT_MAJOR_VERSION}.${LOG_PROJECT_MINOR_VERSION}.${PROJECT_PATCH_VERSION}.${PROJECT_BUILD_VERSION}) -if(BUILD_wireshark AND QT_FOUND) +if((BUILD_wireshark OR BUILD_logray) AND QT_FOUND) set (QT_DIR "\${STAGING_DIR}") endif() @@ -81,8 +80,9 @@ endif() # 1912 = VS2017 15.5 / 14.12 # 1913 = VS2017 15.6 / 14.13 # 1914 = VS2017 15.7 / 14.14 -set(_vcredist_name "vcredist_${TARGET_MACHINE}.exe") -if(MSVC_VERSION GREATER_EQUAL 1920) +if(MSVC_VERSION GREATER_EQUAL 1930) + set(_ws_vcredist_subdir "vcredist_MSVC2022") +elseif(MSVC_VERSION GREATER_EQUAL 1920) set(_ws_vcredist_subdir "vcredist_MSVC2019") set(_msvs_version 15.0) # Doesn't appear to be set elseif(MSVC_VERSION GREATER_EQUAL 1910) @@ -115,51 +115,106 @@ if(MSVC_VERSION GREATER_EQUAL 1910 AND VCINSTALLDIR) "${VCINSTALLDIR}/Redist/MSVC/14.*.*") endif() -find_program(VCREDIST_EXE "${_vcredist_name}" +find_program(_vcredist + NAMES + "vc_redist.${WIRESHARK_TARGET_PLATFORM}.exe" # Visual Studio 2022 and later + "vcredist_${WIRESHARK_TARGET_PLATFORM}.exe" # Visual Studio 2019 and earlier PATHS "${_PROJECT_LIB_DIR}" $ENV{VCToolsRedistDir} "${VCINSTALLDIR}" PATH_SUFFIXES ${_ws_vcredist_subdir} ${_ms_vcredist_subdir} NO_DEFAULT_PATH ) -if(VCREDIST_EXE) - file(TO_NATIVE_PATH "${VCREDIST_EXE}" VCREDIST_EXE) - message(STATUS "Using ${VCREDIST_EXE} for the NSIS installer.") +if(_vcredist) + file(TO_NATIVE_PATH "${_vcredist}" _vcredist) + message(STATUS "Using ${_vcredist} for the NSIS installer.") + get_filename_component(VCREDIST_DIR ${_vcredist} DIRECTORY) + 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}") -# all-manifest.nsh. Can be created at configure time. -set(_all_manifest "${CMAKE_CURRENT_BINARY_DIR}/all-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} ${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") + if(USE_REPOSITORY) + 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_RELEASE_DLL} ${GCRYPT_DLLS} + ${GNUTLS_DLLS} ${KERBEROS_DLLS} ${LIBSSH_DLLS} ${LUA_DLL} + ${LZ4_DLL} ${MINIZIP_DLL} ${NGHTTP2_DLL} ${NGHTTP3_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} + ${SPEEXDSP_DLL} + # Needed for mmdbresolve + ${MAXMINDDB_DLL} + ) + set(_all_manifest_contents "${_all_manifest_contents}File \"\${STAGING_DIR}\\${_dll}\"\n") + endforeach() + elseif(USE_MSYSTEM) + include(${CMAKE_CURRENT_SOURCE_DIR}/InstallMSYS2.cmake) + foreach(_dll ${MINGW_DLLS}) + file(TO_NATIVE_PATH ${_dll} _path) + set(_all_manifest_contents "${_all_manifest_contents}File \"${_path}\"\n") + endforeach() + else() + include(${CMAKE_CURRENT_SOURCE_DIR}/InstallMinGW.cmake) + foreach(_dll ${MINGW_DLLS}) + file(TO_NATIVE_PATH ${_dll} _path) + set(_all_manifest_contents "${_all_manifest_contents}File \"${_path}\"\n") + endforeach() + endif() + file(WRITE "${_all_manifest}" "${_all_manifest_contents}") +endif() + +if (BUILD_logray) + # 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}/logray-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}/logray-config.nsh" "${_config_nsh_contents}") + + # logray-manifest.nsh. Can be created at configure time. + set(_all_manifest "${CMAKE_CURRENT_BINARY_DIR}/logray-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_RELEASE_DLL} ${GCRYPT_DLLS} + ${GNUTLS_DLLS} ${KERBEROS_DLLS} ${LIBSSH_DLLS} ${LUA_DLL} + ${LZ4_DLL} ${MINIZIP_DLL} ${NGHTTP2_DLL} ${NGHTTP3_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} + ${SPEEXDSP_DLL} + # Needed for mmdbresolve + ${MAXMINDDB_DLL} + ) + set(_all_manifest_contents "${_all_manifest_contents}File \"\${STAGING_DIR}\\${_dll}\"\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) @@ -167,40 +222,16 @@ file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}" _nsis_include_dir) # Variables we can't set via config.nsh. set(NSIS_OPTIONS - /DSTAGING_DIR=${_staging_dir} - /DOUTFILE_DIR=${_outfile_dir} - /DNSIS_INCLUDE_DIR=${_nsis_include_dir} - /V4 + -DSTAGING_DIR=${_staging_dir} + -DOUTFILE_DIR=${_outfile_dir} + -DNSIS_INCLUDE_DIR=${_nsis_include_dir} + -V2 PARENT_SCOPE ) -# We want to sign all of the executables that we ship in the official -# installers. This means that uninstall.exe must be built separately AND -# that building the installer itself won't overwrite uninstall.exe -macro( ADD_NSIS_UNINSTALLER_TARGET ) - # - # XXX - if we're not building Wireshark, we can't build - # anything, so there's nothing to uninstall. - # - if(BUILD_wireshark) - set (_nsis_source_dir ${CMAKE_SOURCE_DIR}/packaging/nsis ) - set (_nsis_binary_dir ${CMAKE_BINARY_DIR}/packaging/nsis ) - - add_custom_command(OUTPUT ${DATAFILE_DIR}/uninstall.exe - DEPENDS ${_nsis_source_dir}/uninstall.nsi - ${_nsis_source_dir}/common.nsh - COMMAND ${MAKENSIS_EXECUTABLE} ${NSIS_OPTIONS} - uninstall.nsi - COMMAND ${POWERSHELL_COMMAND} "${_nsis_source_dir}/makeUninstall.ps1" ${DATAFILE_DIR}/uninstall_installer.exe - COMMAND ${CMAKE_COMMAND} -E remove ${DATAFILE_DIR}/uninstall_installer.exe - WORKING_DIRECTORY ${_nsis_source_dir} - ) - else() - message(WARNING "The NSIS installer cannot be built if the Wireshark program isn't built.") - endif() -endmacro( ADD_NSIS_UNINSTALLER_TARGET ) - -macro( ADD_NSIS_PACKAGE_TARGET ) +macro( ADD_NSIS_PACKAGE_TARGETS ) + set (_nsis_source_dir ${CMAKE_SOURCE_DIR}/packaging/nsis ) + set (_nsis_binary_dir ${CMAKE_BINARY_DIR}/packaging/nsis ) # # XXX - if we're not building Wireshark, we can't build the # manifest below. On the other hand, if we're not building @@ -210,30 +241,102 @@ macro( ADD_NSIS_PACKAGE_TARGET ) # This should probably be fixed, so that people can produce # command-line-only installer packages. if(BUILD_wireshark) - #set (_nsis_package ${CMAKE_BINARY_DIR}/packaging/nsis/Wireshark-$(WIRESHARK_TARGET_PLATFORM)-$(VERSION).exe) + # wireshark-qt-manifest.nsh. Created using Wireshark.exe. + if(NOT SKIP_NSIS_QT_DLLS) + if (USE_REPOSITORY) + add_custom_command(OUTPUT ${_nsis_binary_dir}/wireshark-qt-manifest.nsh + COMMAND set "PATH=${QT_BIN_PATH};%PATH%" + COMMAND ${POWERSHELL_COMMAND} "${_nsis_source_dir}/windeployqt-to-nsis.ps1" + -Executable $<TARGET_FILE:wireshark> + -FilePath ${_nsis_binary_dir}/wireshark-qt-manifest.nsh + $<$<CONFIG:Debug>:-DebugConfig> + DEPENDS + "${_nsis_source_dir}/windeployqt-to-nsis.ps1" + $<TARGET_FILE:wireshark> + ) + elseif(HAVE_MSYSTEM) + add_custom_command(OUTPUT ${_nsis_binary_dir}/wireshark-qt-manifest.nsh + COMMAND ${Python3_EXECUTABLE} "${_nsis_source_dir}/windeployqt-to-nsis.py" + --executable $<TARGET_FILE:wireshark> + ${_nsis_binary_dir}/wireshark-qt-manifest.nsh + #$<$<CONFIG:Debug>:-DebugConfig> + DEPENDS + "${_nsis_source_dir}/windeployqt-to-nsis.py" + $<TARGET_FILE:wireshark> + ) + elseif(MINGW AND CMAKE_CROSSCOMPILING) + add_custom_command(OUTPUT ${_nsis_binary_dir}/wireshark-qt-manifest.nsh + COMMAND ${Python3_EXECUTABLE} "${_nsis_source_dir}/windeployqt-to-nsis.py" + --sysroot "${MINGW_SYSROOT}" + --mapping "${_nsis_source_dir}/mingw64-qt-mapping.txt" + ${_nsis_binary_dir}/wireshark-qt-manifest.nsh + #$<$<CONFIG:Debug>:-DebugConfig> + DEPENDS + "${_nsis_source_dir}/windeployqt-to-nsis.py" + "${_nsis_source_dir}/mingw64-qt-mapping.txt" + ) + else() + message(FATAL_ERROR "Unknown Qt deployment method") + endif() + endif() + + # Build NSIS package dependencies. We build the package in + # two stages so that wireshark_nsis below doesn't trigger + # any dependencies that might clobber any signed executables. + add_custom_target(wireshark_nsis_prep + DEPENDS + ${WIRESHARK_NSIS_FILES} + copy_data_files + user_guide_html + faq_html + ) + set_target_properties(wireshark_nsis_prep PROPERTIES + FOLDER "Packaging" + EXCLUDE_FROM_DEFAULT_BUILD True + ) + + # Make sure required blobs are available + FetchContent_MakeAvailable(Npcap USBPcap) - # qt-dll-manifest.nsh. Created using Wireshark.exe. - add_custom_command(OUTPUT ${_nsis_binary_dir}/qt-dll-manifest.nsh + # Dump the installer into + # ${CMAKE_CURRENT_SOURCE_DIR}/packaging/nsis + # Note that executables and DLLs *must* be built separately + add_custom_target(wireshark_nsis + COMMAND ${MAKENSIS_EXECUTABLE} ${NSIS_OPTIONS} + $<$<CONFIG:Debug>:-DBUNDLE_DEBUG_DLLS> + $<$<BOOL:${MSVC}>:-DUSE_VCREDIST> + wireshark.nsi + WORKING_DIRECTORY ${_nsis_source_dir} + ) + set_target_properties(wireshark_nsis PROPERTIES + FOLDER "Packaging" + EXCLUDE_FROM_DEFAULT_BUILD True + ) + endif() + + if(BUILD_logray) + # logray-qt-manifest.nsh. Created using Wireshark.exe. + add_custom_command(OUTPUT ${_nsis_binary_dir}/logray-qt-manifest.nsh COMMAND set "PATH=${QT_BIN_PATH};%PATH%" COMMAND ${POWERSHELL_COMMAND} "${_nsis_source_dir}/windeployqt-to-nsis.ps1" - -Executable $<TARGET_FILE:wireshark> - -FilePath ${_nsis_binary_dir}/qt-dll-manifest.nsh + -Executable $<TARGET_FILE:logray> + -FilePath ${_nsis_binary_dir}/logray-qt-manifest.nsh $<$<CONFIG:Debug>:-DebugConfig> DEPENDS "${_nsis_source_dir}/windeployqt-to-nsis.ps1" ) # Build NSIS package dependencies. We build the package in - # two stages so that nsis_package below doesn't trigger + # two stages so that logray_nsis below doesn't trigger # any dependencies that might clobber any signed executables. - add_custom_target(nsis_package_prep + add_custom_target(logray_nsis_prep DEPENDS - ${NSIS_FILES} + ${LOGRAY_NSIS_FILES} copy_data_files user_guide_html faq_html - ${DATAFILE_DIR}/uninstall.exe + ${DATAFILE_DIR}/uninstall-logray.exe ) - set_target_properties(nsis_package_prep PROPERTIES + set_target_properties(logray_nsis_prep PROPERTIES FOLDER "Packaging" EXCLUDE_FROM_DEFAULT_BUILD True ) @@ -241,25 +344,30 @@ macro( ADD_NSIS_PACKAGE_TARGET ) # Dump the installer into # ${CMAKE_CURRENT_SOURCE_DIR}/packaging/nsis # Note that executables and DLLs *must* be built separately - add_custom_target(nsis_package + add_custom_target(logray_nsis COMMAND ${MAKENSIS_EXECUTABLE} ${NSIS_OPTIONS} - $<$<CONFIG:Debug>:/DBUNDLE_DEBUG_DLLS> - wireshark.nsi + $<$<CONFIG:Debug>:-DBUNDLE_DEBUG_DLLS> + logray.nsi WORKING_DIRECTORY ${_nsis_source_dir} ) - set_target_properties(nsis_package PROPERTIES + set_target_properties(logray_nsis PROPERTIES FOLDER "Packaging" EXCLUDE_FROM_DEFAULT_BUILD True ) endif() -endmacro( ADD_NSIS_PACKAGE_TARGET ) +endmacro( ADD_NSIS_PACKAGE_TARGETS ) set(CLEAN_FILES - all-manifest.nsh - config.nsh #NEWS.txt - qt-dll-manifest.nsh #user-guide.chm - ${DATAFILE_DIR}/uninstall.exe - wireshark-$(WIRESHARK_TARGET_PLATFORM)-$(VERSION).exe + ${DATAFILE_DIR}/uninstall-wireshark.exe + wireshark-${VERSION}-${WIRESHARK_TARGET_PLATFORM}.exe + wireshark-config.nsh + wireshark-manifest.nsh + wireshark-qt-manifest.nsh + ${DATAFILE_DIR}/uninstall-logray.exe + logray-${VERSION}-${WIRESHARK_TARGET_PLATFORM}.exe + logray-config.nsh + logray-manifest.nsh + logray-qt-manifest.nsh ) |