Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] extract_dir support nested archive path #4624

Open
caoli5288 opened this issue Jan 6, 2022 · 10 comments
Open

[Feature] extract_dir support nested archive path #4624

caoli5288 opened this issue Jan 6, 2022 · 10 comments

Comments

@caoli5288
Copy link
Contributor

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.

@niheaven
Copy link
Member

niheaven commented Jan 6, 2022

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

@caoli5288
Copy link
Contributor Author

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

It's outdated and it seems not easy to use

@niheaven
Copy link
Member

niheaven commented Jan 6, 2022

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

@caoli5288
Copy link
Contributor Author

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.

@niheaven
Copy link
Member

niheaven commented Jan 6, 2022

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.

@caoli5288
Copy link
Contributor Author

@niheaven Any progress?

@niheaven
Copy link
Member

niheaven commented Mar 2, 2022

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

majokko referenced this issue in majokko/scoop-bucket Apr 26, 2022
bc the original app installs in Appdata/Local by default which is a lil annoying so we made a scoop app
@ghost
Copy link

ghost commented Aug 14, 2022

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.

@rashil2000
Copy link
Member

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

@ghost
Copy link

ghost commented Aug 14, 2022

It worked 💪🙏🏻🍻 @rashil2000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants