ScoopInstaller / Scoop

A command-line installer for Windows.
https://scoop.sh
Other
21.23k stars 1.41k forks source link

[Feature Request] Unpack UPX-compressed packages #4743

Open hu3rror opened 2 years ago

hu3rror commented 2 years ago

I'm working on a manifest for an app that uses the bitrock installer creation tool. What parameters should I use to unpack such .exe installation package of this tree structure? I still wasn't sure what to do after looking at Scoop's wiki (T_T)

.
├── [0]
├── CERTIFICATE
├── .rsrc
├── UPX0
└── UPX1

image

installer download link: https://scrivener.s3.amazonaws.com/Scapple-installer.exe

Thanks for reading and hope you can help me :)

rashil2000 commented 2 years ago

Can you try any one of these unpackers - https://github.com/ScoopInstaller/Scoop/pull/3502

hu3rror commented 2 years ago

Can you try any one of these unpackers - #3502

thank you, I'll take a look later

hu3rror commented 2 years ago

I referenced the contents of extras/bucket/ida-free.json and the parameters of bitrock installer, currently the installer can be extracted and installed. And this is my code blow:

    "installer": {
        "args": [
            "--mode unattended",
            "--unattendedmodeui minimal",
            "--prefix \"$dir\""
        ]
    },
    "uninstaller": {
        "file": "uninstall.exe",
        "args": [
            "--mode unattended"
        ]
    },

However, two new problems have emerged.

  1. The uninstaller does not work properly, when input scoop uninstall xxxprompting that uninstall.dat cannot be found. 图片

  2. The desktop icon and the additional start menu icon are generated by default during installation. I can't find the relevant parameters to implement a way to remove the corresponding icon from the user side.

It looks a little difficult.

rashil2000 commented 2 years ago

Looks like extraction is the only clean way. So it doesn't work with either NSIS, Inno or Wix?

hu3rror commented 2 years ago

Looks like extraction is the only clean way. So it doesn't work with either NSIS, Inno or Wix?

It seems that scoop does not support upx package decompression. This may have to be put on hold for now, thanks for the reply!

rashil2000 commented 2 years ago

We can turn this into a feature request. UPX can be used to decompress these.

niheaven commented 2 years ago

UPX just encode and compress single exe, and it is not related with program installation.

rashil2000 commented 2 years ago

But it might be possible to uncompress it after decoding with UPX, right.

HUMORCE commented 2 years ago

first, does Scoop need to handle(provides special decompression/installation method) each non-common compression/installation package?

install scripts can handle them if the packages can be unpacked with some utils.

rashil2000 commented 2 years ago

Depends on the popularity of UPX. If it's not that popular, we can just do depends: upx and use UPX command in the pre_install script.

niheaven commented 2 years ago

Give some examples that the installers are compressed by UPX and could be extracted by 7zip later. Few developers compress installer with UPX which are mostly used by final executables.