Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Document VCPKG_ROOT environment variable and make a command to set it #24193

Closed
the-Arioch opened this issue Apr 16, 2022 · 2 comments
Closed
Assignees
Labels
category:documentation To resolve the issue, documentation will need to be updated

Comments

@the-Arioch
Copy link

the-Arioch commented Apr 16, 2022

As a newb I was hit by a failure in bootstrapping/building another project: DDoSolitary/yasfw#49

It seems there is a standard (at least de facto standard) VCPKG_ROOT env-var, but it is neither mentioned in vcpkg's Quick Start, nor set by vcpkg tool.

Can it be documented (documentation is required to fix the exact name of the variable and to also fix relative path from the variable to the executable (for some tools it can be subfolder like %ROOT%\bin\name.exe)), and mentioned in the readme.md ?

Also, can the bootstrap .bat or vcpkg executable be made to set it? The latter - as part of vcpkg integrate install command or as a separate command like vcpkg integrate envvar ?

At least on Windows platform - for what i remember on Windows NT one needs to update HKCU and/or HKLM registry key, then to broadcast some WM_XXX message to make Explorer re-fetch updated env-vars).

Since vcpkg integrate install seems to request UAC elevation anyway, it seems to be a good place to put HKLM env-var adjustment into. If not i'd like to see vcpkg integrate envvar and vcpkg integrate envvar /useronly commands implemented and mentioned in Quick Start documentation.

@dg0yt
Copy link
Contributor

dg0yt commented Apr 16, 2022

It is not in the quickstart because it isn't needed in regular use cases. But it is documented:
https://github.com/microsoft/vcpkg/blob/master/docs/users/config-environment.md#vcpkg_root

@the-Arioch
Copy link
Author

the-Arioch commented Apr 16, 2022

as the root of the vcpkg instance - is what i was afraid of... Without explicit documenting what is "relative path" between "instance root" and "executable of that instance" it is a guess game. It might be obvious for you that vcpkg.exe is expected to be found at %VCPKG_ROOT%\vcpkg.exe and not in some subfolder. But it is "internal" knowledge among seasoned people already in-the know (IOW among the people who do not need the documentation).

As of "in regular use cases" it is again a YMMV case. Even if a novice somehow figures he needs to integrate vcpkg into some another toolset - he is lost how exactly to do it.

A novice one way or another figures he has to plug vcpkg into a pipeline, he googles around and finds https://github.com/microsoft/vcpkg/blob/master/README.md and is hopefully by a single "fineprint" line into https://github.com/microsoft/vcpkg/blob/master/docs/users/integration.md (this link i believe has to be highlighted at least, maybe even put as a separate chapter to be visible from the top of the readme document), and then... hits a wall. Novice user does not immediately use VS IDE, nor does not immediately use CMake.

I believe there has to be a chapter like "Integrating with other development tools/pipelines" and it has to mention that environment variable as a oficcialyl preferred default way to integrate vcpkg with ANY new 3rd party dev-tools. Make it clear to new users and developers HOW you want them to be finding vcpkg unless any special cases.

  • General rule - use THIS env-var in THAT specific way.
  • Special rules for VS IDE
  • Special rules for CMake tool
  • Special rules for XXXXX tool, etc

@Cheney-W Cheney-W added the category:documentation To resolve the issue, documentation will need to be updated label Apr 18, 2022
@microsoft microsoft locked and limited conversation to collaborators Apr 19, 2022
@Cheney-W Cheney-W converted this issue into discussion #24239 Apr 19, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
category:documentation To resolve the issue, documentation will need to be updated
Projects
None yet
Development

No branches or pull requests

3 participants