Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

PAR::Packer - stanalone executables for different operating systems

by Microcebus (Beadle)
on Jan 03, 2012 at 21:20 UTC ( #946139=perlquestion: print w/ replies, xml ) Need Help??
Microcebus has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

I'm a biologist and wrote a Perl script that detects and analyses a special kind of gene clusters. Now I want to publish it and would like to provide standalone executables for Win Mac and Linux systems so that users don't have the tantalizingness to install Perl or additional modules before using it.

I'm working on a windows system and made an exe file via PAR Packer. So far, so good. But I've no idea how to do the same for Mac or Linux. I neither have a Mac/Linux machine nor have a clue of handling it./p>

Is there some kind of service provider where I can comission that. Or is anybody here willing to help me?

For an appropriate fee self evident...

Comment on PAR::Packer - stanalone executables for different operating systems
Re: PAR::Packer - stanalone executables for different operating systems
by choroba (Abbot) on Jan 03, 2012 at 21:56 UTC
    On Linux and Mac OS X, Perl is usually already installed.

      This is true, yet some users(especially on MacOS) are afarid/oblivious of the terminal, or do not know how to use it.
      On MacOS, you will have to look through the docs to find info on packaging. On Linux, you can experiment with GNU Makefiles(and our good friend ExtUtils::MakeMaker), or try using one of the package managers(such as RPM or DEB).

      If you choose to do that, look for the RPM spec here, and a simple deb tutorial here.

      ~Thomas~
Re: PAR::Packer - stanalone executables for different operating systems
by rkrieger (Friar) on Jan 03, 2012 at 23:20 UTC

    It'll depend on your target audience and the skill you perceive them to have. For many platforms, releasing your work to CPAN and directing your users there may do the trick. For the average IT department, it shouldn't be that hard to install Perl. For Joe User, I think the same applies, but of course I may well be mistaken.

    The BSD systems come with ports or pkgsrc collections that are fairly kind to CPAN modules. An (arbitrary) example from OpenBSD: p5-AnyEvent for AnyEvent.

    Using CPAN would also work for Mac OS X, I suppose. So long as you package a script that does the install for you. Such will probably require sudo/admin rights, but the GUI can handle that. I've seen such interaction used for e.g. printer driver installations.

    For Windows, you could package the strawberry Perl MSI files along with a batch file to use CPAN for the install of your code. Obviously, there are cleaner ways, but I of course do not know how much you care to spend in resources.

Re: PAR::Packer - stanalone executables for different operating systems
by Anonymous Monk on Jan 03, 2012 at 23:24 UTC

    See http://www.cava.co.uk/ and http://www.citrusperl.com/

Re: PAR::Packer - stanalone executables for different operating systems
by kamalt (Initiate) on Jan 04, 2012 at 06:29 UTC
    Shell scripts would seem to be ideal for doing this on Linux - packaging etc can be done at the script level itself by building in some intelligence and checks - only thing is that this needs to be done such that the script can be run on different linux distros
Re: PAR::Packer - stanalone executables for different operating systems
by mrguy123 (Hermit) on Jan 04, 2012 at 07:02 UTC
    A relatively easy way to install a Linux environment in windows is to use cygwin.
    It is a pretty straightforward installation, just make sure to choose the Perl package in the setup.
    If you make your code work there it should also work on most Linux machines.
    Good luck with your research!
    Guy
Re: PAR::Packer - stanalone executables for different operating systems
by Shuraski (Scribe) on Jan 04, 2012 at 07:27 UTC

    I'd put it on CPAN. If you think it'll help the work of others, why not write it up as a brief report in a bioinformatics journal? That way it can be indexed on PubMed, and biologists will find it.

    What are gene clusters?

Re: PAR::Packer - stanalone executables for different operating systems
by Hessu (Pilgrim) on Jan 05, 2012 at 11:32 UTC
    I think that the easiest way to generate a single standalone executable for various operating systems, is to use Active State Perl Dev Kit. For example you can compile for Linux or Mac OS from Windows just by selecting the target architecture from a GUI. Has been working like a charm for me for years.

    Unfortunately this is not free but there is a trial version to try out if this is suitable for you.

Re: PAR::Packer - stanalone executables for different operating systems
by tsee (Curate) on Jan 07, 2012 at 11:19 UTC

    In terms of using PAR::Packer, there isn't that much of a difference between doing that on win32, MacOS, or Linux. If you're referring to "but I don't know how to set up an environment with everything to invoke the same 'pp' command line that I used on Windows", then the answer is most likely:

    sudo cpan PAR::Packer Some::Module::That::You::Need Other::Module::That::You::Need ...

    If that fails, then you might be missing the perl headers that some vendors don't ship with perl. Commonly, the package will be called something like "perl-devel", "perl-dev", "perl-headers" or the same with "lib" prepended.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://946139]
Approved by cavac
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2014-10-23 18:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (126 votes), past polls