Scoop icon indicating copy to clipboard operation
Scoop copied to clipboard

[Feature] extract_dir support nested archive path

Open caoli5288 opened this issue 4 years ago • 10 comments

Feature Request

Is your feature request related to a problem? Please describe.

Some apps need to write scripts to decompress and move files many times(NSIS apps). This feature is effective to simplify the manifests.

Describe the solution you'd like

Use the symbol ! as the separator(or any other). An example. "extract_to": "app-x64.zip!\\bin". It will expand app-x64.zip and extract the bin contains in the archive.

Describe alternatives you've considered

Here is an manifest https://github.com/caoli5288/scoop-bucket/blob/master/bucket/yesplaymusic.json. I write script in pre_install.

            "pre_install": [
                "Expand-7zipArchive \"$dir\\`$PLUGINSDIR\\app-64.7z\" \"$dir\"",
                "Remove-Item \"$dir\\`$*\", \"$dir\\Uninst*\" -Recurse"
            ]

It can be simplified to "extract_dir": "$PLUGINSDIR\\app-64.7z!\\". This is just a simple example. This feature can play more roles.

caoli5288 avatar Jan 06 '22 09:01 caoli5288

This kind of extraction will be simplified when https://github.com/ScoopInstaller/Scoop/pull/3502 is done.

niheaven avatar Jan 06 '22 11:01 niheaven

This kind of extraction will be simplified when #3502 is done.

It's outdated and it seems not easy to use

caoli5288 avatar Jan 06 '22 11:01 caoli5288

Do you have some more common use cases other than NSIS that use nested archives?

niheaven avatar Jan 06 '22 12:01 niheaven

Do you have some more common use cases other than NSIS that use nested archives?

See https://github.com/search?q=org%3AScoopInstaller+Expand-7zipArchive&type=code

This future can help a lot.

caoli5288 avatar Jan 06 '22 14:01 caoli5288

The most use cases are NSIS installer (app-32, app-64), others like embedded chrome.7z or custom extraction actions (e.g., multi-archive, different extracting params, etc.). It may be useful in some cases, we will take into consideration this feature, thanks.

niheaven avatar Jan 06 '22 14:01 niheaven

@niheaven Any progress?

caoli5288 avatar Mar 02 '22 07:03 caoli5288

Will check it after the upcoming release, sorry for waiting.

niheaven avatar Mar 02 '22 09:03 niheaven

I having problem like this one, trying to create a manifest for HyperSQL (database for java) and in zip file there is nasted folder hsqldb-2.7.0/hsqldb/ and as you know "extract_dir": "hsqldb-2.7.0\\hsqldb\\" not working.

any solution for this one even temporarily is fine thank I'm appreciated it.

ghost avatar Aug 14 '22 10:08 ghost

Have you tried without the trailing slashes? i.e. "extract_dir": "hsqldb-2.7.0\\hsqldb"

rashil2000 avatar Aug 14 '22 14:08 rashil2000

It worked 💪🙏🏻🍻 @rashil2000

ghost avatar Aug 14 '22 14:08 ghost