Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teach vcpkg fetch to handle msi files #117

Merged
merged 3 commits into from
Jul 15, 2021

Conversation

ras0219-msft
Copy link
Contributor

@ras0219-msft ras0219-msft commented Jul 15, 2021

This PR adds .msi support to vcpkg fetch in order to enable upgrading 7zip to a more recent version (19.00). We must use the MSI package because it is one of the few formats that can be supported on a completely stock Windows machine.

Once this change is applied, we'll replace the 7zip entry in vcpkgTools.xml with:

    <tool name="7zip" os="windows">
        <version>19.00</version>
        <exeRelativePath>Files\7-Zip\7z.exe</exeRelativePath>
        <url>https://www.7-zip.org/a/7z1900-x64.msi</url>
        <sha512>7837a8677a01eed9c3309923f7084bc864063ba214ee169882c5b04a7a8b198ed052c15e981860d9d7952c98f459a4fab87a72fd78e7d0303004dcb86f4324c8</sha512>
        <archiveName>7z1900-x64.msi</archiveName>
    </tool>

As a side benefit, this allows us to use 7zip to unpack .nupkg files in the future, since we will no longer require nuget to unpack 7zip.

Copy link
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if 7z is already installed?
Does this make it show up in add/remove programs?

src/vcpkg/archives.cpp Show resolved Hide resolved
src/vcpkg/archives.cpp Show resolved Hide resolved
src/vcpkg/archives.cpp Show resolved Hide resolved
@ras0219-msft
Copy link
Contributor Author

No, /a is the "Administrative install mode" (poorly named) which extracts the package contents without modifying the current system.

From https://docs.microsoft.com/en-us/windows/win32/msi/administrative-installation:

The Windows Installer can perform an administrative installation of an application or product to a network for use by a workgroup. An administrative installation installs a source image of the application onto the network that is similar to a source image on a CD-ROM. Users in a workgroup who have access to this administrative image can then install the product from this source. A user must first install the product from the network to run the application. The user can choose to run-from-source when he installs and the installer uses most of the product's file directly from the network.

Which is clear as mud, but basically my understanding is that you could use the administrative install to eventually perform a full machine install later.

@BillyONeal
Copy link
Member

No, /a is the "Administrative install mode" (poorly named) which extracts the package contents without modifying the current system.

From https://docs.microsoft.com/en-us/windows/win32/msi/administrative-installation:

The Windows Installer can perform an administrative installation of an application or product to a network for use by a workgroup. An administrative installation installs a source image of the application onto the network that is similar to a source image on a CD-ROM. Users in a workgroup who have access to this administrative image can then install the product from this source. A user must first install the product from the network to run the application. The user can choose to run-from-source when he installs and the installer uses most of the product's file directly from the network.

Which is clear as mud, but basically my understanding is that you could use the administrative install to eventually perform a full machine install later.

OK, I'm convinced. Approve-with-suggestion to add that test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants