mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-01-06 00:56:13 +00:00
3cc12dfbe7
The current implementation of service publication on macOS uses `avahi-client`, but the majority of macOS machines do not have Avahi installed because macOS provides a native alternative (`mDNSresponder`), meaning that there is no reason to install Avahi. The current implementation also attempts to load the Avahi client libraries using `dlopen(3)`, which has a variety of restrictions on macOS, such as only being willing to load from certain directories. Depending on where the Avahi binaries are installed, they might not be loadable through the current invocation of `dlopen(3)`. Instead of using an Avahi client on macOS, it makes more sense to use the native macOS API for publishing services via `mDNSresponder`. This commit supplies such an implementation that uses the macOS native API. It also has the advantage of being much simpler than the previous implementation. Furthermore, this new implementation works on all macOS machines, because it relies only on native APIs, rather than on third-party software that is not commonly installed on macOS.
54 lines
1.3 KiB
ReStructuredText
54 lines
1.3 KiB
ReStructuredText
macOS
|
|
=====
|
|
|
|
Requirements
|
|
------------
|
|
macOS Big Sur and Xcode 12.5+
|
|
|
|
Use either `MacPorts <https://www.macports.org>`__ or `Homebrew <https://brew.sh>`__
|
|
|
|
MacPorts
|
|
""""""""
|
|
Install Requirements
|
|
.. code-block:: bash
|
|
|
|
sudo port install cmake curl doxygen graphviz libopus miniupnpc npm9 pkgconfig python311 py311-pip
|
|
|
|
Homebrew
|
|
""""""""
|
|
Install Requirements
|
|
.. code-block:: bash
|
|
|
|
brew install cmake doxygen graphviz icu4c miniupnpc node openssl@3 opus pkg-config python@3.11
|
|
|
|
If there are issues with an SSL header that is not found:
|
|
.. tab:: Intel
|
|
|
|
.. code-block:: bash
|
|
|
|
pushd /usr/local/include
|
|
ln -s ../opt/openssl/include/openssl .
|
|
popd
|
|
|
|
.. tab:: Apple Silicon
|
|
|
|
.. code-block:: bash
|
|
|
|
pushd /opt/homebrew/include
|
|
ln -s ../opt/openssl/include/openssl .
|
|
popd
|
|
|
|
Build
|
|
-----
|
|
.. attention:: Ensure you are in the build directory created during the clone step earlier before continuing.
|
|
|
|
.. code-block:: bash
|
|
|
|
cmake ..
|
|
make -j $(sysctl -n hw.ncpu)
|
|
|
|
cpack -G DragNDrop # optionally, create a macOS dmg package
|
|
|
|
If cmake fails complaining to find Boost, try to set the path explicitly.
|
|
``cmake -DBOOST_ROOT=[boost path] ..``, e.g., ``cmake -DBOOST_ROOT=/opt/local/libexec/boost/1.80 ..``
|