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

Allow redirection of the scripts folder. #6552

Merged
merged 7 commits into from
Jul 2, 2019

Conversation

martin-s
Copy link
Contributor

Like in #4883, make scripts folder more flexible.

@cbezault
Copy link
Contributor

It's not clear to me why this feature is necessary. The scripts folder is a core part of vcpkg while the downloads folder is more of a tmp directory. What is the value added for you to be able to redirect the scripts folder?

@martin-s
Copy link
Contributor Author

It's a missing part for my build scenarios, a single instance of vcpkg managing distributed port directories.
See also discussion in #114.

@cbezault
Copy link
Contributor

In #114 you mention that you want a single instance of vcpkg managing many different port directories. From my perspective the scripts folder is a core part of vcpkg. Is the idea just that the vcpkg binary wouldn't have to live in the same directory as the scripts folder?

@martin-s
Copy link
Contributor Author

martin-s commented May 27, 2019

Yes, although the dependencies of vcpkg are very low in terms of data sizes, they exist. As you named, the script folder is such a dependency. My workaround is that the script folder is available (through a link or a copy) in a changed vcpkg environment (--vcpkg-root). And this PR would integrate it into vcpkg with no downsides to the average vcpkg user.
The long-term vision/goal would be more towards a solution like npm (global/local) in nodejs or pip/venv in python environments.

@vicroms
Copy link
Member

vicroms commented Jun 4, 2019

/azp run

@vicroms
Copy link
Member

vicroms commented Jun 27, 2019

@martin-s

I'm not convinced about using an environment variable for this.
I propose changing the implementation to use a command line argument.

See #7053 and #6981 for how to process global command line arguments.

@martin-s
Copy link
Contributor Author

martin-s commented Jun 28, 2019

I'm not convinced about using an environment variable for this.

Neither am I. Unfortunately, there hasn't been any alignment on this topic, see #4883.

@martin-s
Copy link
Contributor Author

martin-s commented Jun 30, 2019

To make it more generic, we could also take the .vcpkg-root file to overwrite the folder paths. If nothing is written to the file, it should take the standard paths, otherwise use the overwritten paths from the file.

@martin-s martin-s changed the title Allow redirection of the scripts folder with an environment variable. Allow redirection of the scripts folder. Jun 30, 2019
@vicroms
Copy link
Member

vicroms commented Jul 1, 2019

Hi @martin-s

I made a change to use the --scripts-root=<PATH> format, which is the preferred way to provide argument values in vcpkg going forward (there's an open PR that will change this for --triplet and --vcpkg-root).

@vicroms vicroms merged commit 91da4aa into microsoft:master Jul 2, 2019
@vicroms
Copy link
Member

vicroms commented Jul 2, 2019

@martin-s
Thanks for the PR!

@martin-s martin-s deleted the feature-scripts-folder branch August 20, 2019 22:29
strega-nil pushed a commit to strega-nil/vcpkg that referenced this pull request May 5, 2021
* Allow redirection of the scripts folder with an environment variable.

* - Updated feature from environment variable to argument.

* Fix crash when no scripts override is given and use --scripts-root=<PATH> format

* Update help messages to use --scripts-root=<PATH> format
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.

3 participants