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

Packaging GUI application.

by jdtoronto (Prior)
on Aug 25, 2004 at 16:16 UTC ( #385719=perlquestion: print w/replies, xml ) Need Help??

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

Esteemed monks,

Before engaging AA guns to bring me down in flames for repeating a question that has been asked before, let me say I have searched extensively and find no real satisfaction where I am sure some must exist.

I have an application written in Perl/Tk which I want to be able to easily distribute. Can anyone suggest a RELIABLE method of shipping an exe or whatever particularly for Windoze which a client can easily use without having to install a full Perl with modules?

TIA

jdtoronto

Replies are listed 'Best First'.
Re: Packaging GUI application.
by Aristotle (Chancellor) on Aug 25, 2004 at 16:20 UTC

    Have you investigated PAR?

    Makeshifts last the longest.

      Not recently, last time I tried it seems somewhat flaky. But recent reports seem to be rather glowing. I will give it another go.

      jdtoronto

Re: Packaging GUI application.
by Courage (Parson) on Aug 25, 2004 at 20:43 UTC
    I have own technique to solve same problem for me. It includes few steps:
    • substituting Dynaloader.pm and overloading "use.pm",
    • packaging number of library files into single archive, so that use module; will go to that archive
    • throwing away AutoLoad.pm for those packages
    • few other trivial steps to make stup "exe" which calls perl with a given script as parameter.

    This way I ended up with about 10 DLLs (some more or less depending on actual modules usage) and about 5 auxiliary files needed to bootstrup my mechanic.
    This is for Perl/Tk applications.

    Starting from some moment I moved to Tcl::Tk module instead of Perl/Tk and quantity of files changed.

    That said, I invented my own method in addition to PAR, perl2exe, and gmpassos's tinyperl.
    Why?
    PAR creates big forest in TEMP; at least this requires some space on HDD to write, yet there will be more and more garbage after few crashed invocations;
    perl2exe is old unsupported and discouraged to use (AFAIK);
    and can't comment on tinyperl, because just can't.
    :)

    Courage, the Cowardly Dog

      Got code for this method? I'd like to see the evils of which you speak. Personally, I swear by PAR because it "just works" for Windows and Linux and I can clean up my own temp directory.

      Just pass the -M Tk switch to pp, and yes, your application may be around 1 MB for something as simple as a Windows autorun program, but the runtime is there, and it all just works.

      I suppose PAR is creating the files in %TEMP% only during development, not on a user's machine?

        You can download 1Mbyte example of my distribution at http://www.vkonovalov.ru/files-exchange/perl58tk84-for-cd.zip, it unpacks to 2Mbytes, and runs independent of existing Perl software on machine.

        Unpack it to some directory, and run "start.exe"

        Few comments:

        • index.txt is auxillary file for application itself, not for bootstrapping distro.
        • msvcrt.dll could be just removed for 99% of Windows computers already have it; only elder Windows95 w/o SR require it.
        • all perl-5.8.x+Tk84 library files live in modules/modules.pm.
        • No temporary files.

        In case there will be some kind of interest, I'll provide more detailed explanations, just let me know.
        However I don't think this will be the case.

        Courage, the Cowardly Dog

      perl2exe old and unsupported? From it's homepage:
      # Jun 29 2004 Perl2Exe V8.40 for Perl 5.8.4 released # Feb 18 2004 Perl2Exe V8.10 for Perl 5.8.3 released # Feb 11 2004 Perl2Exe V8.00 for Perl 5.8.2 released

      The only time I needed support was about four years ago - the response was prompt and helpful.

        ok, it was "unsupported" in my mind, I did not check it for a long time...

        Sorry.

        Hmm, wait, what is the "buy now" button? It is not opensourced and no chance to fix a bug when something will be strangely working? (no 5.9.x support either, for same reason...)

        Ok, lemme stay on my old working scheme, where I know which worms will be and how to fight against them.

Re: Packaging GUI application.
by keszler (Priest) on Aug 25, 2004 at 16:30 UTC
    It's not free, but I've used perl2exe for the last five years. In a recent comparison, a Perl/Tk app started more than six seconds faster (time from icon double-click to mainwindow complete and accepting events) when compiled with perl2exe vs PAR.
      I believe that there will be a delay the first time you run a new PAR executable, as it unpacks the contents to some temporary directories. I also believe that the temporary directories will still be there when you rerun.

      In this case, I don't think your comparison is fair, unless you are noting a six second delay on second and subsequent activations.

      Needless to say, housekeeping could remove the temporary files, and a new version of the .EXE will generate a complete new set of temporary files.

      hth

      --
      I'm Not Just Another Perl Hacker

      I've also used perl2exe to compile Perl/Tk apps for a few years now with a lot of success. The only problem I've ever run into is that it doesn't always find all the packages it needs, so once and a while you have to throw in a redundant "use PackageName" in your script so perl2exe can find it.

      -----------------------------------
      Washizu
      Acoustic Rock

Re: Packaging GUI application.
by Joost (Canon) on Aug 25, 2004 at 16:29 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2019-12-15 09:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?