diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:34:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:34:10 +0000 |
commit | e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc (patch) | |
tree | 68cb5ef9081156392f1dd62a00c6ccc1451b93df /packaging/portableapps | |
parent | Initial commit. (diff) | |
download | wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.tar.xz wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.zip |
Adding upstream version 4.2.2.upstream/4.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/portableapps')
-rw-r--r-- | packaging/portableapps/CMakeLists.txt | 133 | ||||
-rw-r--r-- | packaging/portableapps/WiresharkPortable.tmpl | 10 | ||||
-rw-r--r-- | packaging/portableapps/appinfo.tmpl | 27 | ||||
-rw-r--r-- | packaging/portableapps/help.html | 8 | ||||
-rw-r--r-- | packaging/portableapps/readme.txt | 45 | ||||
-rw-r--r-- | packaging/portableapps/xcopy-deploy-exclude.txt | 10 |
6 files changed, 233 insertions, 0 deletions
diff --git a/packaging/portableapps/CMakeLists.txt b/packaging/portableapps/CMakeLists.txt new file mode 100644 index 00000000..ad84fd12 --- /dev/null +++ b/packaging/portableapps/CMakeLists.txt @@ -0,0 +1,133 @@ +# CMakeLists.txt +# +# Wireshark - Network traffic analyzer +# By Gerald Combs <gerald@wireshark.org> +# Copyright 1998 Gerald Combs +# +# SPDX-License-Identifier: GPL-2.0-or-later +# + +# 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_BITS 64) +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}") +set (PORTABLEAPPS_LAUNCHER_STAGING_DIR ${_launcher_dir} PARENT_SCOPE) + +set(PORTABLEAPPS_DIRS + ${_launcher_dir} + ${_launcher_dir}/App + ${_launcher_dir}/App/AppInfo + ${_launcher_dir}/App/AppInfo/Launcher + ${_launcher_dir}/Data + ${_launcher_dir}/Other + ${_launcher_dir}/Other/Source + PARENT_SCOPE +) + +macro( ADD_PORTABLEAPPS_PACKAGE_TARGET ) + # Copy our binaries, libraries, and data files to the PortableApps build directory. + set(_wireshark_portableapps_app_dir "${PORTABLEAPPS_LAUNCHER_STAGING_DIR}/App/${CMAKE_PROJECT_NAME}") + file(TO_NATIVE_PATH "${_wireshark_portableapps_app_dir}" _wireshark_portableapps_app_dir_native) + file(TO_NATIVE_PATH "${DATAFILE_DIR}" _datafile_dir_native) + file(TO_NATIVE_PATH "${CMAKE_SOURCE_DIR}/packaging/portableapps/xcopy-deploy-exclude.txt" _xcopy_deploy_exclude) + + add_custom_target(wireshark_portableapps_app_dir + # We "Deploy using XCopy," which is described at + # https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2008/ms235291(v=vs.90) + # We also assume that the project has been built at this point. + COMMAND ${CMAKE_COMMAND} -E remove_directory ${_wireshark_portableapps_app_dir} + COMMAND ${CMAKE_COMMAND} -E make_directory ${_wireshark_portableapps_app_dir} + COMMAND xcopy ${_datafile_dir_native} ${_wireshark_portableapps_app_dir_native} /D /I /E /Y /exclude:${_xcopy_deploy_exclude} + ) + + set_target_properties(wireshark_portableapps_app_dir PROPERTIES + FOLDER "Packaging" + EXCLUDE_FROM_DEFAULT_BUILD True + ) + + if(MSVCR_DLL) + add_custom_target(wireshark_portableapps_runtime + COMMAND xcopy "${MSVCR_DLL}" ${_wireshark_portableapps_app_dir_native} /D /I /Y + ) + else(MSVCR_DLL) + add_custom_target(wireshark_portableapps_runtime + COMMAND ${CMAKE_COMMAND} -E echo "C Runtime MUST be installed on target system." + ) + endif(MSVCR_DLL) + + set_target_properties(wireshark_portableapps_runtime PROPERTIES + FOLDER "Packaging" + EXCLUDE_FROM_DEFAULT_BUILD True + ) + add_dependencies(wireshark_portableapps_runtime wireshark_portableapps_app_dir) + + # Build the PortableApps package. + # wireshark_nsis_prep must be built prior to this. + # XXX Rename this to wireshark_portableapps + set (_portableapps_package ${CMAKE_BINARY_DIR}/packaging/portableapps/${PORTABLEAPPS_NAME}_${PROJECT_VERSION}.paf.exe) + add_custom_target(wireshark_portableapps + DEPENDS + wireshark_portableapps_runtime + ${_portableapps_package} + ) + set_target_properties(wireshark_portableapps PROPERTIES + FOLDER "Packaging" + EXCLUDE_FROM_DEFAULT_BUILD True + ) + + set(PORTABLEAPPS_PACKAGE_VERSION "${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT_PATCH_VERSION}.0") + configure_file( + ${CMAKE_SOURCE_DIR}/packaging/portableapps/appinfo.tmpl + ${PORTABLEAPPS_LAUNCHER_STAGING_DIR}/App/AppInfo/appinfo.ini + NEWLINE_STYLE WIN32 + ) + + foreach(_portableapps_dir ${PORTABLEAPPS_DIRS}) + file(MAKE_DIRECTORY ${_portableapps_dir}) + endforeach() + + set(_portableapps_launcher_ini ${PORTABLEAPPS_LAUNCHER_STAGING_DIR}/App/AppInfo/Launcher/${PORTABLEAPPS_NAME}.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) + file(TO_NATIVE_PATH "${PORTABLEAPPS_LAUNCHER_STAGING_DIR}" _portableapps_native ) + add_custom_command(OUTPUT ${_portableapps_launcher_exe} + DEPENDS + ${_portableapps_launcher_ini} + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/packaging/portableapps/help.html ${PORTABLEAPPS_LAUNCHER_STAGING_DIR}/help.html + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/packaging/portableapps/help.html ${PORTABLEAPPS_LAUNCHER_STAGING_DIR}/help.html + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/resources/icons/wireshark.ico ${PORTABLEAPPS_LAUNCHER_STAGING_DIR}/App/AppInfo/appicon.ico + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/resources/icons/wsicon16.png ${PORTABLEAPPS_LAUNCHER_STAGING_DIR}/App/AppInfo/appicon_16.png + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/resources/icons/wsicon32.png ${PORTABLEAPPS_LAUNCHER_STAGING_DIR}/App/AppInfo/appicon_32.png + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/resources/icons/wsicon128.png ${PORTABLEAPPS_LAUNCHER_STAGING_DIR}/App/AppInfo/appicon_128.png + COMMAND ${PORTABLEAPPS_LAUNCHER_GENERATOR_EXECUTABLE} ${_portableapps_native} + ) + + add_custom_command(OUTPUT ${_portableapps_package} + DEPENDS + ${PORTABLEAPPS_LAUNCHER_STAGING_DIR}/App/AppInfo/appinfo.ini + ${_portableapps_launcher_ini} + ${_portableapps_launcher_exe} + COMMAND ${PORTABLEAPPS_INSTALLER_EXECUTABLE} ${_portableapps_native} + ) +endmacro( ADD_PORTABLEAPPS_PACKAGE_TARGET ) + +#set(CLEAN_FILES +# ${_launcher_dir} +# ${_portableapps_package} +#) diff --git a/packaging/portableapps/WiresharkPortable.tmpl b/packaging/portableapps/WiresharkPortable.tmpl new file mode 100644 index 00000000..52dc3ba0 --- /dev/null +++ b/packaging/portableapps/WiresharkPortable.tmpl @@ -0,0 +1,10 @@ +# https://portableapps.com/manuals/PortableApps.comLauncher/ref/launcher.ini/launch.html +[Launch] +ProgramExecutable=Wireshark\Wireshark.exe +SinglePortableAppInstance=false +SingleAppInstance=false +WaitForProgram=false +MinOS=7 + +[Environment] +WIRESHARK_APPDATA=%PAL:DataDir% diff --git a/packaging/portableapps/appinfo.tmpl b/packaging/portableapps/appinfo.tmpl new file mode 100644 index 00000000..1e690e2f --- /dev/null +++ b/packaging/portableapps/appinfo.tmpl @@ -0,0 +1,27 @@ +[Format] +Type=PortableApps.comFormat +Version=3.0 + +[Details] +Name=Wireshark Portable (@PORTABLEAPPS_BITS@-bit) +AppID=@PORTABLEAPPS_NAME@ +Publisher=Wireshark.org +Homepage=https://www.wireshark.org/ +Category=Internet +Description=Wireshark is one of the world's foremost network protocol analyzers. +Language=Multilingual +Trademarks=Wireshark and the fin logo are registered trademarks of the Wireshark Foundation + +[License] +Shareable=true +OpenSource=true +Freeware=true +CommercialUse=true + +[Version] +PackageVersion=@PORTABLEAPPS_PACKAGE_VERSION@ +DisplayVersion=@PROJECT_VERSION@ + +[Control] +Icons=1 +Start=@PORTABLEAPPS_NAME@.exe diff --git a/packaging/portableapps/help.html b/packaging/portableapps/help.html new file mode 100644 index 00000000..35dae9b0 --- /dev/null +++ b/packaging/portableapps/help.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<html> +<head> +<title>Wireshark Portable ยท Help</title> +</head> +<body> +Please see <a href="https://www.wireshark.org/docs/">the online documentation</a>. +</body>
\ No newline at end of file diff --git a/packaging/portableapps/readme.txt b/packaging/portableapps/readme.txt new file mode 100644 index 00000000..bfb871ec --- /dev/null +++ b/packaging/portableapps/readme.txt @@ -0,0 +1,45 @@ +Portable Wireshark +================== + +This directory contains experimental packaging for running Wireshark under the Portable Apps +(https://portableapps.com). + +Currently only an additional menu item for Wireshark is added - the other tools could be added to Portable Apps menu if required. + +WinPcap +======= + +If you want to capture packets, then WinPcap needs to be installed. Wireshark Portable will try and install WinPcap if it doesn't find it installed on the local machine. If it does install it, it will uninstall it when Wireshark Portable quits. +A quieter install/de-install for WinPcap would help matters - but ultimately a minimal installation mechanism needs to be identified for WinPcap. But that is not for the Wireshark forum. + +NSIS +==== + +The Portable Apps packaging uses the NullSoft Scriptable Installer System (NSIS) to create a installation package to install onto the USB drive, and a launcher to launch Wireshark from the USB drive. + +NSIS is used by the standard Win32 installation mechanism (packaging/nsis) but an additional plug-in is required for the Wireshark Portable launcher. This is now automatically downloaded and installed from the wireshark-win32-libs repository. + +INI Settings +============ +The Wireshark Portable Launcher will look for an ini file called WiresharkPortable.ini within its directory. It is only necessary to have a ini file if you wish to change the default configuration. +There is an example INI included with this package to get you started. The INI file is formatted as follows: + +[WiresharkPortable] +WiresharkDirectory +WiresharkExecutable +AdditionalParameters +DisableWinPcapInstall +WinPcapInstaller +MSVCRedist + +The WiresharkDirectory entry should be set to the *relative* path to the directory containing the Wireshark Portable Launcher (WiresharkPortable.exe). This entry must be present. + +The WiresharkExecutable entry allows you to set the Wireshark Portable Launcher to use an alternate EXE call to launch Wireshark. + +The AdditionalParameters entry allows you to pass additional commandline parameter entries to wireshark.exe. + +The DisableWinPcapInstall allows you to disable the installation of WinPcap, even if it it not present on the host system. + +The WinPcapInstaller allows you to specify a different WinPcap installer than the default one included in the distribution. For example, if you download a later version. + +The MSVCRedist allows you to specify a different redistributable package to be used than the default one included in the distribution. diff --git a/packaging/portableapps/xcopy-deploy-exclude.txt b/packaging/portableapps/xcopy-deploy-exclude.txt new file mode 100644 index 00000000..90de79fa --- /dev/null +++ b/packaging/portableapps/xcopy-deploy-exclude.txt @@ -0,0 +1,10 @@ +.exp +.ilk +.lib +.pdb +fuzzshark.exe +idl2wrs.exe +lemon.exe +make- +test.exe +uninstall.exe |