Try to fix NSIS packaging dependencies.

Split the nsis_package target into nsis_package_prep which has
dependencies and nsis_package which has no dependencies and as a result
blindly builds the package. Remove the nsis_uninstaller target since
that's now handled by nsis_package_prep. Nsis_package_prep *should*
also take care of the dependencies for portableapps_package, but that
hasn't been tested.

Update the Developer's Guide.

This requires coordination with the Windows buildbots.

Change-Id: Ib9e3141832c782355135a1637fba5a07c2ca4ba1
Reviewed-on: https://code.wireshark.org/review/9217
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Gerald Combs 2015-06-29 10:00:37 -07:00
parent df62a1b1e9
commit 5ae8c92aa0
3 changed files with 38 additions and 26 deletions

View File

@ -1135,11 +1135,19 @@ based systems; instructions how to install it can be found in <<ChToolsNSIS>>.
NSIS is script based, you will find the Wireshark installer NSIS is script based, you will find the Wireshark installer
generation script at: 'packaging/nsis/wireshark.nsi'. generation script at: 'packaging/nsis/wireshark.nsi'.
You will probably have to modify the MAKENSIS setting in the When building with CMake you must first build the 'nsis_package_prep' target,
'config.nmake' file to specify where the NSIS binaries followed by the 'nsis_package' target, e.g.
are installed.
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 > nmake -f makefile.nmake packaging
@ -1173,7 +1181,16 @@ will place it in `C:\PortableApps`. Add the following apps:
- PortableApps.com Launcher - PortableApps.com Launcher
- PortableApps.com AppCompactor - 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 > nmake -f makefile.nmake packaging_papps

View File

@ -187,10 +187,6 @@ macro( ADD_NSIS_UNINSTALLER_TARGET )
set (_nsis_source_dir ${CMAKE_SOURCE_DIR}/packaging/nsis ) set (_nsis_source_dir ${CMAKE_SOURCE_DIR}/packaging/nsis )
set (_nsis_binary_dir ${CMAKE_BINARY_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 add_custom_command(OUTPUT ${DATAFILE_DIR}/uninstall.exe
DEPENDS ${_nsis_source_dir}/uninstall.nsi DEPENDS ${_nsis_source_dir}/uninstall.nsi
${_nsis_source_dir}/common.nsh ${_nsis_source_dir}/common.nsh
@ -203,13 +199,8 @@ macro( ADD_NSIS_UNINSTALLER_TARGET )
endmacro( ADD_NSIS_UNINSTALLER_TARGET ) endmacro( ADD_NSIS_UNINSTALLER_TARGET )
macro( ADD_NSIS_PACKAGE_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. # qt-dll-manifest.nsh. Created using Wireshark.exe.
add_custom_command(OUTPUT ${_nsis_binary_dir}/qt-dll-manifest.nsh add_custom_command(OUTPUT ${_nsis_binary_dir}/qt-dll-manifest.nsh
COMMAND set "PATH=%PATH%;${QT_BIN_PATH}" COMMAND set "PATH=%PATH%;${QT_BIN_PATH}"
@ -217,24 +208,28 @@ macro( ADD_NSIS_PACKAGE_TARGET )
-Executable $<TARGET_FILE:wireshark> -Executable $<TARGET_FILE:wireshark>
-FilePath ${_nsis_binary_dir}/qt-dll-manifest.nsh -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. # Build NSIS package dependencies. We build the package in two stages
add_custom_command(OUTPUT ${_nsis_package} # so that nsis_package below doesn't trigger any dependencies that
# might clobber any signed executables.
add_custom_target(nsis_package_prep
DEPENDS DEPENDS
${NSIS_FILES} ${NSIS_FILES}
${PROGLIST}
plugins
copy_data_files copy_data_files
user_guides user_guides
${CMAKE_BINARY_DIR}/docbook/user-guide.chm ${CMAKE_BINARY_DIR}/docbook/user-guide.chm
# We depend on the uninstaller target and not the ${DATAFILE_DIR}/uninstall.exe
# file itself, otherwise uninstall.exe will get )
# clobbered.
nsis_uninstaller # 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} COMMAND ${MAKENSIS_EXECUTABLE} ${NSIS_DEFINES}
wireshark.nsi wireshark.nsi
WORKING_DIRECTORY ${_nsis_source_dir} WORKING_DIRECTORY ${_nsis_source_dir}
) )
set_target_properties(nsis_package PROPERTIES FOLDER "Packaging")
endmacro( ADD_NSIS_PACKAGE_TARGET ) endmacro( ADD_NSIS_PACKAGE_TARGET )
set(CLEAN_FILES set(CLEAN_FILES

View File

@ -57,13 +57,13 @@ macro( ADD_PORTABLEAPPS_PACKAGE_TARGET )
) )
set_target_properties(portableapps_app_dir PROPERTIES FOLDER "Packaging") 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) set (_portableapps_package ${CMAKE_BINARY_DIR}/packaging/portableapps/WiresharkPortable_$(VERSION).exe)
add_custom_target(portableapps_package add_custom_target(portableapps_package
DEPENDS DEPENDS
portableapps_app_dir portableapps_app_dir
${_portableapps_package} ${_portableapps_package}
nsis_uninstaller
) )
set_target_properties(portableapps_package PROPERTIES FOLDER "Packaging") set_target_properties(portableapps_package PROPERTIES FOLDER "Packaging")