Skip to content

Commit

Permalink
Merge branch 'release/2017.05.18'
Browse files Browse the repository at this point in the history
  • Loading branch information
thedmd committed May 18, 2017
2 parents 6dee813 + 593b2d6 commit cd5c650
Show file tree
Hide file tree
Showing 34 changed files with 790 additions and 434 deletions.
51 changes: 34 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,44 +84,52 @@ ALL_LDFLAGS:=${LDFLAGS} -lao -lpthread -lm \
${LIBAV_LDFLAGS} ${LIBGNUTLS_LDFLAGS} \
${LIBGCRYPT_LDFLAGS} ${LIBJSONC_LDFLAGS} ${LIBCURL_LDFLAGS}

# Be verbose if V=1 (gnu autotools’ --disable-silent-rules)
SILENTCMD:=@
SILENTECHO:=@echo
ifeq (${V},1)
SILENTCMD:=
SILENTECHO:=@true
endif

# build pianobar
ifeq (${DYNLINK},1)
pianobar: ${PIANOBAR_OBJ} ${PIANOBAR_HDR} libpiano.so.0
@echo " LINK $@"
@${CC} -o $@ ${PIANOBAR_OBJ} -L. -lpiano ${ALL_LDFLAGS}
${SILENTECHO} " LINK $@"
${SILENTCMD}${CC} -o $@ ${PIANOBAR_OBJ} -L. -lpiano ${ALL_LDFLAGS}
else
pianobar: ${PIANOBAR_OBJ} ${PIANOBAR_HDR} ${LIBPIANO_OBJ}
@echo " LINK $@"
@${CC} -o $@ ${PIANOBAR_OBJ} ${LIBPIANO_OBJ} ${ALL_LDFLAGS}
${SILENTECHO} " LINK $@"
${SILENTCMD}${CC} -o $@ ${PIANOBAR_OBJ} ${LIBPIANO_OBJ} ${ALL_LDFLAGS}
endif

# build shared and static libpiano
libpiano.so.0: ${LIBPIANO_RELOBJ} ${LIBPIANO_HDR} ${LIBPIANO_OBJ}
@echo " LINK $@"
@${CC} -shared -Wl,-soname,libpiano.so.0 -o libpiano.so.0.0.0 \
${SILENTECHO} " LINK $@"
${SILENTCMD}${CC} -shared -Wl,-soname,libpiano.so.0 -o libpiano.so.0.0.0 \
${LIBPIANO_RELOBJ} ${ALL_LDFLAGS}
@ln -fs libpiano.so.0.0.0 libpiano.so.0
@ln -fs libpiano.so.0 libpiano.so
@echo " AR libpiano.a"
@${AR} rcs libpiano.a ${LIBPIANO_OBJ}
${SILENTCMD}ln -fs libpiano.so.0.0.0 libpiano.so.0
${SILENTCMD}ln -fs libpiano.so.0 libpiano.so
${SILENTECHO} " AR libpiano.a"
${SILENTCMD}${AR} rcs libpiano.a ${LIBPIANO_OBJ}


-include $(PIANOBAR_SRC:.c=.d)
-include $(LIBPIANO_SRC:.c=.d)

# build standard object files
%.o: %.c
@echo " CC $<"
@${CC} -c -o $@ ${ALL_CFLAGS} -MMD -MF $*.d -MP $<
${SILENTECHO} " CC $<"
${SILENTCMD}${CC} -c -o $@ ${ALL_CFLAGS} -MMD -MF $*.d -MP $<

# create position independent code (for shared libraries)
%.lo: %.c
@echo " CC $< (PIC)"
@${CC} -c -fPIC -o $@ ${ALL_CFLAGS} -MMD -MF $*.d -MP $<
${SILENTECHO} " CC $< (PIC)"
${SILENTCMD}${CC} -c -fPIC -o $@ ${ALL_CFLAGS} -MMD -MF $*.d -MP $<

clean:
@echo " CLEAN"
@${RM} ${PIANOBAR_OBJ} ${LIBPIANO_OBJ} \
${SILENTECHO} " CLEAN"
${SILENTCMD}${RM} ${PIANOBAR_OBJ} ${LIBPIANO_OBJ} \
${LIBPIANO_RELOBJ} pianobar libpiano.so* \
libpiano.a $(PIANOBAR_SRC:.c=.d) $(LIBPIANO_SRC:.c=.d)

Expand All @@ -146,4 +154,13 @@ install-libpiano:
install -d ${DESTDIR}${INCDIR}/
install -m644 src/libpiano/piano.h ${DESTDIR}${INCDIR}/

.PHONY: install install-libpiano test debug all
uninstall:
$(RM) ${DESTDIR}/${BINDIR}/pianobar \
${DESTDIR}/${MANDIR}/man1/pianobar.1 \
${DESTDIR}/${LIBDIR}/libpiano.so.0.0.0 \
${DESTDIR}/${LIBDIR}/libpiano.so.0 \
${DESTDIR}/${LIBDIR}/libpiano.so \
${DESTDIR}/${LIBDIR}/libpiano.a \
${DESTDIR}/${INCDIR}/piano.h

.PHONY: install install-libpiano uninstall test debug all
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
#pianobar

pianobar is a console client for the personalized web radio [Pandora]
([http://www.pandora.com](http://www.pandora.com)).
([http://www.pandora.com](http://www.pandora.com)) ported to Windows.

![pianobar](https://github.com/thedmd/pianobar-windows/blob/feature/appveyor/screenshots/pianobar.png)

# Releases

###Features
Releases can be found at [GitHub Release page](https://github.com/thedmd/pianobar-windows/releases).

[![Build status](https://ci.appveyor.com/api/projects/status/6n5qa9bs7aiy8e52?svg=true)](https://ci.appveyor.com/project/thedmd/pianobar-windows)

### Features

* Play and manage (create, add more music, delete, rename, ...) your stations.
* Rate played songs and let pandora explain why they have been selected.
Expand All @@ -12,11 +18,14 @@ pianobar is a console client for the personalized web radio [Pandora]
* last.fm scrobbling support (external application)
* Proxy support for listeners outside the USA.

###Source Code
### Source Code

The source code can be downloaded at [github.com](http://github.com/PromyLOPh/pianobar/)
Original source code can be downloaded at [github.com](http://github.com/PromyLOPh/pianobar/)
or [6xq.net](http://6xq.net/projects/pianobar/).

###Download/Installation
### Building

Checkout [pianobar-windows-build](https://github.com/thedmd/pianobar-windows-build) where
you will find configured solution for Visual Studio 2015.

There are community provided packages available for most Linux distributions (see your distribution’s package manager), Mac OS X ([MacPorts](http://trac.macports.org/browser/trunk/dports/audio/pianobar/Portfile) or [homebrew](http://brew.sh/)) and *BSD as well as a [native Windows port](https://github.com/thedmd/pianobar-windows).
This repository is linked by GitHub submodule.
79 changes: 79 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
version: '{branch}-{build}'
configuration: Release
platform:
- x86
- x64
clone_script:
- ps: >-
# Clone build environment
git clone -q --branch=master https://github.com/thedmd/pianobar-windows-build.git $env:appveyor_build_folder
# Clone project itself
if(-not $env:appveyor_pull_request_number) {
git clone -q --branch=$env:appveyor_repo_branch https://github.com/$env:appveyor_repo_name.git $env:appveyor_build_folder\pianobar\src
cd $env:appveyor_build_folder\pianobar\src; git checkout -qf $env:appveyor_repo_commit
} else {
git clone -q https://github.com/$env:appveyor_repo_name.git $env:appveyor_build_folder\pianobar\src
cd $env:appveyor_build_folder\pianobar\src; git fetch -q origin +refs/pull/$env:appveyor_pull_request_number/merge:
cd $env:appveyor_build_folder\pianobar\src; git checkout -qf FETCH_HEAD
}
build:
verbosity: minimal
after_build:
- ps: >-
$artifactName = "pianobar"
if([System.Convert]::ToBoolean($env:appveyor_repo_tag))
{
$artifactName = "$artifactName-$env:appveyor_repo_tag_name"
}
else
{
$branchName = $env:appveyor_build_version -replace "/", "-"
$artifactName = "$artifactName-$branchName"
}
function Package
{
[cmdletbinding()]
Param([string]$BinaryDir, [string]$ArtifactName, [string]$OutputDir, [string]$Suffix)
Process
{
New-Item -ItemType directory $OutputDir\release-$Suffix
Copy-Item $env:appveyor_build_folder\pianobar\src\release\* $OutputDir\release-$Suffix
Copy-Item $BinaryDir\*.exe $OutputDir\release-$Suffix
7z a $OutputDir\$ArtifactName-$Suffix.zip $OutputDir\release-$Suffix\*
}
}
if(Test-Path -Path $env:appveyor_build_folder\build\Win32)
{
Package -BinaryDir $env:appveyor_build_folder\build\Win32 -ArtifactName $artifactName -Suffix x86 -OutputDir $env:appveyor_build_folder\build
}
if(Test-Path -Path $env:appveyor_build_folder\build\x64)
{
Package -BinaryDir $env:appveyor_build_folder\build\x64 -ArtifactName $artifactName -Suffix x64 -OutputDir $env:appveyor_build_folder\build
}
artifacts:
- path: build\*.zip
deploy:
- provider: GitHub
auth_token:
secure: bXlXe4mzmi9lpGSfWMvWf01I05hyCuYZAVrlM5ZUad86QfyYvO6EeKTPaCpbjdyp
draft: true
force_update: true
on:
branch: /\d\d\d\d\.\d\d.\d\d.*/
2 changes: 2 additions & 0 deletions contrib/config-example
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

# Proxy (for those who are not living in the USA)
#control_proxy = http://127.0.0.1:9090/
#bind_to = if!tun0

# Keybindings
#act_help = ?
Expand Down Expand Up @@ -49,6 +50,7 @@
#ban_icon = [-]
#volume = 0
#ca_bundle = /etc/ssl/certs/ca-certificates.crt
#gain_mul = 1.0

# Format strings
#format_nowplaying_song = %t by %a on %l%r%@%s
Expand Down
2 changes: 1 addition & 1 deletion contrib/eventcmd-examples/eventcmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ case "$1" in
# songstart)
# echo 'naughty.notify({title = "pianobar", text = "Now playing: ' "$title" ' by ' "$artist" '"})' | awesome-client -

# echo "$title -- $artist" > $HOME/.config/pianobar/nowplaying
# echo "$title -- $artist" > "${XDG_HOME_CONFIG:-${HOME}/.config}/pianobar/nowplaying"

# if [ "$rating" -eq 1 ]
# then
Expand Down
25 changes: 19 additions & 6 deletions contrib/pianobar.1
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,20 @@ or the key you defined in
Icon for banned songs.

.TP
.B ca_bundle
.B bind_to = {if!tunX,host!x.x.x.x,..}
This sets the interface name to use as outgoing network interface. The name can
be an interface name, an IP address, or a host name. (from CURLOPT_INTERFACE)

It can be used as a replacement for
.B control_proxy
in conjunction with OpenVPN's
option
.B route-nopull.

.TP
.B ca_bundle = /etc/ssl/certs/ca-certificates.crt
Path to CA certifiate bundle, containing the root and intermediate certificates
required to validate Pandoras SSL certificate.
required to validate Pandora's SSL certificate.

.TP
.B control_proxy = http://user:password@host:port/
Expand Down Expand Up @@ -298,6 +309,12 @@ Station name
.B %i
Station id

.TP
.B gain_mul = 1.0
Pandora sends a ReplayGain value with every song. This sets a multiplier so that the gain adjustment can be
reduced. 0.0 means no gain adjustment, 1.0 means full gain adjustment, values inbetween reduce the magnitude
of gain adjustment.

.TP
.B history = 5
Keep a history of the last n songs (5, by default). You can rate these songs.
Expand Down Expand Up @@ -343,10 +360,6 @@ Sort station list by name or type (is quickmix) and name. name_az for example
sorts by name from a to z, quickmix_01_name_za by type (quickmix at the
bottom) and name from z to a.

.TP
.B tls_fingerprint = D9980BA2CC0F97BB03822C6211EAEA4A06EEF427
Hex-encoded SHA1 fingerprint of Pandora's TLS certificate.

.TP
.B user = your@user.name
Your pandora.com username.
Expand Down
31 changes: 31 additions & 0 deletions pianobar.cfg.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Uncomment the control_proxy line if you would like to set up a proxy connection for pianobar
#control_proxy = http://<proxy_user>:<proxy_pass>@<proxy_address>:<proxy_port>

user = <pandora_user>
password = <pandora_password>

#width = 220
#height = 60

#-------------------------------------------------------------------------------
# Uncomment these if you're using GlobalPandora.com

#rpc_host = internal-tuner.pandora.com
#partner_user = pandora one
#partner_password = TVCKIBGS9AO9TSYLNNFUML0743LH82D
#device = D01
#encrypt_password = 2%3WCL*JU$MP]4
#decrypt_password = U#IO$RZPAB%VX2
#tls_fingerprint = B0A1EB460B1B6F33A1B6CB500C6523CB2E6EC946


# Messages with colors using terminal escape codes
format_nowplaying_song = "%t" by "%a" on "%l"%r%@%s
format_nowplaying_station = Station "%n" (%i)
format_list_song = %i) %a - %t%r
format_msg_info = (i) %s
format_msg_nowplaying = |> %s
format_msg_time = # %s
format_msg_err = /!\ %s
format_msg_question = [?] %s
format_msg_debug = %s
34 changes: 34 additions & 0 deletions release/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
pianobar for Windows - portable binaries
========

![pianobar](https://github.com/thedmd/pianobar-windows-binaries/blob/master/screenshots/pianobar.png)

pianobar is a console client for the personalized web radio pandora
(http://www.pandora.com). Source code of the original project can be found at
at http://github.com/PromyLOPh/pianobar/ or http://6xq.net/projects/pianobar/

This project contains binaries for Windows build using Microsoft
Visual Studio 2015.

json-c, vtparse are used to prepare this distributtion.

Source code of this binary can be found at:
https://github.com/thedmd/pianobar-windows-build


CONFIGURATION

Pianobar use configuration file. Under Windows this file is named pianobar.cfg
and should be placed next to pianobar.exe.
On reporitory there is an example configuration file, you may copy or rename it.
Then edit it and fill marked fields relevant to you and remove remaining.

Note that non-US users have to have configuration file with control proxy
details set.


GLOBALPANDORA.COM

If you're behind proxy please look into pianobar.cfg.example and copy necessary
settings to your own configuration file. This are necessary, because
globalpandora.com does not support server used in by pianobar.
31 changes: 31 additions & 0 deletions release/pianobar.cfg.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Uncomment the control_proxy line if you would like to set up a proxy connection for pianobar
#control_proxy = http://<proxy_user>:<proxy_pass>@<proxy_address>:<proxy_port>

user = <pandora_user>
password = <pandora_password>

#width = 220
#height = 60

#-------------------------------------------------------------------------------
# Uncomment these if you're using GlobalPandora.com

#rpc_host = internal-tuner.pandora.com
#partner_user = pandora one
#partner_password = TVCKIBGS9AO9TSYLNNFUML0743LH82D
#device = D01
#encrypt_password = 2%3WCL*JU$MP]4
#decrypt_password = U#IO$RZPAB%VX2
#tls_fingerprint = B0A1EB460B1B6F33A1B6CB500C6523CB2E6EC946


# Messages with colors using terminal escape codes
format_nowplaying_song = "%t" by "%a" on "%l"%r%@%s
format_nowplaying_station = Station "%n" (%i)
format_list_song = %i) %a - %t%r
format_msg_info = (i) %s
format_msg_nowplaying = |> %s
format_msg_time = # %s
format_msg_err = /!\ %s
format_msg_question = [?] %s
format_msg_debug = %s
Binary file added screenshots/pianobar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 2 additions & 4 deletions src/config.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#ifndef SRC_CONFIG_H_S6A1C09K
#define SRC_CONFIG_H_S6A1C09K
# pragma once

/* package name */
#define PACKAGE "pianobar"

#define VERSION "2015.12.10"
#define VERSION "2017.05.18"

#define TITLE "Pianobar"

Expand All @@ -25,4 +24,3 @@

#define CURL_STATICLIB

#endif /* SRC_CONFIG_H_S6A1C09K */
Loading

0 comments on commit cd5c650

Please sign in to comment.