November 16th, 2022

vcpkg 2022.11.14 and 2022.10.19 Releases: Localization for 14 Languages, Overlay Ports/Triplets in Manifests, acquire-project Command, and More…

Augustin Popa
Senior Product Manager

The 2022.11.14 release of the vcpkg package manager is available. This blog post summarizes changes from September 27th, 2022 to November 13th, 2022 for the Microsoft/vcpkg and Microsoft/vcpkg-tool GitHub repos.

Some stats for this period:

  • 47 new ports were added to the open-source registry. If you are unfamiliar with the term ‘port’, they are packages that are built from source and are typically C/C++ libraries.
  • 519 updates were made to existing ports. As always, we validate each change to a port by building all other ports that depend on or are depended by the library that is being updated for our nine main triplets.
  • There are now 2,069 total libraries available in the vcpkg public registry. There are a total of 10,964 ports if each library version is counted uniquely.
  • The 2022.11.14 release of the main vcpkg repo includes 65 commits.
  • 68 contributors submitted PRs, issues, or participated in discussions in the repo.
  • The main vcpkg repo has over 4,900 forks and 17,100 stars on GitHub.

 

Notable Changes

Notable changes for this release are summarized below:

 

Localized vcpkg output is now available

One of the steps required for us to ship vcpkg in Visual Studio was to localize its output to a variety of languages. This experience is now enabled in the tool for 14 languages – the same languages available for Visual Studio. You can change the language of vcpkg’s output (even if you’re not using Visual Studio) by setting an environment variable called VSLANG to a 4-digit LCID (locale identifier) code. For example, setting this variable to 1033 sets the language to English. For more details, including a list of available LCIDs, see our documentation on this.

 

Configuring overlay ports and triplets in a manifest file

Overlay ports is a feature of vcpkg that allows the user to override the default port vcpkg would have installed with a custom one. This can be useful when the user needs to patch a library and deviate from the default experience. Note: this is very different from installing a different version of a library, which does not require creating a custom port.

Overlay triplets work similarly by overriding default vcpkg triplets with customized ones. A use case for this can be if you require additional compile flags for your build over what vcpkg would run by default.

Historically, it was only possible to set overlay ports and triplets on the command line, via environment variables, or through the build system. Now, it is possible to configure these in a vcpkg-configuration.json file by enabling an optional object to the schema which receives a path or list of paths. This provides a better experience when a user wants to provide multiple additional paths for one install. Ports are resolved from top to bottom. Here is an example:

{
    "default-registry": {
    "kind": "git",
    "repository": "<https://internal/mirror/of/github.com/Microsoft/vcpkg>",
    "baseline": "eefee7408133f3a0fef711ef9c6a3677b7e06fd7"
    },
    "registries": [{
        "kind": "git",
        "repository": "<https://github.com/my-repository/vcpkg-registry>",
        "baseline": "xxxxxxx000000000000000000000000000000000",
        "packages": [ "my", "packages" ]
    }],
    "overlay-ports": [
    "./my-ports/fmt",
    "custom-ports",
    "../share/team-ports"
    ],
    "overlay-triplets" : [ "./my-triplets" ]
}

Note: if overlay ports are configured in multiple ways, we prioritize them in the following order:

  1. Command line
  2. Manifest (vcpkg-configuration.json)
  3. Environment variables

In other words, a port configured in the command line will always override the same port being configured in a manifest or an environment variable, and ports configured in the manifest override the same ports being configured as environment variables.

See our article on registries for additional documentation on this feature.

 

New artifact command: acquire-project

A new command for managing vcpkg artifacts has been added: acquire-project. Like the activate command, it affects all artifact dependencies listed in the manifest, but it only downloads and extracts them without activating them in the environment. Functionally like running vcpkg acquire once for each dependency.

 

Console output less verbose in manifest mode

The option –no-print-usage now supports manifest mode (by @demianmnave-pti in Microsoft/vcpkg-tool#721). This switch suppresses the printing of usage text at the end of a port installation.

 

Get current port version in portfile.cmake

It is now possible to reference a port’s current version when authoring ports in their portfile.cmake using a variable called VERSION. Implemented by @autoantwort.

 

Ignore the VCPKG_ROOT environment variable when we already detected a vcpkg root

The VCPKG_ROOT environment variable can be used to point to the location of a vcpkg instance. This is useful for example in pre-configured CI systems so the user can run vcpkg commands without having to go looking for vcpkg first. However, this can be problematic if the user is consuming vcpkg as a git submodule and doesn’t want to use the default machine-wide instance. Now, if a vcpkg root directory is detected, we will no longer override it with the VCPKG_ROOT environment variable. vcpkg will output a warning when the environment variable is ignored.

 

Documentation Changes

We are continuing to improve our vcpkg documentation:

  1. Added reference documentation for vcpkg list command.
  2. Added reference documentation for vcpkg version command.
  3. Added reference documentation for three topics:
    1. Embedding vcpkg-configuration.json contents in vcpkg.json
    2. Overlay ports in vcpkg-configuration.json
    3. Overlay triplets in vcpkg-configuration.json

 

Total Ports Available for Tested Triplets

triplet ports available
x86-windows 1,860
x64-windows 1,924
x64-windows-static 1,826
x64-windows-static-md 1,839
x64-uwp 971
arm64-windows 1,497
arm-uwp 924
x64-osx 1,791
x64-linux 1,867

While vcpkg supports a much larger variety of target platforms and architectures, the list above is validated exhaustively to ensure updated ports don’t break other ports in the catalog.

 

Thank You to Our Contributors

vcpkg couldn’t be where it is today without contributions from our open-source community. Thank you for your continued support! The following people contributed to the vcpkg and vcpkg-tool repos in this release:

  • autoantwort (54 commits)
  • dg0yt (35 commits)
  • Neumann-A (17 commits)
  • AtariDreams (10 commits)
  • Honeybunch (9 commits)
  • Thomas1664 (9 commits)
  • SchaichAlonso (8 commits)
  • Tradias (7 commits)
  • RT222 (6 commits)
  • Osyotr (3 commits)
  • m-kuhn (4 commits)
  • chausner (4 commits)
  • luncliff (4 commits)
  • gjasny (3 commits)
  • past-due (3 commit)
  • AenBleidd (3 commits)
  • coryan (2 commit)
  • wrobelda (1 commit)
  • daschuer (1 commit)
  • longnguyen2004 (1 commit)
  • an-tao (1 commit)
  • klalumiere (1 commit)

 

Learn More

You can find the full 2022.11.14 release notes on GitHub for the main repo. Recent updates to the vcpkg tool can be viewed on the vcpkg-tool Releases page. If you’re new to vcpkg or curious about how a package manager can make your life easier as a C/C++ developer, check out the vcpkg website – vcpkg.io.

If you would like to contribute to vcpkg and its library catalog, or want to give us feedback on anything, check out our GitHub repo. Please report bugs or request updates to ports in our issue tracker, or join more general discussion in our discussion forum. For an overview of our top priorities and backlog, take a look at our roadmap page.

 

Interested in vcpkg but not sure where to start?

Is your company experiencing challenges managing C/C++ libraries? Perhaps you’re curious if a package manager is the right choice to you? Please reach out to vcpkg@microsoft.com and we’d be happy to help!

Category
C++Vcpkg
Topics
vcpkg

Author

Augustin Popa
Senior Product Manager

Product manager on the Microsoft C++ team, currently working on vcpkg.

2 comments

Discussion is closed. Login to edit/delete existing comments.

  • David Hunter

    Im a bit confused by the version number 2022.11.14 I just upgraded to the latest and got

    C:\vcpkg>vcpkg version
    vcpkg package management program version 2022-11-10-5fdee72bc1fceca198fb1ab7589837206a8b81ba

  • David Hunter · Edited

    Hi I had used overlay ports before and this will be very helpful.

    However I have never seen “custom-ports” in manifest file before. I looked on https://vcpkg.io/en/docs and can’t find anything about them?