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

Dear all,

I have successfully used Cava http://www.cava.co.uk/ in order to create standalone executables for my Perl/Tk scripts in Windows platforms and would like to do something similar for MAC OS platforms.

To be more specific, although Perl is installed by default in most MAC OS platforms, I want to create a standalone application that incorporates all required modules and can be run -without opening a terminal- simply by double-clicking on an icon.

After some googling, I realised that I have fairly limited options:

- PAR::Packer (pp) http://search.cpan.org/~smueller/PAR-Packer-0.991/lib/pp.pm

which does not allow me to use --gui option in non-Windows systems and requires to open a terminal

- perl2exe http://www.indigostar.com/perl2exe.htm which includes gui option only in the professional version which is not free

- ??

I have seen something called CamelBones but from a quick look in the docs haven't managed to understand if this is the tool I am looking for or how it works. Has anyone looked into this tool or managed to pack perl scripts for MAC? I would really appreciate it if someone could share their experience.

Thanks in advance,
Athanasia

Replies are listed 'Best First'.
Re: Perl packager for MAC OS
by wazoox (Prior) on May 30, 2009 at 20:33 UTC
    Camelbones is specifically targeted to do Cocoa GUI based applications in MacOS X, however it has the obvious added bonus to package the perl code into a bundled executable. However it apparently implies that you develop or at least finalize your application using XCode. And I don't know if it packs up included modules too.
Re: Perl packager for MAC OS
by lamprecht (Friar) on May 30, 2009 at 21:53 UTC
    Hi,

    PAR::Packer executables can be run 'simply by double-clicking on an icon'. The application will open a terminal automatically (or is that what you are trying to avoid?).

    Cheers, Christoph
Re: Perl packager for MAC OS
by McD (Chaplain) on May 31, 2009 at 01:31 UTC
    To be more specific, although Perl is installed by default in most MAC OS platforms, I want to create a standalone application that incorporates all required modules and can be run -without opening a terminal- simply by double-clicking on an icon.

    I just did precisely that here, using the excellent Platypus for OS X.

    Consult the docs that come with it - I found it easy to bundle my dependent modules into the Application, and added a use lib directive along with FindBin to find them at runtime.

    Works great!
      Hi,

      Thanks for your reply.
      The software looks very interesting, however, having a quick look in the docs and reading the output options I have the impression that this software can not support Perl/Tk scripts but only simple scripts that perform a task and maybe print something as an output. I read that only 4 ways are available to direct the output of the program i.e. none, progress bar, text and web. Please do correct me if I am wrong.

      Cheers,
      Athanasia
        I have the impression that this software can not support Perl/Tk scripts but only simple scripts that perform a task and maybe print something as an output.

        No, it works with Tk scripts as well. I just downloaded, built, and installed Tk.pm in a local directory, then used Platypus to create a Tk "Hello World" application. (Mind you, it's a 10MB "Hello World," but that's the drawback to carrying a beefy library like Tk around in your app.)

        I read that only 4 ways are available to direct the output of the program i.e. none, progress bar, text and web.

        You'd select "output" as none in Platypus - they're really just talking about where to direct STDOUT/STDERR. The helpfile available from within the Platypus application gives more details.

        One downside is that X11 isn't installed on OS X by default, the user needs to install it from their OS installation disks. Depending on your target audience, this may or may not be an issue, I suppose. It would probably take some clever fiddling about to have the app detect that X was missing and issue an appropriate message to the user.

        Let us know how you fare!