Home of the Squeezebox™ & Transporter® network music players.
Page 44 of 55 FirstFirst ... 34424344454654 ... LastLast
Results 431 to 440 of 546
  1. #431
    Senior Member
    Join Date
    Dec 2009
    Location
    Albinea (RE) Italy
    Posts
    816
    Quote Originally Posted by bpa View Post
    Maybe I'm misunderstanding something - why do you need to produce a new .exe for a change required by an installable plugin ?
    yes.

    LMS when transcoding require to use an executable that FindBin could locate in path. In linux C-3PO wrote in Perl and containing only the main is an executable by itself, in Win is not.

    The easiest way is then to produce an 'exe' with PAR that is like a JAR for java, a simply packed code self-containing all the code tree.

    That's why I surley could change the source and leave the exe as it is, but I like more the two being in sync.

    What I need is a PAR module working with PERL 5.14.1 if someone has got it.
    __________________________________________________ ______________________
    Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

  2. #432
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    18,885
    Quote Originally Posted by marcoc1712 View Post
    yes.

    LMS when transcoding require to use an executable that FindBin could locate in path. In linux C-3PO wrote in Perl and containing only the main is an executable by itself, in Win is not.

    The easiest way is then to produce an 'exe' with PAR that is like a JAR for java, a simply packed code self-containing all the code tree.

    That's why I surley could change the source and leave the exe as it is, but I like more the two being in sync.

    What I need is a PAR module working with PERL 5.14.1 if someone has got it.
    I understand what PAR is and ActiveState has a different system although probably based on same idea.

    Don't think that is right - why not put FindBin in the Bin directory of your installable plugin as that is usually where plugin specific transcoding exes are put.

  3. #433
    Senior Member
    Join Date
    Dec 2009
    Location
    Albinea (RE) Italy
    Posts
    816
    Quote Originally Posted by bpa View Post
    I understand what PAR is and ActiveState has a different system although probably based on same idea.
    PAR is form activestate ; https://code.activestate.com/ppm/PAR-Packer/

    but installing it with PPM does not work, tried to use CPANM, neither.


    Quote Originally Posted by bpa View Post
    Don't think that is right - why not put FindBin in the Bin directory of your installable plugin as that is usually where plugin specific transcoding exes are put.

    And then? The problem is not to override the location of C-3PO.exe, but to produce it! Completely change the structure of transcoding helper in order not to use only executables is something that I would like to avoid. I tried to use PERL as the executable and C3PO-pl at command line, does not work either.

    You have a lot of particularity in WIN, starting form the tremendous socketWrapper...

    WIth a PAR modules works, if I could replicate that I'll release a new minor version, if not, sorry but I have got no time at the moment for a major review, but any pull request is welcome.
    __________________________________________________ ______________________
    Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

  4. #434
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    18,885
    Quote Originally Posted by marcoc1712 View Post
    WIth a PAR modules works, if I could replicate that I'll release a new minor version, if not, sorry but I have got no time at the moment for a major review, but any pull request is welcome.
    I had a quick look at plugin source file but its working so I'm not sure what is the specific Win issue.

    I think the general aim is to make everything possible within the plugin and not require special builds - if there is an issue with getting a path would something win32 specific like Win32::GetFullPathname help ?

    I am aware of some Win version peculiarities and for example, have had to resort to use Win32:: module to provide "missing" functionality.

    IIRC You had an issue with socketwrapper seemingly losing a chunk at end of a track, not sure if it is still an issue - a fix for a similar symptom but in a streaming service context was recently suggested.

  5. #435
    Senior Member
    Join Date
    Dec 2009
    Location
    Albinea (RE) Italy
    Posts
    816
    Quote Originally Posted by bpa View Post
    I had a quick look at plugin source file but its working so I'm not sure what is the specific Win issue.

    I think the general aim is to make everything possible within the plugin and not require special builds - if there is an issue with getting a path would something win32 specific like Win32::GetFullPathname help ?

    I am aware of some Win version peculiarities and for example, have had to resort to use Win32:: module to provide "missing" functionality.

    IIRC You had an issue with socketwrapper seemingly losing a chunk at end of a track, not sure if it is still an issue - a fix for a similar symptom but in a streaming service context was recently suggested.
    The problem with Perl in socketWrapper was it simply hang.

    What you probably do not realize is that C-3PO could run as the plugin itself to just 'prepare' the commands that LMS will then use, replacing convert.conf and similar, but it could also perform as the transcoder itself, when settings requires some choice to be made at playtime, based on characteristics of the selected file to be played, other than file extension.

    Look at C_3PO.pl, that is the main in that case, using same modules used at setup time to produce a more specific command.

    In Windows, you could not use that as an 'executable' as you do in linux or macOs so you need to pack it in an exe.

    I already have revisoned sources that works in windows and linux, but I would like to produce a new .exe accordingly before distributing

    Is not a matter of find other executables, that's works fine, I includede Audio:scan 0.95 and few others bin because in 2012 they where not in the standard distribution, but now sure I could get rid of most of them, but i need to test, more in 2012 i had to 'invent' a way to download huge executables, now is in the standard, so i coul get rid of many parts I wrote for windows.

    But this require time that currently I miss
    .
    __________________________________________________ ______________________
    Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

  6. #436
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    18,885
    Quote Originally Posted by marcoc1712 View Post
    The problem with Perl in socketWrapper was it simply hang.
    The solution other user proposed (disable watchdog timer on on thread) will not apply as it was a case of socketwrapper finishing too early.

    What you probably do not realize is that C-3PO could run as the plugin itself to just 'prepare' the commands that LMS will then use, replacing convert.conf and similar, but it could also perform as the transcoder itself, when settings requires some choice to be made at playtime, based on characteristics of the selected file to be played, other than file extension.

    Look at C_3PO.pl, that is the main in that case, using same modules used at setup time to produce a more specific command.

    In Windows, you could not use that as an 'executable' as you do in linux or macOs so you need to pack it in an exe.
    OK - I didn't know c3po was also an exe.

    Instead a new exe each time, the only way I could see any way of working would be to have a generic stub c3po exe which dynamically loads a c3po source module using something such as Require in an eval block or eval string on a source file. However I'm guessing you already thought of that and it won't work.

    But this require time that currently I miss.
    Lack of time is always a problem and so we have to accept solutions which are not as complete as we would like.

  7. #437
    Senior Member
    Join Date
    Dec 2009
    Location
    Albinea (RE) Italy
    Posts
    816
    Quote Originally Posted by bpa View Post
    Instead a new exe each time, the only way I could see any way of working would be to have a generic stub c3po exe which dynamically loads a c3po source module using something such as Require in an eval block or eval string on a source file.
    I'm not aware in how to accomplish that, have you got a working example? AFAIK the evaluation is made at compile time and the module is then statically loaded inside the EXE.
    If it works could be the best solution.
    __________________________________________________ ______________________
    Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

  8. #438
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    18,885
    Quote Originally Posted by marcoc1712 View Post
    I'm not aware in how to accomplish that, have you got a working example? AFAIK the evaluation is made at compile time and the module is then statically loaded inside the EXE.
    If it works could be the best solution.
    I'm pretty sure even with an Perl exe you can still dynamically load modules.

    You could try the example given here https://perlmaven.com/string-eval
    I haven't built a Perl exe for a v. long time. If you easily try the above "load_on_os" type example, perhaps I can make a test LMS plugin to demonstrate it and it would also validate use on Windows exe.

    For ways to avoid eval in string mode see https://stackoverflow.com/questions/...out-using-eval

  9. #439
    Senior Member
    Join Date
    Dec 2009
    Location
    Albinea (RE) Italy
    Posts
    816
    Quote Originally Posted by bpa View Post
    I'm pretty sure even with an Perl exe you can still dynamically load modules.

    You could try the example given here https://perlmaven.com/string-eval
    I haven't built a Perl exe for a v. long time. If you easily try the above "load_on_os" type example, perhaps I can make a test LMS plugin to demonstrate it and it would also validate use on Windows exe.

    For ways to avoid eval in string mode see https://stackoverflow.com/questions/...out-using-eval
    Problem is If I could compile a new version using dynamic loading, means I could compile... that's still the first problem.

    BTW seems iI managed to compile a PAR::PACKER valid for 5.14.1, but now I recall why I had to distribute the autoloaded modules: Where, running on windows NOT from code, I have to look for Audio::Scan.pm and others?

    I'll put a copy of the new version in lib just to try if this solution works in any OS, then we will see what to in the next major release.
    __________________________________________________ ______________________
    Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

  10. #440
    Senior Member
    Join Date
    Dec 2009
    Location
    Albinea (RE) Italy
    Posts
    816
    A new version is availlable in beta test, please add:

    Code:
    https://github.com/marcoc1712/C-3PO/releases/download/v2.02.14/repository-v2_02_14.xml
    as an additional repository and let LMS install version v2.02.14 it should work in all linux systems. I'm unable to try the download in windows becouse I get an error pointing to that rep, don't know why, but is working in my installation.

    Please let me know about and then I'll move the new version into the production repository.

    I'll apreciate if anyone could try it also in macOsx

    Thanks a lot.
    __________________________________________________ ______________________
    Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

Posting Permissions

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