Developers interested in working with the plugin in source form can:
- Confirm that they have the tools necessary to build the project.
- Get the source either as a tarball or using CVS.
- Browse the sources.
- Build the project from original sources.
- Contribute to the further development of the project.
Requirements for building
RealSlim consists of source in both Perl and C++. Since Rhapsody is
only available on Windows, the C++ sources are Windows specific. The
tools necessary to build the project are:
- Perl 5.8.1 or later.
- Cygwin tools
- Microsoft Visual C++ 7 or later..
Getting the source
Sources for this project can be retrieved in one of two ways:
- By downloading the latest source tarball.
- By checking out the source files using CVS. The modules defined for this project are:
- realslim - The Perl and C++ code for the plugin and native components.
- web - These web pages.
Browse the RealSlim sources
The project consists of the following directories:
- Plugin - The SlimServer plugin, written in Perl. The main
components of the plugin are:
- Plugin.pm - The main plugin entry point. Contains common functions
for all the SlimServer menu modes. Manages the UPnP and IPC connection
with the native code component in the Rhapsody application.
- Scraper.pm - Screen scrapes HTML files representing the Rhapsody
catalog. Data from these files is presented in the plugin UI.
- Search.pm - Implements the Search Catalog menus.
- LibraryUPnP.pm - Interacts with the Rhapsody application using UPnP to get the My Library
- CPAN - Copies of Perl CPAN modules that are required by the
plugin. These modules are added to the @INC list at plugin
- win32 - C++ code that interacts directly with the Rhapsody
application. The code is compiled into two different modules:
- HookAndDie.exe - A simple executable that finds a running Rhapsody
process. It creates a remote thread in the running Rhapsody
process. The remote thread is responsible for loading the RhapsodyHook
DLL. The application quits after the thread has been "injected" into
the Rhapsody process.
- RhapsodyHook.dll - A DLL that's loaded into the Rhapsody
process. The code in this DLL takes on multiple functions:
- It implements a simple HTTP server that is responsible for serving
PCM or MP3 compressed audio data that makes up an individual track.
- It "hooks" Win32 Multimedia API calls that are responsible for
playing audio samples to the computer's audio device. Audio samples
are sent to the device, but are also used for serving HTTP clients.
- It uses home-grown IPC to communicate with the SlimServer plugin,
passing along cookie information needed by the plugin to scrape
catalog web pages, and responding to requests that control the
application (e.g. pressing pause, stop or mute buttons).
Build the RealSlim sources
The Perl script
makerelease.pl can be used to build
the sources. The usage block for the script is:
makerelease.pl [--debug] [--command COMMAND] [--install INSTALLDIR] [--archive]
--debug - Native components will be built with debugging information.
--command COMMAND - The build command to use for native components
("build" by default).
--install INSTALLDIR - The location of the SlimServer executable if the
plugin needs to be installed.
--archive - Create zip archives for binary and source distributions. Can
not be used in conjunction with the --install option.
Contribute to the project
Developers interested in contributing to the project should post
suggestions and patches to the Developers
Bugs and feature requests can be reported using the project's Bug
and Feature Request