Commit 46561910 authored by Gerald Combs's avatar Gerald Combs

CMake: Update the macOS wrapper script behavior.

CMake on macOS creates a convenience wrapper (run/wireshark) that runs
run/Wireshark.app/Contents/MacOS/Wireshark. Have it run the executable
using "exec" instead of opening the bundle using "open" so that
Wireshark runs in the foreground.

Change-Id: I295ce0681da75678e5e01781e9c8fb58e2236fc9
Reviewed-on: https://code.wireshark.org/review/16196
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: 's avatarPetri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: 's avatarGerald Combs <gerald@wireshark.org>
parent ceae9e4d
......@@ -1844,7 +1844,8 @@ if(BUILD_wireshark AND QT_FOUND)
# convenience but makes debugging more difficult.
file(REMOVE ${CMAKE_BINARY_DIR}/run/wireshark)
file(WRITE ${CMAKE_BINARY_DIR}/run/wireshark "#!/bin/sh\n")
file(APPEND ${CMAKE_BINARY_DIR}/run/wireshark "open ${CMAKE_BINARY_DIR}/run/Wireshark.app --args \"\$\@\"\n")
file(APPEND ${CMAKE_BINARY_DIR}/run/wireshark "# Generated by ${CMAKE_CURRENT_LIST_FILE}\n")
file(APPEND ${CMAKE_BINARY_DIR}/run/wireshark "exec ${CMAKE_BINARY_DIR}/run/Wireshark.app/Contents/MacOS/Wireshark \"\$\@\"\n")
execute_process(COMMAND chmod a+x ${CMAKE_BINARY_DIR}/run/wireshark)
endif()
......
......@@ -117,6 +117,9 @@ How to do an out of tree build using Visual C++ 2013:
build dir and start form step 2) again.
6) The executables can be run from the appropriate directory, e.g. run\RelWithDebInfo for VS solutions
or run\ for NMake files.
On macOS CMake creates an application bundle by default and places executables in
run/Wireshark.app/Contents/MacOS. It also creates a convenience wrapper script
(run/wireshark) which will run the Wireshark executable in the bundle.
7) To build an installer, build the nsis_package_prep and then the nsis_package projects, e.g.
msbuild /m /p:Configuration=RelWithDebInfo nsis_package_prep.vcxproj
msbuild /m /p:Configuration=RelWithDebInfo nsis_package.vcxproj
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment