= [[pianod|Pianod Support]] = == OS X Installation via MacPorts == MacPorts installation is supported for OS X 10.5 and later. Installing via MacPorts is a 4-step process: * Install compilers * Install MacPorts * Install pianod * Configure pianod You will need to do some work at the command line, but it should be straightforward. A lot of the process will simply be waiting for things to install. === Install the Compiler === ''Think the compiler is installed already?'' Open Applications—>Utilities—>Terminal and enter cc --version. If you get "cc: not found", it is not yet installed; if it talks about Apple or Free Software Foundation, it is installed and you can skip to the next step. On 10.8 and later this test triggers a pop-up that offers to install the components you need. You have several options for installing the compiler: * Easy: If you still have your computer's install media, you can find XCode on the DVD. It may be on a separate "Developer Tools" disc. * Easy but slow: If you're running the latest OS (Mountain Lion as of Spring 2013), visit the App Store and search for XCode. Download and install it (it's huge, it'll take a while). * Less easy and slow: If you're running an older OS (OS X 10.7 Lion or earlier), you can download a supported compiler from Apple's developer site. Visit [//Developer.apple.com], go to "Mac Dev Center" and register yourself. Once you've jumped through the hurdles of account creation and e-mail confirmation, return to Mac Dev Center and sign in. Go to "View all downloads", then search for the last supported version: {| class="wikitable" |- | Mavericks (10.9) || Use app store |- | Mountain Lion (10.8) || Use app store |- | Lion (10.7) || Xcode 4.3 |- | Snow Leopard (10.6) || XCode 3.2.6 |- | Leopard (10.5) || Xcode 3.1.4 |- | Tiger (10.4) || [//deviousfish.com/pianod/install.html Manually install pianod] after installing the compiler and dependencies. There is an older MacPorts version that may help with the dependencies, but you're on your own. Difficulty is probably moderate. |- | Panther (10.3) & earlier || MacPorts is not supported, so you're looking at a fully manual install of pianod and all dependencies. You are on your own; finding the right versions that work on these OS versions and getting them to work together is difficult; 10.3 is known possible. Expect multisecond gaps between tracks due to slow hardware. |- |} === Install MacPorts === * If you do not have MacPorts installed, visit [//macports.org MacPorts], download the MacPorts installer, and install it. * If you already have MacPorts installed, perform a sudo port selfupdate. Consider doing a sudo port upgrade outdated as well. === Install pianod === Open Applications—>Utilities—>Terminal, and enter (or cut and paste):

sudo port install pianod
Several dependencies may compile; if you've just installed MacPorts expect it to take a while. Hopefully it will succeed. If it fails, however, port will report the error and stop. For help troubleshooting, post the error message (cut-and-paste the message and the last page or so leading up to it) on the [//lists.deviousfish.com/listinfo.cgi/pianod-deviousfish.com pianod support mailing list]. Include your OS X version and XCode version. To launch pianod now, enter: pianod & You can control pianod via the [//deviousfish.com/pianod/client/index.html Web Remote]. For server name, use localhost:4446. The username and password are admin; once in, you can change the password or create your own account on the Users pane. To provide your Pandora credentials, select the Administration pane and open Set Pandora Account. ==== Installing pianod from a tarball ==== MacPorts is not always using the latest release. If you want to install pianod from a tarball, the easiest route is to use MacPorts for the dependencies, then uninstall MacPort's pianod and install your own. You will need to set two environment variables so the build can find the dependencies in MacPorts. After downloading the pianod tarball from DeviousFish.com, it will go something like this:

sudo port uninstall pianod
cd Downloads
tar xfvz pianod-latest.tar.gz
cd pianod-{version}
export CPPFLAGS=-I/opt/local/include
export LDFLAGS=-L/opt/local/lib
./configure && make && sudo make install
=== Configuring pianod for MacPorts === ==== Launching pianod at boot ==== To launch pianod automatically at startup, perform these commands:

sudo port load pianod
==== Configuring boot-time Preferences ==== To automatically connect to your Pandora account or select a station at boot-up, open TextEdit. Select Format—>Make Plain Text. Cut and paste this into it:

# Set pandora credentials
pandora user "me@myemail.com" "mypassword"

# Remove # below to select manual QuickMix on startup.
# select mix

# Remove # below to enable automatic station selecton (autotuning) on startup
# select auto

# Remove # below and adjust station name to pick a station on startup
# select station "Jazz fusion"

# Remove # below to start playback on startup
# Play
Correct the e-mail address and password. Save this file to your desktop as pianod.startscript; do not add .txt or another extension. In terminal, perform:

sudo mv ~/Desktop/pianod.startscript /etc
To revise this file in the future, open TextEdit, select File—>Open, and type /etc/pianod.startscript.