LMS for Windows using Strawberry Perl

ralphy <ralphy.ae4ytz-NUepA2SMhDQqspMVqqL2D+4xXEVPTSb/[email protected]>
Newsgroups gmane.music.equipment.slimdevices.devel
Organization Logitech Squeezebox Forums
Message-ID <[email protected]>
LMS for Windows using Strawberry Perl 5.32 64bit

It's still early days, but I wanted to announce that I have a POC of LMS
8.3 running from git on Windows 10 using the latest 'Strawberry Perl
5.30.1.1 64-bit'
(https://strawberryperl.com/download/5.32.1.1/strawberry-perl-5.32.1.1-64bit.msi).
I've only built the perl modules for the 64bit install and don't plan
to create a 32-bit version.  Is there really any point?

I have not investigated if SB Perl supports compiled perl executables. 
I hope that with the help of forum members we can decide on and
implement an approach to create a replacement for the defunct Active
State Perl we're using now. One idea I had is to use the 'portable
version of Strawberry Perl' (https://strawberryperl.com/releases.html)
and bundle it with LMS in a self extracting zip file installer.

If you'd like to do some testing, and are comfortable using the command
line,  here are the install steps.

1. If you have Active State perl 5.14.2 already installed do NOT
uninstall it as you won't be able to reinstall and update all it's perl
modules later.  Instead just rename the base folder.

I renamed C:\Perl to C:\ActiveStatePerl.  Which also breaks them in the
cmd PATH which you want, because the new modules don't run with the old
perl.  To revert, uninstall Strawbery Perl and change the folder name
back.

2. Install Strawberry Perl 5.32 64bit from the link above in
C:\Strawberry, the default, and allow the installer to update your PATH
environment variables.

3. Open a new command prompt window with administrator rights clone '
the repository' (https://github.com/ralph-irving/slimserver-win64) into
C:\Program Files\Squeezebox\slimserver


Code:
--------------------
    
  C:
  cd "\Program Files\Squeezebox\"
  git clone https://github.com/ralph-irving/slimserver-win64 slimserver
  cd slimserver
  
--------------------


If you don't have git install, you can download a zip file from the
repository and extract it.

4. If you already have LMS installed and running. Stop it now.

5. Confirm the right perl version is in your PATH.

Code:
--------------------
    
  C:\>perl -v
  
  This is perl 5, version 32, subversion 1 (v*5.32.1*) built for *MSWin32-x64-multi-thread*
  
  Copyright 1987-2021, Larry Wall
  
--------------------


6. Execute the LMS run command script

Code:
--------------------
    
  cd "\Program Files\Squeezebox\slimserver"
  runslimserver
  
--------------------


7. Try to access http://localhost:9000/ from a browser.

Here's my server information details.


Code:
--------------------
    Logitech Media Server Version: 8.3.0 - TRUNK @ UNKNOWN
  Hostname: hera
  Server IP Address: 192.168.11.19
  Server HTTP Port Number: 9000
  Operating system: Windows 10 - EN - cp1252
  Platform Architecture: 8664
  Perl Version: 5.32.1 - MSWin32-x64-multi-thread
  Audio::Scan: 1.05
  Mozilla::CA: 20200520
  Net::SSLeay: 1.90 - OpenSSL 1.1.1i 8 Dec 2020
  IO::Socket::SSL: 2.069
  Database Version: DBD::SQLite 1.66 (sqlite 3.32.3)
  Total Players Recognized: 1
  
  
  Cache Folder			C:\ProgramData\Squeezebox\Cache
  Preferences Folder		C:\ProgramData\Squeezebox\prefs
  Plugin Folders			C:\Program Files\Squeezebox\slimserver\Slim\Plugin, C:\ProgramData\Squeezebox\Cache\InstalledPlugins\Plugins, C:\Program Files\Squeezebox\slimserver\Plugins
  Helper Applications Folder 	C:\Program Files\Squeezebox\slimserver\Bin\MSWin32-x64-multi-thread, C:\Program Files\Squeezebox\slimserver\Bin, C:\Strawberry\perl\bin
  
  
--------------------



8. The server logs and redirected STDIN and STDOUT logs are located in
C:\ProgramData\Squeezebox\Logs If not, you may need to create the folder
first.


If Strawberry Perl included modules required by LMS I did not build
them.  For a couple modules I had to install the SB Perl .pm modules
files into "slimserver\CPAN\arch\5.32\MSWin32-x64-multi-thread" to
override the dynamic loader default version specified in LMS bootstrap.

I only had to build the following modules;


Code:
--------------------
    Audio-Cuefile-Parser-0.02
  Audio-Scan-1.05
  Class-XSAccessor-1.18
  EV-4.03
  Image-Scale-0.14
  MP3-Cut-Gapless-0.03
  Template-Toolkit-2.21
  Win32-Process-List-0.09
  XML-Parser-2.41
  YAML-LibYAML-0.65
--------------------


There are no build scripts yet, I compiled and tested each module
manually to confirm they worked.  Most required code changes to compile
with the SB Perl included gcc mingw64.

All sources and required changes are available in
https://github.com/ralph-irving/slimserver-vendor-win64 and
https://github.com/ralph-irving/slimserver-win64

Should LMS be reliable with SB Perl my plan is to export both
repositories and create pull requests to the official.

Strawberry perl windows sysread function returns POSIX errno codes.  The
'current change'
(https://github.com/ralph-irving/slimserver-win64/commit/607f84a893ae6125c3f3aaa658e5d49057fa6e1c)
breaks Active State perl which returns WSA error codes for sysread.  I
need to find a quick way to determine which perl flavour is in use
before I can make the change portable and it might have broken other
stuff, we'll see.

I have only tested using the default plugins, so there's likely to be
issues with some 3rd party plugins.

I rebuilt all the helper binaries using the 64bit gcc compiler except
for socketwrapper and wmadec.  I used Visual Studio 2017 for those,
since that's what I have installed.

I could not find the source code for grant.exe, so I copied the 32-bit
version which I also did for sls.exe, which I think uses a closed source
aac decoder.



Ralphy

*1*-Touch, *5*-Classics, *3*-Booms, *2*-UE Radio
'Squeezebox client builds'
(https://sourceforge.net/projects/lmsclients/files/) 'donations'
(https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=LL5P6365KQEXN&lc=CA&item_name=Squeezebox%20client%20builds&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted)
always appreciated.
------------------------------------------------------------------------
ralphy's Profile: http://forums.slimdevices.com/member.php?userid=3484
View this thread: http://forums.slimdevices.com/showthread.php?t=115740
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.