unzip

Anything QL Software or Programming Related.
Post Reply
prime
Trump Card
Posts: 192
Joined: Fri Feb 18, 2011 8:58 pm

unzip

Post by prime »

Hi All,

Just downloaded http://www.dilwyn.me.uk/arch/unzip541xq.bin the instructions say to copy it to a
ql disk lrespr it and follow the onscreen instructions. So downloaded, wrote to a ql disk image with qltools (windows) loaded into mess lrespr flp1_unzip541xq_bin the main window fires up and it asks for
a temp dir but whatever I type I get dumped back to basic with a bad parameter error.

Am I doing something wrong ?

Also both pkunzip and winzip on windows report errors with the file "unrecoverable zip file error" with winzip and loads of crc errors with pkunzip.

Tried the copy on http://www.zen35309.zen.co.uk/qdos/unzip541xQ.bin with the same result.

Cheers.

Phill.


RWAP
RWAP Master
Posts: 2834
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: unzip

Post by RWAP »

I just tried it from within q-emulator....

Basically with the file on a QL formatted disk, just enter FLP1_ to the temporary files folder, and FLP1_ as the destination folder.

That should work.

Not sure what other directory names you have....

pkunzip and winzip cannot extract this file - it is a self-extracting zip file created on the QL, so that it preserves the QL's file headers.

This is one of the main issues with transferring QL files across the internet - WIndows and Linux strip off the QL file headers (essential for files which are to be run with the EXEC or EXEC_W command).

Q-emulator is a god-send, as it has a way of writing QL files directly to the PC hard disk, with an embedded header (although obviously, these can only be read by another copy of q-emulator).


User avatar
vanpeebles
Commissario Pebbli
Posts: 2815
Joined: Sat Nov 20, 2010 7:13 pm
Location: North East UK

Re: unzip

Post by vanpeebles »

I had a lot of trouble with unzip and I had to use the little basic program from Dilwyn's website. Apparently the self extractor can be very buggy.


prime
Trump Card
Posts: 192
Joined: Fri Feb 18, 2011 8:58 pm

Re: unzip

Post by prime »

Right, got it going....

Ended up modifying the perl script from Jonathan Hudson's page so that it would run under perl on windows / cygwyn (as I don't have perl on the QL, because it's zipped...catch 22), once that produced sfx.exe and sfx.dat.

Then used qltools to write them to a ql disk image, renamed sfx_dat back to sfx.dat, execd sfx_exe and off it went and extracted the rest.....

Strangely qltools seemed to recognise sfx.exe as a ql executable and set the job dataspace correctly which was very usefull indeed.

Cheers,

Phill.


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: unzip

Post by dilwyn »

prime wrote:Hi All,

Just downloaded http://www.dilwyn.me.uk/arch/unzip541xq.bin the instructions say to copy it to a
ql disk lrespr it and follow the onscreen instructions. So downloaded, wrote to a ql disk image with qltools (windows) loaded into mess lrespr flp1_unzip541xq_bin the main window fires up and it asks for
a temp dir but whatever I type I get dumped back to basic with a bad parameter error.

Am I doing something wrong ?

Also both pkunzip and winzip on windows report errors with the file "unrecoverable zip file error" with winzip and loads of crc errors with pkunzip.

Tried the copy on http://www.zen35309.zen.co.uk/qdos/unzip541xQ.bin with the same result.

Cheers.

Phill.
Not doing anything wrong, just that this SFX software can't run on some system types.

Jonathan Hudson always said it was a bit of a compromise and might not work too well on some systems. Sadly, I can see no obvious way to fix it either, whichis annoying because it can be real catch 22 getting Unzip and Zip onto a QDOS or SMSQ/E platform to unzip them when you don't already have zip and unzip on there to unzip the zips... (recursion...recursion...)


RWAP
RWAP Master
Posts: 2834
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: unzip

Post by RWAP »

I wonder if an easier way to do this, is to also offer a download of the executable, with a note of how to use SEXEC to set it up with the correct dataspace before trying to EXEC it ?


prime
Trump Card
Posts: 192
Joined: Fri Feb 18, 2011 8:58 pm

Re: unzip

Post by prime »

RWAP wrote:I wonder if an easier way to do this, is to also offer a download of the executable, with a note of how to use SEXEC to set it up with the correct dataspace before trying to EXEC it ?
It's a shame really that there isn't an superbasic command built in to set the dataspace on the file, rather than having to respr / lbytes / sexec so you could do something like set_dataspace flp1_blah_exe, 10240

I guess a download of the executable plus a short superbasic prog that loaded and saved the code as needed then it would just be a case of download the two files, transfer them to the QL lrun the basic file, then reset and exec the executable.

Cheers.

Phill.


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: unzip

Post by dilwyn »

I've put a short SuperBASIC listing on the Archivers page on my website along with a copy of a headerless binary copy of Unzip v5.31 (not used later versions because they give misleading error messages if you do not have Signal Extensions installed). Copy the Unzip file and fix_unzip_bas to your emulator system. Beware of CRs in the listing if your transfer process adds carriage return characters. You will end up with a copy of unzip which has no executable file headers, and a basic patcher program, which doesn't need a file header. Edit the drive names as required in the basic program (the drive names where it loads and saves UNZIP) then run it to restore the file header of Unzip and you should then have a working copy of Unzip.

I hope this gets around the catch-22 when the SFX self-extractor doesn't work on some emulators, where you end up needing a copy of unzip to unzip the unzip program....

Now wait and see how many people can't get even this to work :oops:

Dilwyn


Post Reply