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.32.1.1 64-bit. 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 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 into C:\Program Files\Squeezebox\slimserver
If you don't have git install, you can download a zip file from the repository and extract it.Code:C: cd "\Program Files\Squeezebox\" git clone https://github.com/ralph-irving/slimserver-win64 slimserver cd slimserver
4. If you already have LMS installed and running. Stop it now.
5. Confirm the right perl version is in your PATH.
6. Execute the LMS run command scriptCode:C:\>perl -v This is perl 5, version 32, subversion 1 (v5.32.1) built for MSWin32-x64-multi-thread Copyright 1987-2021, Larry Wall
7. Try to access http://localhost:9000/ from a browser.Code:cd "\Program Files\Squeezebox\slimserver" runslimserver
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;
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.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
All sources and required changes are available in https://github.com/ralph-irving/slimserver-vendor-win64 and https://github.com/ralph-irving/slimserver-win64
The work in progress platform build scripts are in the win64 branch of https://github.com/ralph-irving/slim...rms/tree/win64
Should LMS be reliable with SB Perl my plan is to export both repositories and create pull requests to the official.
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.
Results 1 to 10 of 27
-
2022-01-12, 04:11 #1
LMS for Windows using Strawberry Perl
Last edited by ralphy; 2022-02-03 at 04:46. Reason: Added platform build source url
Ralphy
1-Touch, 5-Classics, 3-Booms, 2-UE Radio
Squeezebox client builds donations always appreciated.
-
2022-01-12, 04:12 #2
.....
Ralphy
1-Touch, 5-Classics, 3-Booms, 2-UE Radio
Squeezebox client builds donations always appreciated.
-
2022-01-12, 05:39 #3
LMS for Windows using Strawberry Perl
Wow... I'm speechless. This is quite a challenge you picked up there.
Thank you very much for the work so far! This is looking very promising!
I think moving away from ActiveStates' PDK will require some more
thoughts: should we get rid of all those helpers we have around (control
panel, tray icon, service registration helper)? Maybe the service could
be registered using a newer/enhanced version of the installer?
Did you look into PAR-Packer (https://metacpan.org/pod/pp)? "pp creates
standalone executables from Perl programs". I've played around with it
many years ago...
Now I'll have to find a way to run Windows to help with this effort...
Would anybody know about a virtualization product which can run Windows
on a M1 Mac? I once tried to install a Windows on my NAS. But the
outcome was worse than what I expected (it didn't succeed installing at
all).
-
2022-01-13, 04:56 #4
I've enjoyed the challenge. It's been a project that I wanted to persue for a while, it's kept me busy and helps the community.
I'm sure there will be issues migrating away for the PDK, I've never used it so will likely need help to create similiar with the new tools.
Perhaps a forum poll would help to decide. I'm not a daily windows user and can't remember the last time I used those tools.
When I run LMS for windows it's from git in a minimized command prompt.
I wasn't aware of PAR-Packer. Strawberry Perl apparently supports it. I'll take a look.
Thanks for your help with the problem of the different errno code between the perl versions. It's fixed now it git and I've removed my comment from the first post.Ralphy
1-Touch, 5-Classics, 3-Booms, 2-UE Radio
Squeezebox client builds donations always appreciated.
-
2022-01-17, 07:01 #5
LMS for Windows using Strawberry Perl
> CALL pp -o ..\slimserver.exe -M Win32:: -X XML::Parser -X XML::Parser::Expat -X YAML::XS -X Class::XSAccessor -X Template::Stash::XS slimserver.pl
Would that executable include all Slim/* files? Were the existing
*.perlapp etc. files of any help (eg.
https://github.com/Logitech/slimserv...nter.perlsvc)?
> I now need to script the entire build process which on Windows is going
> to be a pain.
Hey, you got Perl on that system, don't you? ;-)
You could fork
https://github.com/Logitech/slimserv...8.3/buildme.pl.
-
2022-01-17, 07:45 #6
Not really. Par-Packer doesn't bundle the application perl files in the executable, it runs them from disk and even expands it's internal perl scripts into a temp folder to run.
Code:C:\Users\%USERNAME%\AppData\Local\Temp\par-706164646f636b64\cache-af4f1571ecd40885f61f935cb2429de4774f953b\inc\lib
Good point on the Perl. I'll try to create a win64 platform variant. Thanks.Ralphy
1-Touch, 5-Classics, 3-Booms, 2-UE Radio
Squeezebox client builds donations always appreciated.
-
2022-01-26, 07:18 #7
I've made some progress as I now have a 64bit installer working for the server and scanner programs so you can at least run the squeezesvr.exe from a cmd prompt.
However I've run into a few issue with these programs.
I haven't looked at the SqueezeSvc integration indepth yet, but it appears to be using PerlSvc which is another ActiveState Perl SDK extension.
The SqueezeTray program requires PerlTray which AFAICT is an ActiveState Perl module only.
The SqueezeCP program crashes in the Wx dll when run in compiled binary form, but works when run as perl.exe cleanup.pl
If the platforms buildme.pl script is run with full paths with or without the drive letter prefix then the system calls using rsync fail because c: is interpreted as a remote host and \ or / at the start of the path requires a /cygdrive/c prefix to actually reference the top level of the filesystem. If only relative paths are specified then the rsync commands run but other system calls in buildme.pl fail. I've worked around this by changing buildme.pl to append the prefix for now but would like to remove it if possible.
Here what I'm using from a cmd prompt with Strawberry Perl and a set of Unix command for windows in the PATH.
Code:perl buildme.pl --build win64 --buildDir /msys64/home/ralphy/source/slimserver-build --sourceDir /msys64/home/ralphy/source --destDir /msys64/home/ralphy/source/slimserver-install
What version and build of rsync is used on the win32 build machine?
Could you provide me a copy for rsync and any required dlls from the win32 build system?
I've tried 5 different rsync binaries and they all work a bit different with respect to pathnames. I'm currently using the 64bit 3.1.3 build from https://rsync.samba.org
Thanks,Ralphy
1-Touch, 5-Classics, 3-Booms, 2-UE Radio
Squeezebox client builds donations always appreciated.
-
2022-01-26, 23:10 #8
LMS for Windows using Strawberry Perl
> I've made some progress as I now have a 64bit installer working for the
> server and scanner programs so you can at least run the squeezesvr.exe
> from a cmd prompt.
Excellent!
> I haven't looked at the SqueezeSvc integration indepth yet, but it
> appears to be using PerlSvc which is another ActiveState Perl SDK
> extension.
>
> The SqueezeTray program requires PerlTray which AFAICT is an ActiveState
> Perl module only.
That's correct. Both are PDK features. I wonder whether we'll have to
give up the additional tools going forward. Or look for alternative
implementations: the service probably could be configured using the
installer. The tray icon? I don't know yet. Does Squeezelite-X provide
start/stop controls? Maybe we could talk to R Greg when the time comes.
> The SqueezeCP program crashes in the Wx dll when run in compiled binary
> form, but works when run as perl.exe cleanup.pl
Same here. This has always been a PITA to build. I'd personally rather
drop it than spend too much time updating it...
> If the platforms buildme.pl script is run with full paths with or
> without the drive letter prefix then the system calls using rsync fail
> because c: is interpreted as a remote host and \ or / at the start of
> the path requires a /cygdrive/c prefix to actually reference the top
Oh, I probably didn't mention that before. But buildme.pl indeed would
only run on cygwin, NOT with ActivePerl, IIRC. I don't know how close
Strawberry Perl is.
> What is the command line for buildme.pl currently for the win32 build?
buildme.pl --build win32 --buildDir /home/jenkins/LMS_Win/work
--sourceDir /home/jenkins/LMS_Win --destDir
/home/jenkins/LMS_Win/publish --releaseType nightly
> What version and build of rsync is used on the win32 build machine?
Whatever cygwin installed (don't have access to the build host from
home). That's likely not the issue here, but the cygwin requirement is.
-
2022-01-27, 05:13 #9
The installer still uses Program Files (x86) which I need to change.
I'm pretty sure SLX doesn't currently support lms stop/start. But not sure, I stopped using it when Greg switched to the MS store only. He's since started building the stand alone installer version, so will check it out.
Thanks for confirming the PDK stuff. I haven't given up on squeezecp yet but it really helps to know it's not unique to my build env.
I don't have cygwin installed I just use purpose built win32 versions of the unix commands required for buildme.pl along with the win32 rsync mentioned before.
I've been using these for ages. Some of the binaries are dated back to 1999!
Thanks that helps.
No problem, I don't need it now. You've provided the info I need to continue.Ralphy
1-Touch, 5-Classics, 3-Booms, 2-UE Radio
Squeezebox client builds donations always appreciated.
-
2022-01-27, 05:48 #10
LMS for Windows using Strawberry Perl
> The installer still uses Program Files (x86) which I need to change.
Are you using InnoSetup? Maybe it requires an update, too? I haven't
used it in a long time. Would it be able to configure services etc.?
> I don't have cygwin installed I just use 'purpose built win32 versions
> of the unix commands' (http://unxutils.sourceforge.net/) required for
> buildme.pl along with the win32 rsync mentioned before.
> I've been using these for ages. Some of the binaries are dated back to
> 1999!
cygwin always was about the first thing I'd install on a new Windows box
:-). But great if you can deal without it!