Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

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

Replies are listed 'Best First'.
Re: PAR::Packer - stanalone executables for different operating systems
by choroba (Chancellor) 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.

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 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 Anonymous Monk on Jan 03, 2012 at 23:24 UTC

    See and

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!
Re: PAR::Packer - stanalone executables for different operating systems
by Hessu (Friar) 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://946139]
Approved by cavac
Front-paged by Corion
[Corion]: 1nickt: Finding autobox in production would give me pause, yes
[LanX]: efficient survey
[MidLifeXis]: And under MINGW64_NT-6.1 MYHOST 2.6.0(0.304/5/3) 2016-09-09 09:46 x86_64 Msys there seem to be issues with escapes in external build tool calls.
[Corion]: I mean, it's a technical feat it achieves, but... why? ;)
[MidLifeXis]: And it also has the 0.14 version of the tarball in its manifest.
[LanX]: avoiding unreadable brackets
[MidLifeXis]: Although the previous one could be a b0rken PATH, I would need to dig for that.
[thezip]: I've got to go to meetings now. If anyone has further comments regarding Spreadsheet::XLSX deployment to Strawberry Perl 5.24.1, please /msg me -- thanks!
LanX has to go ... plans to crash with a car into a group of pythonistas while screaming "LARRY IS THE GREATEST"
LanX ... darn ... where is my car?

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (13)
As of 2017-03-23 17:26 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (291 votes). Check out past polls.