Scoop icon indicating copy to clipboard operation
Scoop copied to clipboard

Feature: Option to force lessmsi

Open se35710 opened this issue 3 years ago • 8 comments

Some manifest require the usage of lessmsi to extract MSI-files, for example libreoffice-fresh in Extras and ojdkbuild-full in Java.

If everyone agrees, I'll add an extra boolean property lessmsi, with a default of false if not defined.

se35710 avatar Dec 04 '21 20:12 se35710

Doesn't scoop automatically install lessmsi when it needs it, for example when installing python?

rashil2000 avatar Dec 05 '21 03:12 rashil2000

Not that I am aware of, unless I am missing something. The logic in decompress.ps1 check only for MSIEXTRACT_USE_LESSMSI, and if its not enabled or false, msiexec.exe is run.

https://github.com/ScoopInstaller/Scoop/blob/59088a9f0094ecaa0c36793eef232b3af237a59b/lib/decompress.ps1#L199-L205

Of the Python manifests, only the python27.json and -beta manifests uses MSI, and if MSIEXTRACT_USE_LESSMSI is not configured, the normal msiexec.exe is run instead. Python 2.7 does under normal circumstances install with msiexec.exe.

Trying to work around the problem with pre_install will fail, since it is run after extraction. Adding notes to the manifest to help the user understand why the installation failed will not work, as it is only shown after a successful installation.

se35710 avatar Dec 05 '21 09:12 se35710

Just did a fresh install of python, and MSIEXTRACT_USE_LESSMSI is unset - it seems to install lessmsi automatically:

image

rashil2000 avatar Dec 05 '21 20:12 rashil2000

Looking again at the Python 3 manifests, I see that we use Expand-MsiArchive (for reference, see line 57 in python.json).

When that is the case, the dependency of lessmsi is pulled in:

https://github.com/ScoopInstaller/Scoop/blob/37a886947df6cfdc76ebede44af6d1f10d426ba1/lib/depends.ps1#L64-L66

However, lessmsi is never executed, unless MSIEXTRACT_USE_LESSMSI is set to True (see comment above).

Maybe this feature could be added to #3502? Maybe we could revive the old deprecated installer.type:msi, or installer.type:lessmsi.

se35710 avatar Dec 05 '21 21:12 se35710

lessmsi should be set as default msi extractor.

HUMORCE avatar Dec 05 '21 21:12 HUMORCE

Not sure about that; msiexec is available by default, so it's only in a few manifests where msiexec do not work we need lessmsi.

se35710 avatar Dec 05 '21 21:12 se35710

Same issue with azure-cli (related issue).

As it isn't entirely clear, I assume that @se35710 suggests a new option in the app manifests to force lessmsi.

possible alternatives:

  • if msi extraction with msiexec fails, scoop retries with lessmsi automatically
  • if msi extraction with msiexec fails, scoop prompts the user to retry with lessmsi

JTBrinkmann avatar Sep 06 '23 08:09 JTBrinkmann

Same issue with azure-cli (related issue).

As it isn't entirely clear, I assume that @se35710 suggests a new option in the app manifests to force lessmsi.

Seems like a doable idea. The manifest can contain another field called lessmsi, similar to innounp, which will use LessMSI instead of MSIExec.

Would you like to work on it?

rashil2000 avatar Sep 10 '23 10:09 rashil2000