twogood / unshield

Tool and library to extract CAB files from InstallShield installers
MIT License
340 stars 73 forks source link

Extraction without group folder #126

Open gcxd68 opened 2 years ago

gcxd68 commented 2 years ago

Hi,

Thank you for all the hard work. Il was looking for a way to extract files without creating group folders.

Example : the cabinet file contains 2 groups : DATA and EXECUTABLE. If I extract both towards an INSTALL folder, DATA and EXECUTABLE folders are created. I would like to get the files directly in the INSTALL folder and skip the group folder creation.

Is that even possible ?

Thank you,

Greg

twogood commented 2 years ago

Thank you Greg for the kind words!

I don't have an obvious solution but maybe if you call it twice: once with -g DATA and once with -g EXECUTABLE?

gcxd68 commented 2 years ago

Thank you for the quick answer !

I already tried it, the DATA and EXECUTABLE folders still get created in the INSTALL one. Even with -g DATA or -g EXECUTABLE. I thought maybe there is something else to do I didn't notice ?

Greg

twogood commented 2 years ago

If there is no directory structure, maybe -j will work? Otherwise I'm afraid you will have to relocate the files after extracting.

gcxd68 commented 2 years ago

Ok, I'll have a look, thank you !

twogood commented 2 years ago

The reason for creating these directories, IIRC, is that sometimes files with the same name can exist in multiple groups or components.

gcxd68 commented 2 years ago

Yes I understand, but I thought an option to disable it would be great ! I'll try to explain my goal : I'm making an installer for an old software that won't install anymore on recent computers (but still works). The setup file looks for the files on the CD-ROM to install it. Because of these files extracting to this "group" folder, I have to extract them to a temporary folder and then copy them again to the destination. Not optimal, but it works. Thanks again.

twogood commented 2 years ago

Yeah @gcxd68 that is a very typical use case, but I hope that moving the files to the right places (don't copy, that is much slower) with a script afterwards is not too much trouble.