Re: Packaging GUI application.
by Aristotle (Chancellor) on Aug 25, 2004 at 16:20 UTC
|
Have you investigated PAR?
Makeshifts last the longest.
| [reply] [Watch: Dir/Any] |
|
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
| [reply] [Watch: Dir/Any] |
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
| [reply] [Watch: Dir/Any] [d/l] |
|
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?
| [reply] [Watch: Dir/Any] |
|
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
| [reply] [Watch: Dir/Any] |
|
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. | [reply] [Watch: Dir/Any] [d/l] |
|
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.
| [reply] [Watch: Dir/Any] |
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.
| [reply] [Watch: Dir/Any] |
|
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
| [reply] [Watch: Dir/Any] |
|
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.
| [reply] [Watch: Dir/Any] |
Re: Packaging GUI application.
by Joost (Canon) on Aug 25, 2004 at 16:29 UTC
|
Care to give us a hint which existing answers you investigated and why they weren't good enough?
| [reply] [Watch: Dir/Any] |