Page 1 of 2

New Tool, qemu-unzip

Posted: Sat Jan 22, 2022 7:20 pm
by XorA
https://github.com/xXorAa/qem-unzip

An unzip program that goes directory from zip file to Q-Emulator headers.
mkdir unzip
cd unzip
qem-unzip ~/Downloads/unzip541.zip
Then you will find the executables have Q-Emulator headers.

Feel free to file issues on github!

Re: New Tool, qemu-unzip

Posted: Sun Jan 23, 2022 8:14 pm
by Exile
Nice! It makes getting zip files into sQLux that bit easier. :)

Re: New Tool, qemu-unzip

Posted: Mon Jan 24, 2022 3:24 pm
by Sparrowhawk
Great stuff. thanks

Re: New Tool, qemu-unzip

Posted: Tue Jan 25, 2022 7:17 pm
by XorA
Updated now to add -d <directory> support.

Re: New Tool, qemu-unzip

Posted: Wed Jan 26, 2022 10:40 am
by Sparrowhawk
I'm not very familiar with C based programs and their build tools, but I managed to work it out and run the tool on macOS, and I think that the steps are identical on Linux (including Windows WSL), so here is the README file I wrote for future-me to remember (I find I have to do this a lot these days :D ). Hopefully it's of use to anyone else who does not do C programming.

Code: Select all

$ cat README.txt 
An unzip for Sinclair QL zip files, it creates the needed Q-Emulator headers for common emulators. 
By QLForum member XorA

In Terminal:

1. cd to an appropriate parent folder, eg:
   $ cd ~/Development/SinclairQL

2. $ git clone https://github.com/xXorAa/qem-unzip.git

3. $ cd qem-unzip

4. $ cmake .

5. $ make

All done

Usage: $ ./sqlux-unzip [-d directory] zipfile
Note: Do not enter the $ character - it is there to represent a terminal prompt.

If you are not familiar with git or it is not installed on your machine, you can just download the Zip file from GitHub, then pick up at Step 3 (using the full path to the location where you unzipped it)


PS - I could not find pre-compiled binaries, but I may have missed them on the GitHub page?

Re: New Tool, qemu-unzip

Posted: Wed Jan 26, 2022 10:46 am
by XorA
Sparrowhawk wrote:I'm not very familiar with C based programs and their build tools, but I managed to work it out and run the tool on macOS, and I think that the steps are identical on Linux (including Windows WSL), so here is the README file I wrote for future-me to remember (I find I have to do this a lot these days :D ). Hopefully it's of use to anyone else who does not do C programming.

Code: Select all

$ cat README.txt 
An unzip for Sinclair QL zip files, it creates the needed Q-Emulator headers for common emulators. 
By QLForum member XorA

In Terminal:

1. cd to an appropriate parent folder, eg:
   $ cd ~/Development/SinclairQL

2. $ git clone https://github.com/xXorAa/qem-unzip.git

3. $ cd qem-unzip

4. $ cmake .

5. $ make

All done

Usage: $ ./sqlux-unzip [-d directory] zipfile
Note: Do not enter the $ character - it is there to represent a terminal prompt.

If you are not familiar with git or it is not installed on your machine, you can just download the Zip file from GitHub, then pick up at Step 3 (using the full path to the location where you unzipped it)


PS - I could not find pre-compiled binaries, but I may have missed them on the GitHub page?
Gah, you found a bug ;-)

I have not added binaries as I have not added mingw building yet, thats the next step now basic works.

(I don't have a developer license for macOS so no binaries for that anyway)

Re: New Tool, qemu-unzip

Posted: Wed Jan 26, 2022 10:52 am
by Sparrowhawk
Hahah! Clever me ;)

I'm moving off macOS to Linux for the same reason as it goes. Just waiting for the laptop supplier I want to buy from to start using intel gen12 mobile processors first, so maybe mid year I'm guessing.

I did have one question: the program unzips files with the PC style .bas, .txt etc file extensions, rather than keeping the QL's _bas, _txt. Would it be possible to have a flag to keep them as QL extensions?

Re: New Tool, qemu-unzip

Posted: Wed Jan 26, 2022 11:08 am
by XorA
Sparrowhawk wrote:Hahah! Clever me ;)

I'm moving off macOS to Linux for the same reason as it goes. Just waiting for the laptop supplier I want to buy from to start using intel gen12 mobile processors first, so maybe mid year I'm guessing.

I did have one question: the program unzips files with the PC style .bas, .txt etc file extensions, rather than keeping the QL's _bas, _txt. Would it be possible to have a flag to keep them as QL extensions?
Thats not something I would use as the Emulator does that conversion for me!

But pull requests always welcome!

Re: New Tool, qemu-unzip

Posted: Wed Jan 26, 2022 1:50 pm
by NormanDunbar
Sparrowhawk wrote:here is the README file I wrote for future-me to remember (I find I have to do this a lot these days :D ).
Welcome to my world! ;)

Cheers,
Norm.

Re: New Tool, qemu-unzip

Posted: Wed Jan 26, 2022 2:03 pm
by Sparrowhawk
XorA wrote: Thats not something I would use as the Emulator does that conversion for me!
In Q-emulator, when I attach the folder where I qem-unzip'ed a zip file from Dilwyn's site and do a DIR FLP1_, I see the files with dot notation. Is that normal or have I missed something? It's always done that, I assumed it was a quirk that was needed for Q-emulator to work and that I had to rename things manually.
But pull requests always welcome!
You are too kind when you assume I'd have a clue where to start - my knowedge of C is limited to reading the K&R book ;)