Skip to content

Allow building with Qt without Xcode on macOS

Added checks for Qt install, reducing the need to have XCode fully installed to build Wireshark. Closes #18019 (closed)

Description

Currently, Qt specifies as a requirement that the full Xcode (11 or 12) is running on a macOS machine. However, there is seems to be a way to build Qt with only the Xcode command line tools installed. This method is specified in the link below. I managed to build Qt and Wireshark successfully. I also made some minor changes to the macos-setup.sh to run the command xcrun on line 3528 (which checks for both Xcode and Xcode command line tools) and added a check if Qt was already installed on lines 3544 to 3547:

if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
    :
elif qmake --version >/dev/null 2>&1; then
    :
else
    echo "Please install Xcode first ... or build Qt according to (insert link)

It would still be better to just install Xcode since it is probably more stable. However, it does give macOS developers with storage limitations the option to build Wireshark without having to install the full Xcode application

Links / references / protocol specifications

https://gist.github.com/shoogle/750a330c851bd1a924dfe1346b0b4a08#:~:text=MacOS%2FQt%5C%20Creator-,Go%20to%20Qt%20Creator%20%3E%20Preferences%20%3E%20Build%20%26%20Run%20%3E%20Kits,for%20both%20compilers%2C%20not%20gcc%20.

enhancement

Closes #18019 (closed)

Edited by Kenrick Trip

Merge request reports