Compile Help for Windows/Cygwin
Opened this issue · 4 comments
Installing pianobarfly on Cygwin
We had some luck installing pianobarfly on Windows the other night and wanted to share.
Prerequisites
Beyond the base Cygwin system, you will need to install the following packages
using the Cygwin installer:
- git
- gcc4 (not gcc)
- make
- pkg-config
- gnutls-devel
- libao-devel
- libid3tag-devel
- wget
- nano, or some other text editor
You'll also need to compile a couple of libraries from source.
Installing faad
wget http://downloads.sourceforge.net/faac/faad2-2.7.tar.gz
tar xvf faad2-2.7.tar.gz
cd faad2-2.7
./configure --prefix=/usr && make install
We're changing the install prefix from the default /usr/local to /usr so that it will
be easier for libpiano to find the installed libraries.
Installing libmad
wget ftp://ftp.mars.org/pub/mpeg/libmad-0.15.1b.tar.gz
tar xvf libmad-0.15.1b.tar.gz
cd libmad-0.15.1b
./configure --prefix=/usr
Before compiling libmad, edit the Makefile in the base directory. Remove the
-fforce-mem
flag from the CFLAGS line of the Makefile (line 129). Now, continue
with the build:
make install
We also need to create a mad.pc
file so that pkg-config will know that libmad
is installed.
Save the following as /usr/lib/pkgconfig/mad.pc
## start of mad.pc
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: mad
Description: MPEG audio decoder
Requires:
Version: 0.15.1b
Libs: -L${libdir} -lmad
Cflags: -I${includedir}
## end of mad.pc
Now we can proceed with pianobarfly.
Installing pianobarfly
Check out the source from GitHub
git clone https://github.com/ghuntley/pianobarfly.git
cd pianobarfly
Edit the Makefile
nano Makefile
Change line 3 from PREFIX:=/usr/local
to PREFIX:=usr
and change line 15 from
CC=c99
to CC=cc -std=c99
make install
Run pianobarfly
, and celebrate!
Saving login information
Login information is saved in the file ~/.config/pianobarfly/config
. Create
the file as follows:
mkdir -p ~/.config/pianobarfly
nano ~/.config/pianobarfly/config
And type your login information:
user = big@corporation.com
password = wooly_mammoth
Good luck!
Moved this issue to a wiki page (https://github.com/nega0/pianobarfly/wiki/Installing-pianobarfly-on-Cygwin)
Awesome work chewing through all these! Go go go! :)
For anyone trying this now, I needed to add --build=x86_64-unknown-cygwin
when running the ./configure
command for the libmaad dependency. Otherwise I get a build error saying "checking build system type... ./config.guess: unable to guess system type".
See https://stackoverflow.com/questions/4810996/how-to-resolve-configure-guessing-build-type-failure
@chrisisler for libmad? Or faad?