<?sphp $this->text('pagetitle') ?>
Home of the Squeezebox™ & Transporter® network music players.

Install SVN trunk as service

From SqueezeboxWiki

(Redirected from InstallSVNTrunkAsService)
Jump to: navigation, search


  1. Download and install ActiveState perl (Perl 5.10 is required to run Squeezebox Server 7.4. For SqueezeCenter 7.3, use the latest 5.8 version)
  2. Download and install TortoiseSVN
  3. Download and install the Windows Server 2003 Resource Kit Tools
  4. Create a folder C:\Program Files\Squeezebox, C:\Program Files\Slimserver or C:\Program Files\SqueezeCenter. Win32.pm only looks for files in one of these folders during startup, so you must use one of the three folder names for the server to start.
  5. Browse to this folder in Explorer
  6. Right-click and choose "SVN Checkout"
  7. Enter [1] http://svn.slimdevices.com/repos/slim/7.4/trunk/server as the "URL of Repository" ("7.4" should be replaced by the release version number you'd like to base your installation upon (e.g. "7.3", for a demonstration follow the link with your browser).
  8. Click OK and wait until the Checkout completes
  9. This step is not required for 7.4. Browse to the C:\Program Files\Slimserver\server folder. Check to see if there is a folder called "Cache". If it doesn't exist, create it.
  10. Win32.pm only looks for scanner.exe which doesn't exist when running interpreted perl. You need to tell the server to use scanner.pl instead. Browse to the C:\Program Files\Squeezebox\Slim\Utils\OS folder and create the file called Custom.pm with the contents below. Replace the "Squeezebox" in the PATHs with the folder name you created above, if different.
package Slim::Utils::OS::Custom;
use strict;
use base qw(Slim::Utils::OS::Win32);
sub initDetails {
       my $class = shift;
       $class->{osDetails} = $class->SUPER::initDetails();
       # Make sure we can find any CPAN modules packaged with Squeezebox Server.
       unshift @INC, 'C:/Program Files/Squeezebox/CPAN';
       # Make sure plugin files are found.
       push @INC, 'C:/Documents and Settings/All Users/Application Data/Squeezebox';
       return $class->{osDetails};
sub scanner {
	return 'C:/Program Files/Squeezebox/scanner.pl';
  1. The latest 5.10 ActiveState perl requires Digest::SHA1 to be newer than 2.11. Version 2.11 is still included within the source and needs to be removed before attempting to start the server. Browse to the C:\Program Files\Squeezebox\CPAN\Digest folder. Right click on SHA1.pm, select TortoiseSVN->Delete and add to the ignore list->SHA1.pm. After an exclaimation mark is added to the icon, delete the file.
  2. Open a Command prompt and create the new Squeezebox Server service as follows:
    instsrv slimsvc "C:\Program Files\Windows Resource Kits\Tools\srvany.exe"
  3. Configure the Squeezebox Server service as follows:
    1. Run regedit
    2. Go to [=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services]
    3. Right-click the slimsvc keyname, point to New, and then click Key.
    4. In the console pane, for the name of the new key, type Parameters.
    5. Right-click the Parameters subkey, point to New, and then click String Value.
    6. Type the name of the new entry as Application.
    7. Right-click Application and then click Modify.
    8. In the Edit String window, in Value Data, type [C:\perl\bin\perl "C:\Program Files\Squeezebox\slimserver.pl"]
  1. If you have a firewall installed, don't forget to make sure you open the necessary ports.
  2. Start the new service from the Services tool or from the command-line as follows:
    net start slimsvc
  3. Browse to http://localhost:9000 to check it's working.
  4. Finally, go to Server Settings and set your Music Folder location.

Steps 3.2 through 3.8 can be replaced by a copy and paste of the following into notepad, save the file as slimsvc.reg and import with regedit. You may need to adjust the path to slimserver.pl.

Windows Registry Editor Version 5.00
"DisplayName"="Squeezebox Server SVN"
"Application"="C:\\perl\\bin\\perl  \"C:\\Program Files\\Squeezebox\\slimserver.pl\""


To update to the latest version simply browse to the folder in Explorer, right-click, and choose "SVN Update". You will need to restart the service for the changes to take effect.

Alternatively, a batch file can be written to automate the update. The following temporarily stops the service, updates to the latest SVN, and then restarts the service. This ensures that all files can be overwritten during the update. Here's an example of how the batch file should look like:

net stop slimsvc
"<path to Tortoise SVN bin folder>\TortoiseProc.exe" /command:update /path:"<path to Slimserver>" /notempfile /closeonend:1
net start slimsvc

Where <path to Slimserver>: e.g. "C:\Program Files\SlimServer"

The argument /closeonend:1 closes the TortoiseProc window if no errors occur. If you would prefer to keep the GUI window up with what occured you can remove this argument.


Should Squeezebox Server crash, the application will not log the error report to the event log. srvany.exe will still be running, and thus the service will still be reported as running. The service should therefore be stopped manually using net stop slimsvc, and then restarted with net start slimsvc.