Scoop
Scoop copied to clipboard
Feature: Option to force lessmsi
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.
Doesn't scoop automatically install lessmsi when it needs it, for example when installing python?
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.
Just did a fresh install of python, and MSIEXTRACT_USE_LESSMSI is unset - it seems to install lessmsi automatically:

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.
lessmsi should be set as default msi extractor.
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.
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
msiexecfails, scoop retries withlessmsiautomatically - if msi extraction with
msiexecfails, scoop prompts the user to retry withlessmsi
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?