Skip to content

vcpkg executable doesn't get updated automatically (user experience) #45193

@Pospelove

Description

@Pospelove

Dear Vcpkg maintainers!

Here is my proposal on vcpkg.exe automate download. This would be great from the UX perspective when using vcpkg in manifest mode + cmake.

While further I'll use bugs terminology, I believe this is not a bug but rather a feature request.

Steps to reproduce the issue:

  1. Have a repo with CMakeLists with a submodule of vcpkg old enough (say bc99451). vcpkg's cmake toolchain file must be specified on each generation.
  2. cmake ..
  3. update vcpkg submodule to latest master
  4. cmake ..

Expected behavior:

Re-downloads vcpkg.exe smoothly and proceeds to successful CMake generation.

Actiual behavior:

-- Running vcpkg install
read_contents("C:\projects\skymp\vcpkg\scripts\vcpkgTools.xml"): no such file or directory
-- Running vcpkg install - failed
CMake Error at vcpkg/scripts/buildsystems/vcpkg.cmake:938 (message):
  vcpkg install failed.  See logs for more information:
  C:\projects\skymp\build\vcpkg-manifest-install.log
Call Stack (most recent call first):
  build/CMakeFiles/3.31.5/CMakeSystem.cmake:6 (include)
  CMakeLists.txt:75 (project)

Suggested implementation:

In scripts\buildsystems\vcpkg.cmake:

    if(NOT EXISTS "${Z_VCPKG_EXECUTABLE}" AND NOT Z_VCPKG_HAS_FATAL_ERROR)
        message(STATUS "Bootstrapping vcpkg before install")

Add SHA512 sum check for vcpkg.exe.

SHA512 will be in the vcpkg repo as a text file, getting updated on each vcpkg tool update.

there should be an option to disable the check to keep vcpkg-tool development enabled

Context:

  • manually deleting vcpkg.exe helps, forcing re-bootstrap
  • don't know if the issue makes sense for non-Windows platforms

Metadata

Metadata

Assignees

Labels

category:vcpkg-featureThe issue is a new capability of the tool that doesn’t already exist and we haven’t committed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions