/thirdparty/liblastfm2/README

http://github.com/tomahawk-player/tomahawk · #! · 138 lines · 101 code · 37 blank · 0 comment · 0 complexity · b0c35089eb0dd3da6336a94208ac4a3a MD5 · raw file

  1. liblastfm
  2. =========
  3. liblastfm is a collection of libraries to help you integrate Last.fm services
  4. into your rich desktop software. It is officially supported software developed
  5. by Last.fm staff.
  6. Max Howell http://twitter.com/mxcl
  7. Jono Cole http://twitter.com/jonocole
  8. Doug Mansell http://twitter.com/dougma
  9. Fork it: http://github.com/mxcl/liblastfm
  10. Dependencies
  11. ============
  12. liblastfm dynamically links to:
  13. * Qt 4.4
  14. http://www.qtsoftware.com
  15. * FFTW 3.2
  16. Compiled with single precision
  17. http://www.fftw.org
  18. * Secret Rabbit code (aka libsamplerate)
  19. http://www.mega-nerd.com/SRC
  20. Additionally, to build you will need Ruby and GNU make (or Microsoft nmake).
  21. Mac OS X
  22. --------
  23. sudo port selfupdate
  24. sudo port upgrade installed
  25. sudo port install libsamplerate fftw-3 qt4-mac-devel
  26. qt4-mac-devel will take a long time to build. So you may want to install the
  27. Trolltech binary package instead.
  28. MacPorts carries liblastfm now, so you may have downloaded this package simply
  29. to perform this next line:
  30. sudo port install liblastfm
  31. Linux/*NIX
  32. ----------
  33. Do something like this:
  34. sudo apt-get install qt4-qmake pkg-config libsamplerate-dev libfftw3-dev ruby g++ libqt4-dev
  35. Additionally on Linux the configure process requires lsb_release. This is
  36. usually already installed (correct me if I'm wrong).
  37. Please note, we have only tested on Linux, but we think it'll work on all
  38. varieties of UNIX. If it doesn't, report the bug to mxcl on GitHub.
  39. Windows
  40. -------
  41. Install Ruby. Install Visual Studio 2005 or higher. Install Qt. Install the
  42. Windows Server 2003 Platform SDK r2:
  43. http://www.microsoft.com/Downloads/details.aspx?FamilyID=484269e2-3b89-47e3-8eb7-1f2be6d7123a
  44. Set up your environment variables so all include paths and tools are
  45. available.
  46. Build and install FFTW and Secret Rabbit Code.
  47. Open a plain Windows shell (Cygwin will work but we don't recommend it), and
  48. see the next section.
  49. Installing liblastfm
  50. ====================
  51. ruby configure --release --prefix /usr/local && make && sudo make install
  52. Packaging liblastfm
  53. -------------------
  54. DESTDIR is supported.
  55. liblastfm builds to two dynamic libraries (liblastfm.so and
  56. liblastfm_fingerprint.so). liblastfm.so links only to Qt, but the
  57. fingerprinting part has additional dependencies. So ideally, you would
  58. distribute two packages.
  59. Using liblastfm
  60. ===============
  61. We have copied the API at http://last.fm/api onto C++, so like you find
  62. artist.getInfo there you will find an lastfm::Artist::getInfo function in our
  63. C++ API. lastfm is a namespace, Artist a class and getInfo a function.
  64. Thus the API is quite easy to learn. We suggest installing and checking the
  65. include/lastfm/* directory to find out all capabilities.
  66. The demos directory shows some further basic usage including Audioscrobbling
  67. and getting metadata for music via our fingerprinting technology.
  68. You need an API key from http://last.fm/api to use the webservice API.
  69. Your link line needs to include the following:
  70. -llastfm -lQtCore -lQtNetwork -lQtXml
  71. Radio
  72. -----
  73. Please set an identifiable UserAgent on your HTTP requests for the actual MP3s,
  74. in extreme cases we'll contact you directly and demand you do so :P
  75. HTTP & Networking
  76. -----------------
  77. You can specify your own QNetworkAccessManager derived class for liblastfm to
  78. use with lastfm::setNetworkAccessManager(). Our default is pretty good
  79. though, auto-determining proxy settings on Windows and OS X for instance.
  80. Using liblastfm_fingerprint
  81. ===========================
  82. The liblastfm_fingerprint library does not decode audio files. We anticipate
  83. that Phonon will soon do that work for us. In the meantime, sample *Source
  84. files for MP3, Ogg Vorbis, FLAC, and AAC/MP4 are available in
  85. src/fingerprint/contrib. If you want to fingerprint files or get metadata
  86. suggestions, you either need to add the *Source files to your project, or
  87. implement your own.
  88. Development
  89. ===========
  90. Public Headers
  91. --------------
  92. 1. Header guards should be prefixed with LASTFM, eg. LASTFM_WS_REPLY_H
  93. 2. #includes should be to the system path eg. #include <lastfm/Scrobbler>
  94. 3. Don't make a header public unless it is absolutely required!
  95. 4. To make the header public edit the headers.files line in the pro file
  96. Private Headers
  97. ---------------
  98. 1. For consistency and to make it more obvious it is a private header, don't
  99. prefix the header guard with LASTFM
  100. 2. #includes should be the full source tree path, eg.
  101. #include "../core/UrlBuilder.h"