Don't allow NSIS or WiX installers if we aren't building Wireshark.
In both cases, a file used in the process of building the installer is generated from the Wireshark binary, so, unless we also arrange not to put that file in the installer if Wireshark isn't being built, we can't build the installer. Have ADD_NSIS_PACKAGE_TARGET and ADD_WIX_PACKAGE_TARGET check whether we're building Wireshark and fail if we aren't. That way, *if* we're including the NSIS or WiX packages in the build files, we fail if we aren't building Wireshark. Change-Id: Icfe4d2491bd721cdd5fef424e9a7565c4990defa Reviewed-on: https://code.wireshark.org/review/32053 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
751ab080eb
commit
7770ad93e2
|
@ -189,6 +189,17 @@ macro( ADD_NSIS_PACKAGE_TARGET )
|
|||
#set (_nsis_package ${CMAKE_BINARY_DIR}/packaging/nsis/Wireshark-$(WIRESHARK_TARGET_PLATFORM)-$(VERSION).exe)
|
||||
|
||||
# qt-dll-manifest.nsh. Created using Wireshark.exe.
|
||||
#
|
||||
# XXX - if we're not building Wireshark, we can't build this
|
||||
# manifest. 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 this manifest.
|
||||
#
|
||||
# This should probably be fixed, so that people can produce
|
||||
# command-line-only installer packages.
|
||||
if(NOT BUILD_wireshark)
|
||||
message(FATAL_ERROR "The NSIS installer cannot be built if the Wireshark program isn't built.")
|
||||
endif()
|
||||
add_custom_command(OUTPUT ${_nsis_binary_dir}/qt-dll-manifest.nsh
|
||||
COMMAND set "PATH=${QT_BIN_PATH};%PATH%"
|
||||
COMMAND ${POWERSHELL_COMMAND} "${_nsis_source_dir}/windeployqt-to-nsis.ps1"
|
||||
|
|
|
@ -221,6 +221,17 @@ macro( ADD_WIX_PACKAGE_TARGET )
|
|||
set (_wix_binary_dir ${CMAKE_BINARY_DIR}/packaging/wix )
|
||||
|
||||
# QtDependentComponents.wxs. Created using Wireshark.exe.
|
||||
#
|
||||
# XXX - if we're not building Wireshark, we can't build this
|
||||
# manifest. 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 this manifest.
|
||||
#
|
||||
# This should probably be fixed, so that people can produce
|
||||
# command-line-only installer packages.
|
||||
if(NOT BUILD_wireshark)
|
||||
message(FATAL_ERROR "The WiX installer cannot be built if the Wireshark program isn't built.")
|
||||
endif()
|
||||
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"
|
||||
|
|
Loading…
Reference in New Issue