Hiya

I'd like to make a self extracting installation program using PAR.

Basically, what I have is a little program that I want to install (on
Win32) that requires a couple of registry changes, a file to be renamed,
an exe (that is itself a par'd perl script) putting into %WINDIR%, and a
.html file writing out.

What I'd like to be able to do is say something like the following:

Use PAR $0;

#Init code here

Sub do_install {
        #We are going to extract our files and install them now..
        my $bin = PAR::read_file('data/server.exe');
        open(BIN, ">$WINDIR/server.exe") or return(1);
        print BIN, $bin;
        close(BIN);
        my $bin = PAR::read_file('data/page.html');
        open(BIN, ">$WINDIR/page.html") or return(1);
        print BIN, $bin;
        close(BIN);
        return(0);
}

However, as $0 is a pp packed executable (and not just a par file), this
doesn't work.. Is there any cunning way to get round this / get acces to
the raw .par file for a fully pp'd program?

Thanks in advance
Tomas Doran

--
Eight Networks - The world's best network
Telephone: 0845 456 9889
 

Reply via email to