diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cffe1a878c..6e9c50fd18 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/docbook/wsdg_src/WSDG_chapter_sources.adoc b/docbook/wsdg_src/WSDG_chapter_sources.adoc index bad8cb8638..f627798e22 100644 --- a/docbook/wsdg_src/WSDG_chapter_sources.adoc +++ b/docbook/wsdg_src/WSDG_chapter_sources.adoc @@ -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]] diff --git a/docbook/wsdg_src/WSDG_chapter_tools.adoc b/docbook/wsdg_src/WSDG_chapter_tools.adoc index 814e99efff..1e8c84d65b 100644 --- a/docbook/wsdg_src/WSDG_chapter_tools.adoc +++ b/docbook/wsdg_src/WSDG_chapter_tools.adoc @@ -989,7 +989,8 @@ Wireshark’s .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 <>. diff --git a/packaging/portableapps/CMakeLists.txt b/packaging/portableapps/CMakeLists.txt index 6d7f06db0d..92c87534f7 100644 --- a/packaging/portableapps/CMakeLists.txt +++ b/packaging/portableapps/CMakeLists.txt @@ -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} ) diff --git a/packaging/portableapps/WiresharkPortable.ini b/packaging/portableapps/WiresharkPortable.tmpl similarity index 95% rename from packaging/portableapps/WiresharkPortable.ini rename to packaging/portableapps/WiresharkPortable.tmpl index 0dc281d299..52dc3ba0cb 100644 --- a/packaging/portableapps/WiresharkPortable.ini +++ b/packaging/portableapps/WiresharkPortable.tmpl @@ -4,7 +4,7 @@ ProgramExecutable=Wireshark\Wireshark.exe SinglePortableAppInstance=false SingleAppInstance=false WaitForProgram=false -MinOS=Vista +MinOS=7 [Environment] WIRESHARK_APPDATA=%PAL:DataDir% diff --git a/packaging/portableapps/appinfo.tmpl b/packaging/portableapps/appinfo.tmpl index 9847caadde..2dba02a9d6 100644 --- a/packaging/portableapps/appinfo.tmpl +++ b/packaging/portableapps/appinfo.tmpl @@ -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