Packaging: Add 64-bit PortableApps packages.

Build WiresharkPortable32 or WiresharkPortable64 as appropriate for our
target platform. Add WiresharkPortable64 steps to the Win64 builder.
Update the Developer's Guide. Fixes #17260.
This commit is contained in:
Gerald Combs 2021-06-19 14:36:10 -07:00 committed by Wireshark GitLab Utility
parent 1fe3ed4940
commit 6495e7da99
6 changed files with 34 additions and 24 deletions

View File

@ -324,6 +324,8 @@ Win64 Package:
- C:\gitlab-builds\bin\sign-files.ps1 -Path packaging\nsis
- msbuild /verbosity:minimal wix_package.vcxproj
- C:\gitlab-builds\bin\sign-files.ps1 -Path packaging\wix
- msbuild /verbosity:minimal portableapps_package.vcxproj
- C:\gitlab-builds\bin\sign-files.ps1 -Path packaging\portableapps
- $plugins = Get-ChildItem run\RelWithDebInfo\plugins\*\*.dll ; signtool verify /v /pa /all run\RelWithDebInfo\*.exe run\RelWithDebInfo\extcap\*.exe $plugins run\RelWithDebInfo\libwireshark.dll run\RelWithDebInfo\libwiretap.dll run\RelWithDebInfo\libwsutil.dll packaging\nsis\Wireshark-win??-*.exe packaging\wix\Wireshark-win??-*.msi
- msbuild /verbosity:minimal pdb_zip_package.vcxproj
- C:\gitlab-builds\bin\mse-scan.ps1

View File

@ -1096,7 +1096,7 @@ It might take some time, even on fast machines.
====
If everything went well, you will now find something like:
_WiresharkPortable_{wireshark-version}.paf.exe_ in
_WiresharkPortable64_{wireshark-version}.paf.exe_ in
the _packaging/portableapps_ directory.
[[ChSrcMimeTypes]]

View File

@ -989,7 +989,8 @@ Wiresharks .msi packaging is currently experimental and the generated package
=== Windows: PortableApps (Optional)
The PortableApps.com Installer is used to generate
_WiresharkPortable-{wireshark-version}.paf.exe_ from all the files
_WiresharkPortable64-{wireshark-version}.paf.exe_ and
_WiresharkPortable32-{wireshark-version}.paf.exe_ from all the files
needed to be installed, including all required DLLs, plugins, and supporting
files.
@ -1004,10 +1005,6 @@ To install it, do the following:
** PortableApps.com Launcher
** NSIS Portable (Unicode)
** PortableApps.com AppCompactor
You can find more instructions on using the PortableApps.com Installer in
<<ChSrcPortableApps>>.

View File

@ -7,10 +7,24 @@
# SPDX-License-Identifier: GPL-2.0-or-later
#
# To do:
# - Use CPack to generate the PortableApps package.
# PortableApps.com appears to use "FooAppPortable" for 32-bit packages
# and "FooAppPortable64" for 64-bit packages. We deviate from that here
# by always appending a bit suffix.
#
# PA.com also tends to ship 32-bit and 64-bit executables in combined
# packages. We don't do that because a) we're large and b) we build
# our 32-bit and 64-bit packages independently in separate pipelines.
set(PORTABLEAPPS_NAME "${CMAKE_PROJECT_NAME}Portable")
if(WIRESHARK_TARGET_PLATFORM STREQUAL "win32")
set(PORTABLEAPPS_BITS 32)
elseif(WIRESHARK_TARGET_PLATFORM STREQUAL "win64")
set(PORTABLEAPPS_BITS 64)
else()
message(FATAL_ERROR "Your mysterious moon-man architecture \"${WIRESHARK_TARGET_PLATFORM}\" frightens and confuses us.")
endif()
set(PORTABLEAPPS_BITS ${PORTABLEAPPS_BITS} PARENT_SCOPE)
set(PORTABLEAPPS_NAME "${CMAKE_PROJECT_NAME}Portable${PORTABLEAPPS_BITS}")
set(PORTABLEAPPS_NAME ${PORTABLEAPPS_NAME} PARENT_SCOPE)
set (_launcher_dir "${CMAKE_CURRENT_BINARY_DIR}/${PORTABLEAPPS_NAME}")
@ -66,7 +80,7 @@ macro( ADD_PORTABLEAPPS_PACKAGE_TARGET )
# 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/${PORTABLEAPPS_NAME}_${VERSION}.paf.exe)
add_custom_target(portableapps_package
DEPENDS
portableapps_runtime
@ -85,17 +99,14 @@ macro( ADD_PORTABLEAPPS_PACKAGE_TARGET )
)
foreach(_portableapps_dir ${PORTABLEAPPS_DIRS})
add_custom_command(OUTPUT ${_portableapps_dir}
COMMAND ${CMAKE_COMMAND} -E make_directory ${_portableapps_dir}
)
file(MAKE_DIRECTORY ${_portableapps_dir})
endforeach()
set(_portableapps_launcher_ini ${PORTABLEAPPS_LAUNCHER_STAGING_DIR}/App/AppInfo/Launcher/${PORTABLEAPPS_NAME}.ini)
add_custom_command(OUTPUT ${_portableapps_launcher_ini}
DEPENDS
${PORTABLEAPPS_DIRS}
${CMAKE_SOURCE_DIR}/packaging/portableapps/${PORTABLEAPPS_NAME}.ini
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/packaging/portableapps/${PORTABLEAPPS_NAME}.ini ${_portableapps_launcher_ini}
configure_file(
${CMAKE_SOURCE_DIR}/packaging/portableapps/${CMAKE_PROJECT_NAME}Portable.tmpl
${_portableapps_launcher_ini}
NEWLINE_STYLE WIN32
)
set(_portableapps_launcher_exe ${PORTABLEAPPS_LAUNCHER_STAGING_DIR}/${PORTABLEAPPS_NAME}.exe)
@ -114,8 +125,8 @@ macro( ADD_PORTABLEAPPS_PACKAGE_TARGET )
add_custom_command(OUTPUT ${_portableapps_package}
DEPENDS
${PORTABLEAPPS_DIRS}
${CMAKE_BINARY_DIR}/packaging/portableapps/appinfo.ini
${PORTABLEAPPS_LAUNCHER_STAGING_DIR}/App/AppInfo/appinfo.ini
${_portableapps_launcher_ini}
${_portableapps_launcher_exe}
COMMAND ${PORTABLEAPPS_INSTALLER_EXECUTABLE} ${_portableapps_native}
)

View File

@ -4,7 +4,7 @@ ProgramExecutable=Wireshark\Wireshark.exe
SinglePortableAppInstance=false
SingleAppInstance=false
WaitForProgram=false
MinOS=Vista
MinOS=7
[Environment]
WIRESHARK_APPDATA=%PAL:DataDir%

View File

@ -3,8 +3,8 @@ Type=PortableApps.comFormat
Version=3.0
[Details]
Name=Wireshark Portable
AppID=WiresharkPortable
Name=Wireshark Portable (@PORTABLEAPPS_BITS@-bit)
AppID=@PORTABLEAPPS_NAME@
Publisher=Wireshark.org
Homepage=https://www.wireshark.org/
Category=Internet
@ -24,4 +24,4 @@ DisplayVersion=@VERSION@
[Control]
Icons=1
Start=WiresharkPortable.exe
Start=@PORTABLEAPPS_NAME@.exe