Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Senior Member
    Join Date
    Dec 2006
    Posts
    198

    Applying a patch?

    I am currently running Slimserver 6.5.4 on a Windows machine. I was wondering how you apply a patch (like this one: http://bugs.slimdevices.com/attachme...68&action=view )?


    SlimServer Version: 6.5.4 - 12568 - Windows XP - EN - cp1252
    Server IP address: 192.168.2.50
    Perl Version: 5.8.8 MSWin32-x86-multi-thread
    MySQL Version: 5.0.22-community-nt

  2. #2
    NOT a Slim Devices Employee kdf's Avatar
    Join Date
    Apr 2005
    Posts
    9,493
    Quote Originally Posted by lemmy999 View Post
    I am currently running Slimserver 6.5.4 on a Windows machine. I was wondering how you apply a patch
    In short, you don't. If you have installed the windows version using the installer, everything is pre-compiled. The source is included, but any changes will have no effect aside from the Plugin modules.

    If you wish to run the server manually, you can install ActivePerl from activatestate.com and run slimserver.pl from a command session. This will use the source modules at runtime. You can apply a patch, usually with the command:
    patch -p0 < <patchfile>

    replacing <patchfile> with the name of the patch file you need to use. If you don't have the patch command on your system (windows doesn't usually have dev tools installed) then you are stuck doing it manually (unless you install some third party app). Remove the lines with '-' at the start, replacing them with the lines starting with '+'. The filenames are given for each group, with line numbers to help you find things. All files are text files with unix-style line endings, so you'll want to use wordpad to edit them (notepad would be messy). Programs like UltraEdit and TextPad are great for this. TortoiseSVN is a good option if you want to do a direct "check out" of code from SD and it supports applying patches as a menu option.

    -kdf

  3. #3
    Senior Member
    Join Date
    Dec 2006
    Posts
    198
    Thanks for the information. So if I run slimserver.pl from a command session, would I be unable to start slimserver as a service in windows?

  4. #4
    NOT a Slim Devices Employee kdf's Avatar
    Join Date
    Apr 2005
    Posts
    9,493
    There are tools to allow you to run as a service. srvany or firedaemon will work. Google should give you plenty of info on how to download and set up either one.
    -kdf

  5. #5
    Senior Member
    Join Date
    Dec 2006
    Posts
    198
    Thanks. One last question concerning applying the patch though. I assume the "revision" numbers in the patch have to match the ones in the .pm files that are going to be modified. Since the nightly builds are updated every day, and only about 4-5 days worth of nightly builds are available, how are you supposed to get the correct revision of the files for the patch.

  6. #6
    NOT a Slim Devices Employee kdf's Avatar
    Join Date
    Apr 2005
    Posts
    9,493
    The revisions are only there for reference. If the code that you are patching is similar enough, then the patch program will find the right place based on the extra lines either side of the changed lines. If it cannot find the right place, the "hunk" will fail, and you'll be left to sort out the rejected hunks manually.

    If you want to keep up with daily code, then use TortoiseSVN, which allows you to check out any specific revision that you like.

    -kdf

  7. #7
    Senior Member
    Join Date
    Dec 2006
    Posts
    198
    Then couldn't I just apply the patch to the source code that comes with the windows installation, then install perl on my computer and use the perl module PAR to complie slimserver.pl to slim.exe?

  8. #8
    NOT a Slim Devices Employee kdf's Avatar
    Join Date
    Apr 2005
    Posts
    9,493
    Quote Originally Posted by lemmy999 View Post
    Then couldn't I just apply the patch to the source code that comes with the windows installation, then install perl on my computer and use the perl module PAR to complie slimserver.pl to slim.exe?
    If you want to pay for ActiveStates Perl Dev Kit, then yes, that should be possible. I assumed you'd probably want to spend a lot less money on it.

    -kdf

  9. #9
    Senior Member
    Join Date
    Dec 2006
    Posts
    198
    But couldn't I just install Active Perl and then use something like Perl2Exe to compile slimserver.pl? Or would I need PerlSvc which is a tool that only comes in the ActiveState dev kit?

  10. #10
    NOT a Slim Devices Employee kdf's Avatar
    Join Date
    Apr 2005
    Posts
    9,493

    Applying a patch?

    On 16-Oct-07, at 7:42 AM, lemmy999 wrote:

    >
    > But couldn't I just install Active Perl and then use something like
    > Perl2Exe to compile slimserver.pl? Or would I need PerlSvc which is a
    > tool that only comes in the ActiveState dev kit?


    That, I cannot answer. If you'd like to try it out and let us know,
    great.
    Personally, I wouldn't waste my time compiling if you can turn
    slimserver.pl into a service on it's own.
    -kdf

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •