Home of the Squeezebox™ & Transporter® network music players.

InstallSVNTrunkAsService

From SqueezeboxWiki

Jump to: navigation, search

Installation

  1. Download and install ActiveState perl (In WinXP Perl 5.10 doesnt seem to work out-of-the-box with SqueezeCenter, 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\Slimserver
  5. Browse to this folder in Explorer
  6. Right-click and choose "SVN Checkout"
  7. Enter http://svn.slimdevices.com/repos/slim/[release/trunk] as the "URL of Repository" ("[release]" 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. 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. Open a Command prompt and create the new SlimServer service as follows:
    instsrv slimsvc "C:\Program Files\Windows Resource Kits\Tools\srvany.exe"
  11. Configure the SlimServer 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 [=perl -w "C:\Program Files\SlimServer\server\slimserver.pl"]
  12. If you have a firewall installed, don't forget to make sure you open the necessary ports.
  13. Start the new service from the Services tool or from the command-line as follows:
    net start slimsvc
  14. Browse to http://localhost:9000 to check it's working.
  15. Finally, go to Server Settings and set your Music Folder location.

Updating

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\server"

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.

Errors

Should SlimServer 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.