summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2016-06-28 10:35:27 -0700
committerGerald Combs <gerald@wireshark.org>2016-06-29 18:11:59 +0000
commit46561910f4372ac9fc591bb225298bee7e2879b8 (patch)
treea4105d4f2bc5ba5c9f05679c84d4c04fcfb2fe42
parentceae9e4d1fff4500b285dba021c3f239ff87779e (diff)
downloadwireshark-46561910f4372ac9fc591bb225298bee7e2879b8.tar.gz
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: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
-rw-r--r--CMakeLists.txt3
-rw-r--r--README.cmake3
2 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e8c7bd5a29..c79ee445fa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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()
diff --git a/README.cmake b/README.cmake
index 5d798f5697..5ac018c651 100644
--- a/README.cmake
+++ b/README.cmake
@@ -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