Installer discussion
From Perl Archiving Toolkit
[edit] Discussion about adding an Installer mode to PAR/pp
See also: Development in progress
tsee: Hi there. Quick question: given an extracted PAR binary's cache directory. Is it possible to run the application using the contents of the cache directory only (ie. without the original binary)?
audreyt: I'd s'ppose so
tsee: How?
audreyt: cd %CACHE%
audreyt: path %PATH%;.
audreyt: (probably implicit)
audreyt: perl -Ilib scripts/main.pl
audreyt: (it's Win32 notation; adjust for unix to fit)
tsee: Erm.
tsee: I'd like that to work without installed perl.
audreyt: you need to have an entry somehow
audreyt: to libperl
audreyt: if it's dynperl, you need to ship another perl.exe
tsee: We have all elements right there. There is a parl, a shared perl library, the PAR files (though with mangled file names)...
audreyt: yes, but that's only for dynperl
audreyt: for static perl, there is no shared perl lib
audreyt: so yes, for dynperl with suitable PAR::Heavy dmeangling
audreyt: you can run it just fine I s'ppose
tsee: for a static perl, how does the packaging & running work? I mean, what is the cache directory missing in order to run the program?
audreyt: perl.exe?
tsee: parl.exe doesn't suffice?
audreyt: the static pp'ed executable doesn't extract parl.exe
audreyt: at least I didn't think so
tsee: But basically, it *is* parl, right? I haven't dug into that part of the code yet, thankfully.
audreyt: I mean, for static, the .exe itself is parl
audreyt: a.out itself
audreyt: it doesn't embed a copy of parl
tsee: right.
audreyt: like in dynperl scenario
tsee: So the executable could reasonably write a copy of itself minus the zip/par payload to the cache.
audreyt: yes.
tsee: I'm driving at a flag that would "install" the contents of a binary to some static directory.
audreyt: I see that coming, yes. good idea.
tsee: It's been requested multiple times.
tsee: And I thought it shouldn't be hard.
audreyt: aye.
tsee: But since the whole of the packing / unpacking code is rather strange to me, this will be harder than originally anticipated. Oh well.
