bcrowell2 has asked for the wisdom of the Perl Monks concerning the following question:

O Monks,

I have a Perl/Tk app that I designed to be multiplatform, and that used to run fine on both Linux and Windows. However, it got to be a hassle supporting Windows users, since I didn't have a Windows box for testing, so I switched to only supporting Linux. Recently it occurred to me that it might be fun to see if I could get it running in Wine.

Has anyone tried running strawberry perl (SP) inside wine? I ran the installer, and was able to run hello_world.pl from inside wine. However, I'm stymied so far by how to install CPAN modules. SP installs a CPAN item in the Start Menu, and the strings command reports that this seems to be a link to C:\strawberry\perl\bin\cpan.bat. To run a .bat file in wine, googling shows lots of stuff about wcmd, but I don't seem to have anything called wcmd on my wine install. Apparently there is also something called wineconsole which emulates a DOS console. I did "wineconsole cmd," which gave me a DOS prompt, and then when I typed cpan, I got "Cannot open $CONOUT for write at ...CPAN.pm line 248", where line 248 is $term = Term::ReadLine->new('CPAN Monitor');.

Anyone have any suggestions?

TIA!

Update: I tried writing a perl script that did "use CPAN; install 'Tk'". The result was that it tried to connect to cpan.strawberryperl.com via ftp, but failed because it couldn't find an ftp program.

Replies are listed 'Best First'.
Re: strawberry perl in wine?
by marto (Cardinal) on Jan 03, 2009 at 10:45 UTC

    If your goal is to test your app running in a Windows environment would you not be better using a VM solution such as Virtualbox or VMware? I realise that you need a licence for whatever version of Windows you want to use, however this way you know that any tests that fail are purely related to your app running under windows.

    Martin

      Thanks, Martin and Zentara, for your replies. This is an OSS app that I'm not selling for money, so I don't really want to pay money for a copy of Windows just so I can support Windows users.

        In that case perhaps you may be able to find someone who does run windows who can test your app and help with any platform specific problems.

        Martin

Re: strawberry perl in wine?
by zentara (Cardinal) on Jan 03, 2009 at 14:13 UTC
    In addition to what Marto said, why not do a dual-boot? If you really wanted to support Windows, you may as well run it under real windows, or you will probably waste time tracking down bugs caused by Wine. Of course, that means you may need to buy a Windows license......:-(.

    As an alternative, you might see if Camelbox: A build of Gtk2-Perl for Windows CamelBox will run under Wine. I installed CamelBox into my pre-installed Vista Basic on my laptop, and it has Tk and a bunch of other modules contained in it(optionally). I did start the Camelbox installer under Wine (Ubuntu Intrepid's version), and it seemed to start up and run, but I did not fully try to complete the install, so YMMV depending on Wine version, etc.


    I'm not really a human, but I play one on earth Remember How Lucky You Are
      The app uses Perl/Tk, not Gtk.
        CamelBox gives you some checkbox options to install Perl/Tk, as well as many other useful modules, like DBM, Tk, and networking modules. I test Perl/Tk on my Vista Basic running CamelBox.

        I'm not really a human, but I play one on earth Remember How Lucky You Are