Package: mite-vspkg
mite-vspkgA utility to get a list of files per Visual Studio installer package and to unpack Visual Studio installer packages.Uses manifests of Visual Studio installer to get a list of available Visual Studio packages.Supported formats:.msi,.vsix,.zip.FeaturesCheck files of the selected packages.Download all payloads of a package, check its files, keep the list of filenames, delete downloaded payloads to conserve space. Once all packages are checked, save the result in.json.Thenmite-vspkgcan be used to get useful info from the resulting.json:print a list of filenames per payload (with URLs) per package,print packages per filename regex,print URLs per payload per filename regex.Intermediate results are saved after downloading certain amount of bytes so the operation can be resumed if suddenly interrupted.Only.msi,.vsix,.zipare downloaded,.cabare skipped.Download and unpack files from the selected packages.If resumed, downloaded payloads are not redownloaded. Hashes of the downloaded payloads are compared with hashes in the installer manifest to remove corrupted payloads.Only.msi,.vsix,.zip,.cabare downloaded.Requirementspython 3.7+msitools 0.98+andlibgcab 1.2+msitoolsdoesn't work on Windows.https://gitlab.gnome.org/GNOME/msitools#notesmite-vspkgwas tested on Linux only.InstallationThis command should install the program on Unix/macOS.python3 -m pip install mite_vspkgIf it doesn't work, see thishttps://packaging.python.org/en/latest/tutorials/installing-packages/UsageThe options are loaded from the configuration file in theconfigfolder of a--work-dir.By default, the name of the config isconfig.py. Alternative config name can be specified with--config-nameoption.ExampleThis command will copy the default config to$HOME/mite-vspkg/config/config.pyand execute the program using that config.By default, the program will download and cache the manifests and print the list of all packages.python3 -m mite_vspkg --work-dir="$HOME/mite-vspkg"After executing the command, the options can be changed by editing the$HOME/mite-vspkg/config/config.py.If the user scrolls to the bottom of theconfig.py,commentsmode = util_enum.mode.PRINT_SEL_PKGS_VSDOWNLOADuncomments#mode = util_enum.mode.CHECK_FILESsaves the changes,then executes the same commandpython3 -m mite_vspkg --work-dir="$HOME/mite-vspkg"the program will download-check-delete every package and store lists of filenames and.cabinfo in$HOME/mite-vspkg/check_files/out/out_file.json.Notesutil_enum.mode.CHECK_FILESIf there is a partially filled output.json, selected packages are ignored and the program tries to finish the interrupted check.If there is a fully filled output.json, the program creates a backup of this.jsonand then tries to check the selected packages.util_enum.mode.DOWNLOAD_AND_UNPACKAfter unpacking, filenames are unquoted, i.e.%xxescapes are replaced with their single-character equivalent, e.g.%20is replaced by space" ",%2Bis replaced by plus"+".When the program prints a list of packages, there are 3 architectures after the package type.Example:Microsoft.VisualStudio.Debugger.Concord.Remote (Vsix) (x64; ARM64; neutral) (3.3 MB; 3.3 MB; 9.8 MB)Those are:chip,machineArch,productArch.When the program prints a list of packages, there are 3 sizes at the end.Example:Microsoft.Icecap.Collection.Msi (Msi) (64.0 KB; 1.9 MB; 5.0 MB)Download size to get list of filenames and.cabinfo from the package, i.e. size of.msi,.vsix,.zippayloads.Download size to unpack the package, i.e. size of.msi,.vsix,.zip,.cabpayloads.Install size of the package. The program doesn't install the packages and doesn't unpack some file types, so the real unpack size is likely different from the install size.When the program prints a list of payloads, there are 2 sizes near the payload name.Example:SDK Debuggers-x86_en-us.msi (636.0 KB; 138.1 MB)Size of the payload.Size of the payload, plus size of required.cabpayloads, plus size of.msipayloads which have the required.cabfiles. The program counts an.msionly if it has a.cabwhich is not available for download as a payload. If multiple.msihave the required.cabfiles, the most lightweight combination is counted.By default, dependencies of the selected packages are also selected. Dependency resolution can be turned off by setting"skip_dependencies"toTruein the config.AcknowledgmentsThe program contains a modified version ofvsdownload.pyfromhttps://github.com/mstorsjo/msvc-wine(ISC license).