birds like wires

Search

Compiling Squeezeplay

An early build of SqueezePlay running on an O2 Joggler.

If you’ve ever tried the binaries of Squeezeplay 7.6 available from the nightly downloads, you’ll know that things aren’t quite right for Ubuntu. The same holds true for the Joggler, where the graphics and the audio are pretty messed up. But there is a way, if you compile it yourself!

Compiling for Ubuntu

If you’re after a working version of Squeezeplay for Ubuntu, in an identical style to that seen on the Mac and Windows, then this article should be everything you need. If you’re wanting that dream Squeezeplay system on your Joggler, there is a little more work to do afterwards. I won’t be going into the detail in this post, but the reason you’ll have problems is that the standard Squeezeplay interfaces are designed for a fixed resolution of 480×272 or smaller, while the Joggler has an 800×480 display.

The reason for writing this when you can download Tarkan Akdam’s excellent Squeezeplay on the Joggler binaries is that I like to know how to do things from scratch. It gives a greater understanding of ‘how stuff works’, but can also take the pressure off those that supplied the binaries in the first place with regard to updates, keeping binaries online, fielding questions; all that admin kind of stuff.

At the end of this little guide you should have a working compiled version of Squeezeplay 7.6 that can be used on both Ubuntu and, to an extent, on the Joggler’s native operating system. Before starting, you’ll need a copy of Ubuntu 9.10 (not managed to get 10.04 to compile it as yet) and a Joggler with SSH (and preferably SCP) enabled if that’s your target. Unless you’re a whizz at cross-compiling, you’ll need an x86 system to target the Joggler.

The bulk of getting Squeezeplay to compile under Ubuntu was done by John Wells of www.jfwhome.com, so full credit goes to John as I would never have figured out what to do on my own.

Fetch Dependencies and SVN Source

On your Ubuntu system, open the Terminal and start off with this:

sudo apt-get install build-essential flex bison subversion automake libtool libpng12-dev libjpeg62-dev libexpat1-dev libreadline5-dev xorg-dev libflac++-dev libvorbis-dev libvorbisidec-dev libasound2-dev

This shouldn’t give you any errors and will put all of the libraries you require onto your system. Then create a directory somewhere, cd into it and grab the latest SVN source code:

svn co http://svn.slimdevices.com/repos/jive/7.6/trunk/squeezeplay

Tweaking

Open squeezeplay/src/Makefile.linux and change the following:

- 10: SRC_DIR = $(realpath ${PWD})
+ 10: SRC_DIR = $(realpath $(shell pwd))

- 146: cd luaprofiler-2.0 && make -f Makefile.linux install-
+ 146: cd luaprofiler-2.0 && LD="gcc -shared" make -f Makefile.linux install

Save the makefile and if you’re aiming for the Joggler, consider whether you think a visible cursor is any use on a touchscreen device with no mouse. If you think not, make the following change to squeezeplay/src/squeezeplay/src/ui/jive_framework.c to disable the pointer:

- 1075:                SDL_ShowCursor(SDL_ENABLE)
+ 1075:                SDL_ShowCursor(SDL_DISABLE)

Probably leave this out if you’re mouse-bound on an Ubuntu desktop.

There is one last thing to think about, and that’s the window that SqueezePlay will create for itself. On the Joggler Native OS there’s no problem, because there are no windows as such. But on Ubuntu there are, and depending on the sort of user interface you’re aiming for, you may want to consider looking around lines 843 and 855 in squeezeplay/src/squeezeplay/src/ui/jive_surface.c.

Firstly, do a search for SDL_RESIZABLE; there should be two instances. It seems to me a little pointless to have resizable windows for a non-resizable interface, so feel free to kill these flags off if you want. But my personal interest is in changing these to SDL_NOFRAME. By doing that you get no window furniture whatsoever, which is great if you want as much UI as possible. If you do this, make sure you export SDL_VIDEO_WINDOW_POS=0,0 (described below), as this will make sure it’s always drawn from the top-left of the screen.

Update PortAudio

Finally, the static library for PortAudio included with Squeezeplay needs updating. Grab a copy of the latest snapshot and decompress it into squeezeplay/src. The easiest way to get the new verison to be used is just to rename it to match the old version. Rename portaudio_v19_1360 to portaudio_v19_1360_old and rename portaudio to portaudio_v19_1360.

Update SDL (Optional)

I’m not sure why you’d need to do this at the moment, but just in case you need to there’s a patch file available on this thread that will prep SDL v1.2.14 for SqueezePlay. I was looking for a way to make the X11 screensaver work in full screen mode, but that’s an entirely different story.

Compile It!

While in squeezeplay/src, run:

make -f Makefile.linux

Make yourself some tea. If all goes well the last part of the compilation process should bundle everything into a .tgz in the squeezeplay/build directory.

Installation

Once you have some binaries, it’s time to install them.

On Ubuntu

Move the tarball to /opt/squeezeplay/ and decompress it. Squeezeplay has some issues with PulseAudio, so if you actually want to hear anything you’ll need to tweak your /usr/share/alsa/alsa.conf file and comment out the line that refers to pulse.conf.

Then you should just need to type /opt/squeezeplay/bin/squeezeplay.sh and you’ll be good to go. There’s even a .PNG icon in /opt/squeezeplay/share/jive/jive/ for you to use for your shortcut.

On the Joggler

Shift the tarball into /media/squeezeplay/ and decompress it. You will need to copy two libraries, libjpeg.so.62 and libpng12.so.0 from /usr/lib/ on Ubuntu into the /media/squeezeplay/lib directory, otherwise not very much will happen. Then open /media/squeezeplay/bin/squeezeplay.sh and make a few changes:

- 8: INSTALL_DIR=/opt/squeezeplay/
+ 8: INSTALL_DIR=/media/squeezeplay/

...

+ ## Joggler specific
+ export DISPLAY=:0.0
+ export SDL_AUDIODRIVER=alsa
+ export KMP_DUPLICATE_LIB_OK=TRUE
+ export SDL_VIDEO_WINDOW_POS=0,0

cd $INSTALL_DIR/bin
./jive

Save the file and try it out with /media/squeezeplay/bin/squeezeplay.sh.

The Squeezeplay default 480x272 skin on a Joggler.

You’ll quickly see why things aren’t perfect. While you should be able to use your freshly compiled Squeezeplay app, you were probably hoping it wouldn’t just appear in the top-left corner of the screen. That fixed layout of the WQVGAsmallSkin used by Squeezeplay means that you are limited to a resolution of 480×272, unless you tweak the skin. It’s now that you’re probably cursing and heading for squeezingtarkan, but have heart. It is possible to simply replace the WQVGAsmallSkin folder in /media/squeezeplay/share/jive/applets with the one from Tarkan Akdam’s version. Unless there have been important changes to the skin between SVN releases (which is entirely possible), you’ll find yourself with the latest code and an 800×480 skin to boot.

Watch this space, though. I might be working on something. :)

Thinning

The last thing you may want to do is bin anything that isn’t really required from the built version. The following is a list of files and folders that can be discarded, because they are either libraries that are already linked, or they have no use for us on the Joggler or Ubuntu.

bin/freetype-config
bin/gmon.out
bin/lua
bin/luac
bin/sdl-config
include/
lib/*.a
lib/*.la
share/jive/applets/Bounce

These last few can be removed if you have no use for skins other than WQVGAsmallSkin (the default).

share/jive/applets/QVGAlandscapeSkin
share/jive/applets/QVGAportraitSkin
share/jive/applets/SetupWallpaper/wallpaper/bb*
share/jive/applets/SetupWallpaper/wallpaper/jive*
share/jive/applets/WQVGAlargeSkin

You may want to make sure you have a backup before you start deleting!

Hacked device acting as Squeezebox Touch ?

Recommendations needed ?

Hi Birdslikewires, I am looking for a popular budget touch device (like the original Joggler/Openframe – it would do the job, but no webshop on this planet is selling it ???)

What low budget touch device has a big hacking community, so it is easy to get help as a hacker-n00b ?

All I am looking for is a device that will do this “Squeezebox Touch-wanna-be” trick; see the super cool youtube video:

(“Fast forward” 1 min.):

http://www.youtube.com/watch?v=kMsaJ_qTiD4

You know the guide:
http://www.tarkan.info/20100609/tutorials/launched-squeezeplay-on-the-o2-joggler

Thanks. Hope to hear from you ?

Andy

Andy left this message 2317 days ago

@Andy The Joggler is an excellent platform for this kind of thing. The Joggler links in the ‘Handy Links’ section at the bottom of this page should take you to everything you’ll need to know to get SqueezePlay working. That and my SqueezePlay for Joggler article.

Andy left this message 2286 days ago

this is excellent! I’m a complete noob and followed this and got is working.One problem:

If I create a icon in the launch panel with a command of /opt/squeezeplay/bin/squeezeplay.sh i get everything apart form the sound! if I just type the command in a terminal the sound works.

any suggestions why this may be.

chain left this message 2200 days ago

@chain Make sure you’ve commented the line out as mentioned in the ‘Installation on Ubuntu’ bit. SqueezePlay doesn’t really like PulseAudio.

That is, of course, if you’re doing this on an Ubuntu system. It may vary depending on what OS you’re building this for.

Andy left this message 2198 days ago

Hey andy,
Came back here as I’ve still not got it working right. I am on Ubuntu – 64, 10.10 have commented out as you suggested.

no biggie

chain left this message 2172 days ago

Thanks for the excellent tutorial. It did all as suggested including commenting out pulse. However, when I start Squeezeplay, all I get is a black empty window. No controls, no text, no nothing.

Compilation went without errors as far as I can tell.

Using squeezeplay-7.6.0-9444 on Ubuntu 10.10 64bit. Any ideas what I could try?

kongo09 left this message 2154 days ago

works like a charm on ubuntu server 9.10 . Big Big thanks.

shay left this message 2139 days ago

I have been trying to get this working under ubuntu (at the time: pinguy 11.04) for a long time. Finally it works, and seemingly flawlessly. Thank you!

amalgamas left this message 2011 days ago

After having succeeded with this for natty, I tried on another PC (my wifes) running oneiric. It failed. The library libreadline5-dev does apparently not exist any longer under oneiric and the makefile process aborts with an error 2 message. i have tried to install the newer libraries, but they have other names. I also tried ionstalling libreadline5-dev for natty, but the makefile process still fails. As I clearly am not able to fix this I ask for help!

Best regards

amalgamas left this message 2004 days ago

Buuump

Is this thread dead?

amalgamas left this message 1974 days ago

@amalgamas Not dead, I just don’t receive any notification when a comment is posted.

Have you tried asking on the Squeezebox Forums? I purposely compile on Ubuntu 9.10 (Karmic) as this is the last version that produces working binaries on the O2 Joggler, so I’m really not the best person to be asking. I had problems on anything later than 9.10 (as I mention in the thread), but have never had the need to solve them.

Give those forums a try – that’s where the SqueezePlay developers hang out and they will be far more knowledgable.

Andy left this message 1967 days ago

I just noticed your answer, and thank you, I will try the forums

amalgamas left this message 1918 days ago

Update. I installed ubuntu 11.04 in Virtualbox and was able to compile squeezeplay that way. It works!

amalgamas left this message 1917 days ago

Ahh, fantastic! Thanks for posting; it’s good to know this technique still works!

Andy left this message 1916 days ago

Hello, thanks for the work on this, I followed the steps until the optional SDL Update, which i do not understand how to apply, tried:

—————————
wget -O SDL-1.2.14.tar.gz http://goo.gl/ByL0B
tar -xzvf SDL-1.2.14.tar.gz -C ~/ && cd SDL-1.2.14
./configure && make
sudo make install
——————————— seemed to work

then:
———————————
make -f Makefile.linux

checking for freetype-config… /home/kueche/Arbeitsfläche/sqlinux/squeezeplay//build/linux/bin/freetype-config
checking for sdl-config… /home/kueche/Arbeitsfläche/sqlinux/squeezeplay//build/linux/bin/sdl-config
checking for SDL – version >= 1.2.4… ./configure: line 21631: /home/kueche/Arbeitsfläche/sqlinux/squeezeplay//build/linux/bin/sdl-config: No such file or directory
./configure: line 21632: /home/kueche/Arbeitsfläche/sqlinux/squeezeplay//build/linux/bin/sdl-config: No such file or directory
./configure: line 21635: /home/kueche/Arbeitsfläche/sqlinux/squeezeplay//build/linux/bin/sdl-config: No such file or directory
./configure: line 21637: /home/kueche/Arbeitsfläche/sqlinux/squeezeplay//build/linux/bin/sdl-config: No such file or directory
./configure: line 21639: /home/kueche/Arbeitsfläche/sqlinux/squeezeplay//build/linux/bin/sdl-config: No such file or directory
no
*** Could not run SDL test program, checking why…
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means SDL was incorrectly installed
*** or that you have moved SDL since it was installed. In the latter case, you
*** may want to edit the sdl-config script: /home/kueche/Arbeitsfläche/sqlinux/squeezeplay//build/linux/bin/sdl-config
configure: error: *** SDL version 1.2.4 not found!
make: *** [SDL_ttf-2.0.8/Makefile] Fehler 1
——————————-

This is it, any idea what to do now?

I would gladly appreciate any help, fighting this for 2 days now :P

Jakob left this message 1314 days ago

@Jakob Sorry – I’ve not actually compiled SqueezePlay in some time, so I’m not going to be able to give you a sensible answer on this, I’m afraid! I would really just be guessing. If I do need to recompile, I’ll certainly update this article, though.

Andy left this message 1307 days ago