A 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
.
-
Check 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
.Then
mite-vspkg
can 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
,.zip
are downloaded,.cab
are 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
,.cab
are downloaded.
-
python 3.7+
-
msitools 0.98+
andlibgcab 1.2+
msitools
doesn't work on Windows. https://gitlab.gnome.org/GNOME/msitools#notes
mite-vspkg
was tested on Linux only.
This command should install the program on Unix/macOS.
python3 -m pip install mite_vspkg
If it doesn't work, see this https://packaging.python.org/en/latest/tutorials/installing-packages/
The options are loaded from the configuration file in the config
folder of a --work-dir
.
By default, the name of the config is config.py
. Alternative config name can be specified with --config-name
option.
This command will copy the default config to $HOME/mite-vspkg/config/config.py
and 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 the config.py
,
comments
mode = util_enum.mode.PRINT_SEL_PKGS_VSDOWNLOAD
uncomments
#mode = util_enum.mode.CHECK_FILES
saves the changes,
then executes the same command
python3 -m mite_vspkg --work-dir="$HOME/mite-vspkg"
the program will download-check-delete every package and store lists of filenames and .cab
info in $HOME/mite-vspkg/check_files/out/out_file.json
.
util_enum.mode.CHECK_FILES
If 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 .json
and then tries to check the selected packages.
util_enum.mode.DOWNLOAD_AND_UNPACK
After unpacking, filenames are unquoted, i.e. %xx
escapes are replaced with their single-character equivalent, e.g. %20
is replaced by space " "
, %2B
is 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
.cab
info from the package, i.e. size of.msi
,.vsix
,.zip
payloads. - Download size to unpack the package, i.e. size of
.msi
,.vsix
,.zip
,.cab
payloads. - 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
.cab
payloads, plus size of.msi
payloads which have the required.cab
files. The program counts an.msi
only if it has a.cab
which is not available for download as a payload. If multiple.msi
have the required.cab
files, 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"
to True
in the config.
The program contains a modified version of vsdownload.py
from https://github.com/mstorsjo/msvc-wine (ISC license).