2016-04-07 23:03:51 +00:00
|
|
|
# CMakeLists.txt
|
|
|
|
#
|
|
|
|
# Wireshark - Network traffic analyzer
|
|
|
|
# By Gerald Combs <gerald@wireshark.org>
|
|
|
|
# Copyright 1998 Gerald Combs
|
|
|
|
#
|
2018-03-07 14:28:51 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
2016-04-07 23:03:51 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
# We should use CPack to help generate a .msi using WIX.
|
|
|
|
|
|
|
|
set(WIX_GENERATED_FILES
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/DependentComponents.wxs
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/Diameter.wxs
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/QtDependentComponents.wxs
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/QtTranslation.wxs
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/RadiusDict.wxs
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/SNMPMibs.wxs
|
|
|
|
)
|
|
|
|
set(WIX_GENERATED_FILES ${WIX_GENERATED_FILES} PARENT_SCOPE)
|
|
|
|
|
|
|
|
set(WIX_SOURCE_FILES
|
|
|
|
${CMAKE_SOURCE_DIR}/packaging/wix/Wireshark.wxs
|
|
|
|
${CMAKE_SOURCE_DIR}/packaging/wix/WiresharkOptionsDlg.wxs
|
|
|
|
${CMAKE_SOURCE_DIR}/packaging/wix/WiresharkWixUI.wxs
|
|
|
|
${WIX_GENERATED_FILES}
|
|
|
|
)
|
|
|
|
set(WIX_SOURCE_FILES ${WIX_SOURCE_FILES} PARENT_SCOPE)
|
|
|
|
|
|
|
|
set(WIX_FILES
|
|
|
|
ComponentGroups.wxi
|
|
|
|
COPYING.rtf
|
|
|
|
DirectoryStructure.wxi
|
|
|
|
Features.wxi
|
|
|
|
InputPaths.wxi
|
|
|
|
Plugins.wxi
|
|
|
|
Prerequisites.wxi
|
|
|
|
UserInterface.wxi
|
|
|
|
${WIX_SOURCE_FILES}
|
|
|
|
PARENT_SCOPE
|
|
|
|
)
|
|
|
|
|
|
|
|
set(WIX_OUT_FILES
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/DependentComponents.wixobj
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/Diameter.wixobj
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/QtDependentComponents.wixobj
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/QtTranslation.wixobj
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/RadiusDict.wixobj
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/SNMPMibs.wixobj
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/Wireshark.wixobj
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/WiresharkOptionsDlg.wixobj
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/WiresharkWixUI.wixobj
|
|
|
|
)
|
|
|
|
set(WIX_OUT_FILES ${WIX_OUT_FILES} PARENT_SCOPE)
|
|
|
|
|
|
|
|
# Variables required for Wireshark.wxs
|
|
|
|
set(PROGRAM_NAME ${CMAKE_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.
|
2019-02-11 22:24:18 +00:00
|
|
|
file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/docbook" DOCBOOK_DIR)
|
2018-05-10 12:54:31 +00:00
|
|
|
if(WIRESHARK_TARGET_PLATFORM STREQUAL "win32")
|
2016-04-07 23:03:51 +00:00
|
|
|
set(TARGET_MACHINE x86)
|
2018-05-10 12:54:31 +00:00
|
|
|
elseif(WIRESHARK_TARGET_PLATFORM STREQUAL "win64")
|
2016-04-07 23:03:51 +00:00
|
|
|
set(TARGET_MACHINE x64)
|
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "Your mysterious moon-man architecture \"${WIRESHARK_TARGET_PLATFORM}\" frightens and confuses us.")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
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 Wix.
|
2019-01-09 22:47:02 +00:00
|
|
|
# - Set CMakeLists.txt version strings in tools/make-version.pl
|
2016-04-07 23:03:51 +00:00
|
|
|
# - Add a VERSION_EXTRA cmake option
|
|
|
|
set (VERSION "${PROJECT_VERSION}")
|
|
|
|
set (PRODUCT_VERSION=${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}.${VERSION_BUILD})
|
|
|
|
|
2017-06-17 18:15:18 +00:00
|
|
|
# Use the merge module that comes with our version of Visual Studio
|
2019-07-23 18:26:29 +00:00
|
|
|
if(MSVC_VERSION GREATER_EQUAL 1920)
|
|
|
|
set (MSVC_CRT_VERSION "VC142")
|
|
|
|
elseif(MSVC_VERSION GREATER_EQUAL 1910)
|
2017-06-17 18:15:18 +00:00
|
|
|
set (MSVC_CRT_VERSION "VC141")
|
|
|
|
elseif(MSVC_VERSION GREATER_EQUAL 1900)
|
|
|
|
set (MSVC_CRT_VERSION "VC140")
|
|
|
|
endif()
|
|
|
|
|
2019-04-22 16:15:13 +00:00
|
|
|
# Starting with Visual Studio 2019 merge modules are deprecated but
|
|
|
|
# are available as an individual component.
|
|
|
|
# https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes#-deprecations
|
2017-06-27 18:56:45 +00:00
|
|
|
set(MERGE_MODULE "Microsoft_${MSVC_CRT_VERSION}_CRT_${TARGET_MACHINE}.msm")
|
|
|
|
set (PF86_ENV "ProgramFiles(x86)")
|
|
|
|
|
2018-02-14 00:15:22 +00:00
|
|
|
set(VC_TOOLS_MERGE_MODULES_DIR)
|
|
|
|
if (DEFINED ENV{VCToolsRedistDir})
|
|
|
|
set(VC_TOOLS_MERGE_MODULES_DIR "$ENV{VCToolsRedistDir}/MergeModules")
|
|
|
|
endif()
|
|
|
|
|
2017-06-27 18:56:45 +00:00
|
|
|
find_path(MERGE_MODULE_DIR ${MERGE_MODULE}
|
|
|
|
PATHS
|
|
|
|
#"$ENV{VCINSTALLDIR}/VC/Redist/MSVC/how-do-we-get-this-version/Merge Modules"
|
2018-02-14 00:15:22 +00:00
|
|
|
${VC_TOOLS_MERGE_MODULES_DIR}
|
2017-06-27 18:56:45 +00:00
|
|
|
"$ENV{${PF86_ENV}}/Common Files/Merge Modules"
|
|
|
|
"$ENV{PROGRAMFILES}/Common Files/Merge Modules"
|
|
|
|
NO_DEFAULT_PATH
|
|
|
|
)
|
2018-12-29 19:51:08 +00:00
|
|
|
file(TO_NATIVE_PATH "${MERGE_MODULE_DIR}/Microsoft_${MSVC_CRT_VERSION}_CRT_${TARGET_MACHINE}.msm" MSM_NATIVE_PATH)
|
|
|
|
message(STATUS "Using ${MSM_NATIVE_PATH} for the WiX installer")
|
2016-04-07 23:03:51 +00:00
|
|
|
|
|
|
|
# DependentComponents.wxi. Can be created at configure time.
|
|
|
|
set(_all_manifest_wix "${CMAKE_CURRENT_BINARY_DIR}/DependentComponents.wxs")
|
|
|
|
file(WRITE "${_all_manifest_wix}" "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n")
|
|
|
|
file(APPEND "${_all_manifest_wix}" "<Wix xmlns=\"http://schemas.microsoft.com/wix/2006/wi\">\n\n")
|
|
|
|
file(APPEND "${_all_manifest_wix}" " <!-- Files required for all sections. Generated by CMake. -->\n")
|
|
|
|
file(APPEND "${_all_manifest_wix}" "<?include InputPaths.wxi ?>\n")
|
|
|
|
file(APPEND "${_all_manifest_wix}" " <Fragment>\n")
|
|
|
|
file(APPEND "${_all_manifest_wix}" " <DirectoryRef Id=\"INSTALLFOLDER\">\n")
|
2019-10-03 16:45:43 +00:00
|
|
|
file(APPEND "${_all_manifest_wix}" " <?ifdef BUNDLE_DEBUG_DLLS ?>\n")
|
|
|
|
foreach(_dll ${GLIB2_DLLS_DEBUG})
|
|
|
|
STRING(REGEX REPLACE "[-|\\.]" "_" _wix_name ${_dll})
|
|
|
|
file(APPEND "${_all_manifest_wix}" " <Component Id=\"cmp${_wix_name}\" Guid=\"*\">\n")
|
|
|
|
file(APPEND "${_all_manifest_wix}" " <File Id=\"fil${_wix_name}\" KeyPath=\"yes\" Source=\"$(var.Staging.Dir)\\${_dll}\"/>\n")
|
|
|
|
file(APPEND "${_all_manifest_wix}" " </Component>\n")
|
|
|
|
endforeach()
|
|
|
|
file(APPEND "${_all_manifest_wix}" " <?else?>\n")
|
|
|
|
foreach(_dll ${GLIB2_DLLS_RELEASE})
|
|
|
|
STRING(REGEX REPLACE "[-|\\.]" "_" _wix_name ${_dll})
|
|
|
|
file(APPEND "${_all_manifest_wix}" " <Component Id=\"cmp${_wix_name}\" Guid=\"*\">\n")
|
|
|
|
file(APPEND "${_all_manifest_wix}" " <File Id=\"fil${_wix_name}\" KeyPath=\"yes\" Source=\"$(var.Staging.Dir)\\${_dll}\"/>\n")
|
|
|
|
file(APPEND "${_all_manifest_wix}" " </Component>\n")
|
|
|
|
endforeach()
|
|
|
|
file(APPEND "${_all_manifest_wix}" " <?endif?>\n")
|
2016-04-07 23:03:51 +00:00
|
|
|
SET(unique_component "")
|
2019-10-03 16:45:43 +00:00
|
|
|
foreach(_dll ${CARES_DLL} ${GCRYPT_DLLS}
|
2016-08-26 13:18:29 +00:00
|
|
|
${GNUTLS_DLLS} ${KERBEROS_DLLS} ${LIBSSH_DLL} ${LUA_DLL}
|
2016-10-22 16:15:51 +00:00
|
|
|
${LZ4_DLL} ${NGHTTP2_DLL} ${SBC_DLL} ${SMI_DLL} ${SNAPPY_DLL}
|
2019-03-20 08:03:17 +00:00
|
|
|
${SPANDSP_DLL} ${BCG729_DLL} ${LIBXML2_DLLS} ${WINSPARKLE_DLL}
|
2019-11-18 22:55:25 +00:00
|
|
|
${ZLIB_DLL} ${BROTLI_DLLS} ${ZSTD_DLL} ${ILBC_DLL}
|
2018-02-09 01:20:26 +00:00
|
|
|
# Required for mmdbresolve
|
|
|
|
${MAXMINDDB_DLL}
|
2016-04-07 23:03:51 +00:00
|
|
|
)
|
|
|
|
#ensure uniqueness of files
|
|
|
|
IF(NOT "${unique_component}" MATCHES "(^|;)${_dll}(;|$)")
|
|
|
|
STRING(REGEX REPLACE "[-|\\.]" "_" _wix_name ${_dll})
|
2019-10-03 16:45:43 +00:00
|
|
|
file(APPEND "${_all_manifest_wix}" " <Component Id=\"cmp${_wix_name}\" Guid=\"*\">\n")
|
|
|
|
file(APPEND "${_all_manifest_wix}" " <File Id=\"fil${_wix_name}\" KeyPath=\"yes\" Source=\"$(var.Staging.Dir)\\${_dll}\"/>\n")
|
|
|
|
file(APPEND "${_all_manifest_wix}" " </Component>\n")
|
2016-04-07 23:03:51 +00:00
|
|
|
SET(unique_component ${unique_component} ${_dll})
|
|
|
|
ENDIF(NOT "${unique_component}" MATCHES "(^|;)${_dll}(;|$)")
|
|
|
|
endforeach()
|
|
|
|
foreach(_script "init.lua" "console.lua" "dtd_gen.lua")
|
|
|
|
STRING(REGEX REPLACE "[-|\\.]" "_" _wix_name ${_script})
|
2019-10-03 16:45:43 +00:00
|
|
|
file(APPEND "${_all_manifest_wix}" " <Component Id=\"cmp${_wix_name}\" Guid=\"*\">\n")
|
|
|
|
file(APPEND "${_all_manifest_wix}" " <File Id=\"fil${_wix_name}\" KeyPath=\"yes\" Source=\"$(var.Staging.Dir)\\${_script}\"/>\n")
|
|
|
|
file(APPEND "${_all_manifest_wix}" " </Component>\n")
|
2016-04-07 23:03:51 +00:00
|
|
|
endforeach()
|
|
|
|
file(APPEND "${_all_manifest_wix}" " </DirectoryRef>\n")
|
|
|
|
file(APPEND "${_all_manifest_wix}" " </Fragment>\n")
|
|
|
|
file(APPEND "${_all_manifest_wix}" " <Fragment>\n")
|
|
|
|
file(APPEND "${_all_manifest_wix}" " <ComponentGroup Id=\"CG.RequiredDependencies\">\n")
|
2019-10-03 16:45:43 +00:00
|
|
|
file(APPEND "${_all_manifest_wix}" " <?ifdef BUNDLE_DEBUG_DLLS ?>\n")
|
|
|
|
foreach(_dll ${GLIB2_DLLS_DEBUG})
|
|
|
|
STRING(REGEX REPLACE "[-|\\.]" "_" _wix_name ${_dll})
|
|
|
|
file(APPEND "${_all_manifest_wix}" " <ComponentRef Id=\"cmp${_wix_name}\" />\n")
|
|
|
|
endforeach()
|
|
|
|
file(APPEND "${_all_manifest_wix}" " <?else?>\n")
|
|
|
|
foreach(_dll ${GLIB2_DLLS_RELEASE})
|
|
|
|
STRING(REGEX REPLACE "[-|\\.]" "_" _wix_name ${_dll})
|
|
|
|
file(APPEND "${_all_manifest_wix}" " <ComponentRef Id=\"cmp${_wix_name}\" />\n")
|
|
|
|
endforeach()
|
|
|
|
file(APPEND "${_all_manifest_wix}" " <?endif?>\n")
|
2016-04-07 23:03:51 +00:00
|
|
|
SET(unique_file "")
|
2019-10-03 16:45:43 +00:00
|
|
|
foreach(_dll ${CARES_DLL} ${GCRYPT_DLLS}
|
2016-08-26 13:18:29 +00:00
|
|
|
${GNUTLS_DLLS} ${KERBEROS_DLLS} ${LIBSSH_DLL} ${LUA_DLL}
|
2016-10-22 16:15:51 +00:00
|
|
|
${LZ4_DLL} ${NGHTTP2_DLL} ${SBC_DLL} ${SMI_DLL} ${SNAPPY_DLL}
|
2019-03-20 16:34:12 +00:00
|
|
|
${SPANDSP_DLL} ${BCG729_DLL} ${LIBXML2_DLLS} ${WINSPARKLE_DLL}
|
2019-11-18 22:55:25 +00:00
|
|
|
${ZLIB_DLL} ${BROTLI_DLLS} ${ZSTD_DLL} ${ILBC_DLL}
|
2018-02-09 01:20:26 +00:00
|
|
|
# mmdbresolve
|
|
|
|
${MAXMINDDB_DLL}
|
2016-04-07 23:03:51 +00:00
|
|
|
)
|
|
|
|
#ensure uniqueness of files
|
|
|
|
IF(NOT "${unique_file}" MATCHES "(^|;)${_dll}(;|$)")
|
|
|
|
STRING(REGEX REPLACE "[-|\\.]" "_" _wix_name ${_dll})
|
2019-10-03 16:45:43 +00:00
|
|
|
file(APPEND "${_all_manifest_wix}" " <ComponentRef Id=\"cmp${_wix_name}\" />\n")
|
2016-04-07 23:03:51 +00:00
|
|
|
SET(unique_file ${unique_file} ${_dll})
|
|
|
|
ENDIF(NOT "${unique_file}" MATCHES "(^|;)${_dll}(;|$)")
|
|
|
|
endforeach()
|
|
|
|
foreach(_script "init.lua" "console.lua" "dtd_gen.lua")
|
|
|
|
STRING(REGEX REPLACE "[-|\\.]" "_" _wix_name ${_script})
|
2019-10-03 16:45:43 +00:00
|
|
|
file(APPEND "${_all_manifest_wix}" " <ComponentRef Id=\"cmp${_wix_name}\" />\n")
|
2016-04-07 23:03:51 +00:00
|
|
|
endforeach()
|
|
|
|
file(APPEND "${_all_manifest_wix}" " </ComponentGroup>\n")
|
|
|
|
file(APPEND "${_all_manifest_wix}" " </Fragment>\n")
|
|
|
|
file(APPEND "${_all_manifest_wix}" "\n</Wix>\n")
|
|
|
|
|
|
|
|
|
|
|
|
if(SMI_DIR)
|
2018-03-06 23:29:34 +00:00
|
|
|
set(d_smi_dir "-dSMI_DIR")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (MAXMINDDB_FOUND)
|
|
|
|
set(d_mmdbresolve_exe "-dMMDBRESOLVE_EXE")
|
2016-04-07 23:03:51 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
set(WIX_CANDLE_DEFINES
|
2018-12-19 20:40:21 +00:00
|
|
|
-v
|
2016-04-07 23:03:51 +00:00
|
|
|
-sw1076
|
|
|
|
-dPlatform=${TARGET_MACHINE}
|
|
|
|
-dWiresharkName=${CMAKE_PROJECT_NAME}
|
|
|
|
-dWiresharkVersion=${PRODUCT_VERSION}
|
2017-09-22 18:13:33 +00:00
|
|
|
-dWiresharkMajorVersion=${PROJECT_MAJOR_VERSION}
|
|
|
|
-dWiresharkMinorVersion=${PROJECT_MINOR_VERSION}
|
2016-05-11 18:19:44 +00:00
|
|
|
-dAssetDir=${CMAKE_SOURCE_DIR}/packaging/wix
|
2016-04-07 23:03:51 +00:00
|
|
|
-dBuildOutputDir=${EXECUTABLE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}
|
|
|
|
-dDiameterDir=${ARCHIVE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}/diameter
|
2016-07-29 18:01:38 +00:00
|
|
|
-dIconDir=${CMAKE_SOURCE_DIR}/image
|
2016-04-07 23:03:51 +00:00
|
|
|
-dQtTranslationDir=${ARCHIVE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}/translations
|
2016-07-29 18:01:38 +00:00
|
|
|
-dRadiusDictDir=${ARCHIVE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}/radius
|
|
|
|
-dSnmpMibDir=${ARCHIVE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}/snmp/mibs
|
|
|
|
-dVCRedistVersion=${MSVC_CRT_VERSION}
|
2017-06-27 18:56:45 +00:00
|
|
|
-dVCRedistDir=${MERGE_MODULE_DIR}
|
2018-03-06 23:29:34 +00:00
|
|
|
${d_smi_dir}
|
|
|
|
${d_mmdbresolve_exe}
|
2016-04-07 23:03:51 +00:00
|
|
|
-arch ${TARGET_MACHINE}
|
|
|
|
-ext WixUIExtension
|
|
|
|
-I${CMAKE_SOURCE_DIR}/packaging/wix
|
|
|
|
-out ${CMAKE_CURRENT_BINARY_DIR}/
|
|
|
|
PARENT_SCOPE
|
|
|
|
)
|
|
|
|
|
2016-07-28 23:51:36 +00:00
|
|
|
# The NSIS CMakeFile sets the program name + version slightly differently.
|
2016-04-07 23:03:51 +00:00
|
|
|
set(WIX_LIGHT_DEFINES
|
2018-12-19 20:40:21 +00:00
|
|
|
-v
|
2016-07-28 23:51:36 +00:00
|
|
|
-out ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${WIRESHARK_TARGET_PLATFORM}-${PROJECT_VERSION}.msi
|
2016-04-07 23:03:51 +00:00
|
|
|
-sw1076
|
|
|
|
-ext WixUIExtension
|
2016-09-07 21:53:10 +00:00
|
|
|
-loc ${CMAKE_CURRENT_SOURCE_DIR}/StringOverrides.wxl
|
2016-04-07 23:03:51 +00:00
|
|
|
PARENT_SCOPE
|
|
|
|
)
|
|
|
|
|
|
|
|
set(WIX_HEAT_FLAGS
|
2018-12-19 20:40:21 +00:00
|
|
|
-v
|
2016-04-07 23:03:51 +00:00
|
|
|
-ag
|
|
|
|
-nologo
|
|
|
|
-srd
|
|
|
|
-sreg
|
|
|
|
PARENT_SCOPE
|
|
|
|
)
|
|
|
|
|
|
|
|
macro( ADD_WIX_PACKAGE_TARGET )
|
2019-02-16 01:00:52 +00:00
|
|
|
#
|
2019-02-16 21:25:02 +00:00
|
|
|
# XXX - if we're not building Wireshark, we can't build
|
|
|
|
# QtDependentComponents.wxs.. On the other hand, if we're
|
|
|
|
# not building Wireshark, we have no need to include Qt
|
|
|
|
# in the installer, so it's not clear we need that file.
|
2019-02-16 01:00:52 +00:00
|
|
|
#
|
|
|
|
# This should probably be fixed, so that people can produce
|
|
|
|
# command-line-only installer packages.
|
2019-02-16 21:25:02 +00:00
|
|
|
if(BUILD_wireshark)
|
|
|
|
set (_wix_source_dir ${CMAKE_SOURCE_DIR}/packaging/wix )
|
|
|
|
set (_wix_binary_dir ${CMAKE_BINARY_DIR}/packaging/wix )
|
2016-04-07 23:03:51 +00:00
|
|
|
|
2019-02-16 21:25:02 +00:00
|
|
|
# QtDependentComponents.wxs. Created using Wireshark.exe.
|
|
|
|
add_custom_command(OUTPUT ${_wix_binary_dir}/QtDependentComponents.wxs
|
|
|
|
COMMAND set "PATH=${QT_BIN_PATH};%PATH%"
|
|
|
|
COMMAND ${POWERSHELL_COMMAND} "${_wix_source_dir}/windeployqt-to-wix.ps1"
|
|
|
|
-Executable $<TARGET_FILE:wireshark>
|
|
|
|
-FilePath ${_wix_binary_dir}/QtDependentComponents.wxs
|
2020-01-06 17:58:38 +00:00
|
|
|
DEPENDS "${_wix_source_dir}/windeployqt-to-wix.ps1"
|
2019-02-16 21:25:02 +00:00
|
|
|
)
|
2016-04-07 23:03:51 +00:00
|
|
|
|
2019-02-16 21:25:02 +00:00
|
|
|
# SNMPMibs.wxs. Collects all MIBs in "output" snmp/mibs
|
|
|
|
# directory. Generated with heat.exe
|
|
|
|
add_custom_command(OUTPUT ${_wix_binary_dir}/SNMPMibs.wxs
|
|
|
|
COMMAND ${WIX_HEAT_EXECUTABLE} dir ${ARCHIVE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}/snmp/mibs
|
|
|
|
${WIX_HEAT_FLAGS} -cg CG.Plugins.SNMP -dr dirSnmpMibs -var var.SnmpMibDir
|
|
|
|
-out ${_wix_binary_dir}/SNMPMibs.wxs
|
|
|
|
)
|
2016-04-07 23:03:51 +00:00
|
|
|
|
2019-02-16 21:25:02 +00:00
|
|
|
# RadiusDict.wxs. Collects all Radius dictionary files in
|
|
|
|
# "output" radius directory. Generated with heat.exe
|
|
|
|
add_custom_command(OUTPUT ${_wix_binary_dir}/RadiusDict.wxs
|
|
|
|
COMMAND ${WIX_HEAT_EXECUTABLE} dir ${ARCHIVE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}/radius
|
|
|
|
${WIX_HEAT_FLAGS} -cg CG.RadiusDict -dr dirRadius -var var.RadiusDictDir
|
|
|
|
-out ${_wix_binary_dir}/RadiusDict.wxs
|
|
|
|
)
|
2016-04-07 23:03:51 +00:00
|
|
|
|
2019-02-16 21:25:02 +00:00
|
|
|
# Diameter.wxs. Collects all Diameter XML dictionary files
|
|
|
|
# in "output" diameter directory. Generated with heat.exe
|
|
|
|
add_custom_command(OUTPUT ${_wix_binary_dir}/Diameter.wxs
|
|
|
|
COMMAND ${WIX_HEAT_EXECUTABLE} dir ${ARCHIVE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}/diameter
|
|
|
|
${WIX_HEAT_FLAGS} -cg CG.Diameter -dr dirDiameter -var var.DiameterDir
|
|
|
|
-out ${_wix_binary_dir}/Diameter.wxs
|
|
|
|
)
|
2016-04-07 23:03:51 +00:00
|
|
|
|
2019-02-16 21:25:02 +00:00
|
|
|
# QtTranslation.wxs. Collects all Qt translation files in
|
|
|
|
# "output" translations directory. Generated with heat.exe
|
|
|
|
add_custom_command(OUTPUT ${_wix_binary_dir}/QtTranslation.wxs
|
|
|
|
COMMAND ${WIX_HEAT_EXECUTABLE} dir ${ARCHIVE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}/translations
|
|
|
|
${WIX_HEAT_FLAGS} -cg CG.QtTranslations -dr dirTranslations -var var.QtTranslationDir
|
|
|
|
-out ${_wix_binary_dir}/QtTranslation.wxs
|
|
|
|
)
|
2016-04-07 23:03:51 +00:00
|
|
|
|
2019-02-16 21:25:02 +00:00
|
|
|
# Build WiX package dependencies. We build the package in
|
|
|
|
# two stages so that wix_package below doesn't trigger any
|
|
|
|
# dependencies that might clobber any signed executables.
|
|
|
|
add_custom_target(wix_package_prep
|
|
|
|
DEPENDS
|
|
|
|
${WIX_FILES}
|
|
|
|
copy_data_files
|
|
|
|
user_guide_chm
|
|
|
|
faq_html
|
|
|
|
)
|
2019-02-28 00:20:01 +00:00
|
|
|
set_target_properties(wix_package_prep PROPERTIES
|
|
|
|
FOLDER "Packaging"
|
|
|
|
EXCLUDE_FROM_DEFAULT_BUILD True
|
|
|
|
)
|
2016-04-07 23:03:51 +00:00
|
|
|
|
2019-02-16 21:25:02 +00:00
|
|
|
# Dump the installer into
|
|
|
|
# ${CMAKE_CURRENT_SOURCE_DIR}/packaging/wix
|
|
|
|
# Note that executables and DLLs *must* be built separately
|
|
|
|
add_custom_target(wix_package
|
2019-10-03 16:45:43 +00:00
|
|
|
COMMAND ${WIX_CANDLE_EXECUTABLE} ${WIX_CANDLE_DEFINES}
|
|
|
|
$<$<CONFIG:Debug>:-dBUNDLE_DEBUG_DLLS>
|
|
|
|
${WIX_SOURCE_FILES}
|
2019-02-16 21:25:02 +00:00
|
|
|
WORKING_DIRECTORY ${_wix_source_dir}
|
|
|
|
|
|
|
|
COMMAND ${WIX_LIGHT_EXECUTABLE} ${WIX_LIGHT_DEFINES} ${WIX_OUT_FILES}
|
|
|
|
WORKING_DIRECTORY ${_wix_binary_dir}
|
|
|
|
)
|
2019-02-28 00:20:01 +00:00
|
|
|
set_target_properties(wix_package PROPERTIES
|
|
|
|
FOLDER "Packaging"
|
|
|
|
EXCLUDE_FROM_DEFAULT_BUILD True
|
|
|
|
)
|
2019-02-16 21:25:02 +00:00
|
|
|
else()
|
|
|
|
message(WARNING "The WiX installer cannot be built if the Wireshark program isn't built.")
|
|
|
|
endif()
|
2016-04-07 23:03:51 +00:00
|
|
|
endmacro( ADD_WIX_PACKAGE_TARGET )
|
|
|
|
|
|
|
|
set(CLEAN_FILES
|
|
|
|
DependentComponents.wxs
|
|
|
|
QtDependentComponents.wxs
|
|
|
|
SNMPMibs.wxs
|
|
|
|
RadiusDict.wxs
|
|
|
|
Diameter.wxs
|
|
|
|
QtTranslation.wxs
|
|
|
|
#NEWS.txt
|
|
|
|
#user-guide.chm
|
|
|
|
wireshark-$(WIRESHARK_TARGET_PLATFORM)-$(VERSION).exe
|
|
|
|
)
|