diff --git a/docbook/wsdg_src/WSDG_chapter_sources.asciidoc b/docbook/wsdg_src/WSDG_chapter_sources.asciidoc index 5f40854ebf..842aba3fb7 100644 --- a/docbook/wsdg_src/WSDG_chapter_sources.asciidoc +++ b/docbook/wsdg_src/WSDG_chapter_sources.asciidoc @@ -1135,11 +1135,19 @@ based systems; instructions how to install it can be found in <>. NSIS is script based, you will find the Wireshark installer generation script at: 'packaging/nsis/wireshark.nsi'. -You will probably have to modify the MAKENSIS setting in the -'config.nmake' file to specify where the NSIS binaries -are installed. +When building with CMake you must first build the 'nsis_package_prep' target, +followed by the 'nsis_package' target, e.g. -In the top-level source directory type: +---- +> msbuild nsis_package_prep.vcxproj +> msbuild nsis_package.vcxproj +---- + +Splitting the packaging projects in this way allows for code signing. + +For Nmake you will probably have to modify the MAKENSIS setting in the +'config.nmake' file to specify where the NSIS binaries are installed. In the +top-level source directory type: ---- > nmake -f makefile.nmake packaging @@ -1173,7 +1181,16 @@ will place it in `C:\PortableApps`. Add the following apps: - PortableApps.com Launcher - PortableApps.com AppCompactor -In the top-level source directory type: +When building with CMake you must first build the 'nsis_package_prep' target +(which takes care of general packaging dependencies), followed by the +'portableapps_package' target, e.g. + +---- +> msbuild nsis_package_prep.vcxproj +> msbuild portableapps_package.vcxproj +---- + +For Nmake, type the following in the top-level source directory ---- > nmake -f makefile.nmake packaging_papps diff --git a/packaging/nsis/CMakeLists.txt b/packaging/nsis/CMakeLists.txt index e72432b145..70791363f2 100644 --- a/packaging/nsis/CMakeLists.txt +++ b/packaging/nsis/CMakeLists.txt @@ -187,10 +187,6 @@ macro( ADD_NSIS_UNINSTALLER_TARGET ) set (_nsis_source_dir ${CMAKE_SOURCE_DIR}/packaging/nsis ) set (_nsis_binary_dir ${CMAKE_BINARY_DIR}/packaging/nsis ) - add_custom_target(nsis_uninstaller - DEPENDS ${DATAFILE_DIR}/uninstall.exe - ) - set_target_properties(nsis_uninstaller PROPERTIES FOLDER "Packaging") add_custom_command(OUTPUT ${DATAFILE_DIR}/uninstall.exe DEPENDS ${_nsis_source_dir}/uninstall.nsi ${_nsis_source_dir}/common.nsh @@ -203,13 +199,8 @@ macro( ADD_NSIS_UNINSTALLER_TARGET ) endmacro( ADD_NSIS_UNINSTALLER_TARGET ) macro( ADD_NSIS_PACKAGE_TARGET ) - set (_nsis_package ${CMAKE_BINARY_DIR}/packaging/nsis/Wireshark-$(WIRESHARK_TARGET_PLATFORM)-$(VERSION).exe) + #set (_nsis_package ${CMAKE_BINARY_DIR}/packaging/nsis/Wireshark-$(WIRESHARK_TARGET_PLATFORM)-$(VERSION).exe) - add_custom_target(nsis_package - DEPENDS - ${_nsis_package} - ) - set_target_properties(nsis_package PROPERTIES FOLDER "Packaging") # qt-dll-manifest.nsh. Created using Wireshark.exe. add_custom_command(OUTPUT ${_nsis_binary_dir}/qt-dll-manifest.nsh COMMAND set "PATH=%PATH%;${QT_BIN_PATH}" @@ -217,24 +208,28 @@ macro( ADD_NSIS_PACKAGE_TARGET ) -Executable $ -FilePath ${_nsis_binary_dir}/qt-dll-manifest.nsh ) - # Dump the installer into ${CMAKE_CURRENT_SOURCE_DIR}/packaging/nsis to match - # the NMake environment for now. - add_custom_command(OUTPUT ${_nsis_package} + + # Build NSIS package dependencies. We build the package in two stages + # so that nsis_package below doesn't trigger any dependencies that + # might clobber any signed executables. + add_custom_target(nsis_package_prep DEPENDS ${NSIS_FILES} - ${PROGLIST} - plugins copy_data_files user_guides ${CMAKE_BINARY_DIR}/docbook/user-guide.chm - # We depend on the uninstaller target and not the - # file itself, otherwise uninstall.exe will get - # clobbered. - nsis_uninstaller + ${DATAFILE_DIR}/uninstall.exe + ) + + # Dump the installer into ${CMAKE_CURRENT_SOURCE_DIR}/packaging/nsis to match + # the NMake environment for now. + # Note that executables and DLLs *must* be built separately + add_custom_target(nsis_package COMMAND ${MAKENSIS_EXECUTABLE} ${NSIS_DEFINES} wireshark.nsi WORKING_DIRECTORY ${_nsis_source_dir} ) + set_target_properties(nsis_package PROPERTIES FOLDER "Packaging") endmacro( ADD_NSIS_PACKAGE_TARGET ) set(CLEAN_FILES diff --git a/packaging/portableapps/CMakeLists.txt b/packaging/portableapps/CMakeLists.txt index d401224aeb..38c428598d 100644 --- a/packaging/portableapps/CMakeLists.txt +++ b/packaging/portableapps/CMakeLists.txt @@ -57,13 +57,13 @@ macro( ADD_PORTABLEAPPS_PACKAGE_TARGET ) ) set_target_properties(portableapps_app_dir PROPERTIES FOLDER "Packaging") - #Build the PortableApps package. + # Build the PortableApps package. + # nsis_package_prep must be built prior to this. set (_portableapps_package ${CMAKE_BINARY_DIR}/packaging/portableapps/WiresharkPortable_$(VERSION).exe) add_custom_target(portableapps_package DEPENDS portableapps_app_dir ${_portableapps_package} - nsis_uninstaller ) set_target_properties(portableapps_package PROPERTIES FOLDER "Packaging")