librespot icon indicating copy to clipboard operation
librespot copied to clipboard

Building on Windows

Open NeoLegends opened this issue 9 years ago • 3 comments

Even after a couple hours of trying, I still cannot get this library to build on Windows (Rust Nightly 1.10 64-bit GNU). So far I've got the following:

  • Build environment using MSYS2 + MinGW 64
  • Protobuf binaries compiled from sources
  • PortAudio binaries from Github Repo somewhere

Right now I'm having trouble building librespot-protocol, respectively linking against libz (can't find the .dll, linker option: -lz). Using the one from zlib.net doesn't work, because it's not 64-bit, and I'd prefer having a 64-bit executable in the end.

Has anybody tried building librespot on Windows recently? Any ideas on how to do this?

NeoLegends avatar Apr 24 '16 15:04 NeoLegends

Anybody made any progress with this?

jscholes avatar Nov 06 '16 22:11 jscholes

I've been working on a (partial) rewrite which, among other things, should support windows (got rid of protobuf and portaudio dependencies). I've just pushed it branch v0.2. You'll probably need a nightly rust to try it.

I've only tried cross compiling using mingw. The audio wasn't completely smooth on my vary slow VM, but it should be alright on a real machine.

There's probably some rough edges. Seeking and caching don't work yet. Oh and the AP is hardcoded to London, change https://github.com/plietar/librespot/blob/v0.2/src/connection/mod.rs#L68 if you don't live around there (use the first value from https://apresolve.spotify.com/).

If your run into any issues, please let me know, preferably on gitter rather than creating a new issue since this is still a WIP.

plietar avatar Nov 24 '16 23:11 plietar

[edit] Never mind, didn't check out v0.2, so I was using master, oops...

Cross compilation works for me from ubuntu vm to windows 10, using mingw-gcc.

sophof avatar Nov 27 '16 12:11 sophof