]> git.ipfire.org Git - thirdparty/shairport-sync.git/blob - CYGWIN.md
Update check_classic_mac_basic.yml
[thirdparty/shairport-sync.git] / CYGWIN.md
1 Installing Shairport Sync into Cygwin [Airplay 2 Not Supported]
2 ====
3
4 This guide is based on installing onto a fresh installation of Cygwin 2.895 (64-bit installation) running in Windows 10
5 inside VMWare Fusion on a Mac.
6
7 The end result is a new Windows Service called `CYGWIN Shairport Sync`, providing an AirPlay service by which iOS devices or other AirPlay sources on the network can play audio through the Windows device.
8
9 Windows Firewall
10 ----
11 While getting everything working, it is suggested that you temporarily disable the Windows Firewall. Shairport Sync uses port 5000 for TCP and uses three ports for UDP, so you should leave a minimum of three, and preferably at least 10, open from 6001 upwards. The Bonjour Service, used in conjunction with the Avahi daemon, advertises Shairport Sync over a number of further ports. Once everything is working, the firewall can be re-enabled gradually.
12
13 Setting up Windows
14 ----
15 Set up Windows 10 and install all updates. Install the `Bonjour Service`, available from Apple in an installer called "Bonjour Print Services for Windows v2.0.2".
16
17 * Download and run `Bonjour Print Services for Windows v2.0.2`
18 * After accepting conditions and clicking the `Install` button, the installer will do a preliminary installation, installing just the Bonjour Service. It will then pause, inviting you to install Bonjour Print Services. You can decline this, as the Bonjour Service will have been installed during the first part of the installation.
19
20 * Check Bonjour Service is running. In Windows, open the `Services` desktop application and ensure that you can see `Bonjour Service` running.
21
22 Setting up Cygwin
23 ----
24 * Download the Cygwin installer from the [official website](https://cygwin.com/install.html). Save the installer in the Downloads folder.
25
26 * Open a Windows `Command Prompt` window and enter the following multi-line command, omitting the `C:\Users\mike>` prompt:
27 ```
28 C:\Users\mike> Downloads\setup-x86_64.exe -P cygrunsrv,dbus,avahi,avahi-tools,gnome-keyring,libavahi-client-devel,^
29 libglib2.0-devel,openssl,pkg-config,autoconf,automake,clang,libdaemon-devel,popt-devel,^
30 make,libao-devel,openssl-devel,libtool,git,wget,flex,bison
31 ```
32 This will do a complete installation of Cygwin and all necessary packages.
33 * Set up the D-Bus and Avahi Services:
34
35 Open a `Cygwin64 Terminal` window in Administrator mode. Enter the following command:
36 ```
37 $ messagebus-config
38 ```
39 Answer `yes` to all queries. Open the Windows `Services` desktop application (if it's already open, refresh the screen contents: `Actions > Refresh`) and look for the `CYGWIN D-Bus system service`. Open it and start it.
40
41 Next, open (or return to) a `Cygwin64 Terminal` window in Administrator mode. Enter the following command:
42 ```
43 $ /usr/sbin/avahi-daemon-config
44 ```
45 Answer `yes` to all queries. Open the Windows `Services` desktop application (if it's already open, refresh the screen contents: `Actions > Refresh`) and look for the `CYGWIN Avahi service`. Open it and start it.
46
47 The `libconfig` Library
48 ----
49 Shairport Sync relies on a library – `libconfig` – that is not a Cygwin package, so it must be downloaded, compiled and installed:
50 * Download, configure, compile and install `libconfig`:
51 ```
52 $ git clone https://github.com/hyperrealm/libconfig.git
53 $ cd libconfig
54 $ autoreconf -fi
55 $ ./configure
56 $ make
57 $ make install
58 $ cd ..
59 ```
60
61 Shairport Sync
62 ----
63 * Download, configure and compile Shairport Sync:
64 ```
65 $ git clone https://github.com/mikebrady/shairport-sync.git
66 $ cd shairport-sync
67 $ git checkout development // this is temporary
68 $ autoreconf -fi
69 $ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --with-ao --with-ssl=openssl \
70 --with-avahi --with-dbus-interface --with-libdaemon --sysconfdir=/etc --with-cygwin-service
71 $ make
72 $ make install
73 ```
74 * The last step above installs the `shairport-sync` application into `/usr/local/bin` and also installs a configuration file, a service configuration script and two D-Bus policy files.
75
76 Shairport Sync Service
77 ----
78 * To install Shairport Sync as a Cygwin Service, open (or return to) a `Cygwin64 Terminal` window in Administrator mode. Enter the following command:
79 ```
80 $ shairport-sync-config
81 ```
82 Answer `yes` to all queries. Open the Windows `Services` desktop application (if it's already open, refresh the screen contents: `Actions > Refresh`) and look for the `CYGWIN Shairport Sync` service. Open it and start it.
83
84 An AirPlay player on the local network should now be able to see an AirPlay output device bearing the computer's Device Name, e.g. `DESKTOP-0RHGN0`. You can set a different name by changing the settings in the Shairport Sync configuration file, installed at `/etc/shairport-sync.conf`.
85
86 Since Shairport Sync is now a Cygwin Service, you do not need to open Cygwin to launch it – it should launch automatically when Windows is booted up.
87
88 Known Issues
89 ----
90 * Shairport Sync cannot access the D-Bus system bus to make its D-Bus interface available. The cause of this problem is unknown. (While the Avahi daemon can access the D-Bus system bus, Shairport Sync can not. The two applications use different D-Bus libraries, so perhaps the issue lies there.)