Skip to content

Commit 7a58d34

Browse files
authored
Merge pull request MicrosoftDocs#727 from mikeblome/mb-vcpkg-156
updates for vcpkg
2 parents ada254d + 60e4708 commit 7a58d34

File tree

1 file changed

+33
-12
lines changed

1 file changed

+33
-12
lines changed

docs/vcpkg.md

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: vcpkg is a command line package manager that greatly simplifies the
44
keywords: vcpkg
55
author: mikeblome
66
ms.author: mblome
7-
ms.date: 02/01/2018
7+
ms.date: 04/06/2018
88
ms.technology: ["cpp-ide"]
99
ms.tgt_pltfrm: "windows"
1010
ms.assetid: f50d459a-e18f-4b4e-814b-913e444cedd6
@@ -45,7 +45,7 @@ This command enumerates the control files in the vcpkg/ports subfolders. You wil
4545

4646
```cmd
4747
ace 6.4.3 The ADAPTIVE Communication Environment
48-
anax 2.1.0-1 An open source C++ entity system. <https://github...
48+
anax 2.1.0-1 An open source C++ entity system. \<https://github...
4949
antlr4 4.6-1 ANother Tool for Language Recognition
5050
apr 1.5.2 The Apache Portable Runtime (APR) is a C library ...
5151
asio 1.10.8 Asio is a cross-platform C++ library for network ...
@@ -78,7 +78,6 @@ Additional packages (*) will be installed to complete this operation.
7878
```
7979

8080
## List the libraries already installed
81-
8281
After you have installed some libraries, you can use **vcpkg list** to see what you have:
8382

8483
```cmd
@@ -98,9 +97,7 @@ zlib:x86-windows 1.2.11 A compression library
9897

9998
Run **vcpkg integrate install** to configure Visual Studio to locate all vcpkg header files and binaries on a per-user basis without the need for manual editing of VC++ Directories paths. If you have multiple clones, the clone from which you run this command becomes the new default location.
10099

101-
Now you can #include headers simply by typing the folder/header, and auto-complete assists you. No additional steps are required for linking to libs or adding project references. The following illustration shows how Visual Studio finds the azure-storage-cpp headers. vcpkg places its headers in the \installed subfolder, partitioned by target platform. The following diagram shows the list of include files in the `/was` subfolder for the library:
102-
103-
Now you can #include headers simply by typing the folder/header, and auto-complete will help you. No additional steps are required for linking to libs or adding project references. The following illustration shows how Visual Studio finds the azure-storage-cpp headers. vcpkg places its headers in the \installed subfolder, partitioned by target platform. The following diagram shows the list of include files in the \was subfolder for the library:
100+
Now you can #include headers simply by typing the folder/header, and auto-complete assists you. No additional steps are required for linking to libs or adding project references. The following illustration shows how Visual Studio finds the azure-storage-cpp headers. vcpkg places its headers in the **/installed** subfolder, partitioned by target platform. The following diagram shows the list of include files in the **/was** subfolder for the library:
104101

105102
![vcpkg Intellisense integration](media/vcpkg-intellisense.png "vcpkg and Intellisense")
106103

@@ -136,6 +133,36 @@ By default, the **upgrade** command only lists the libraries that are out of dat
136133

137134
### Upgrade example
138135

136+
### Per project
137+
If you need to use a specific version of a library that is different from the version in your active vcpkg instance, follow these steps:
138+
139+
1. Make a new clone of vcpkg
140+
1. Modify the portfile for the library to obtain the version you need
141+
1. Run **vcpkg install \<library>**.
142+
1. Use **vcpkg integrate project** to create a NuGet package that references that library on a per-project basis.
143+
144+
145+
## Export compiled binaries and headers
146+
Requiring everyone on a team to download and build libraries can be inefficient. A single team member can do that work, and then use **vcpkg export** to create a zip file of the binaries and headers that can be easily shared with other team members.
147+
148+
## Update/upgrade installed libraries
149+
The public catalog is kept up-to-date with the latest versions of the libraries. To determine which of your local libraries are out-of-date, use **vcpkg update**. When you're ready to update your ports collection to the latest version of the public catalog, run the **vcpkg upgrade** command to automatically download and rebuild any or all of your installed libraries that are out of date.
150+
151+
By default, the **upgrade** command only lists the libraries that are out of date; it doesn’t upgrade them. To perform the upgrade, use the **--no-dry-run** option.
152+
153+
```cmd
154+
vcpkg upgrade --no-dry-run
155+
```
156+
157+
### Upgrade Options
158+
159+
- **--no-dry-run** Perform the upgrade; when not specified, the command only lists the out-of-date packages.
160+
- **--keep-going** Continue installing packages even if one fails.
161+
- **--triplet \<t>** Set the default triplet for unqualified packages.
162+
- **--vcpkg-root \<path>** Specify the vcpkg directory to use instead of current directory or tool directory.
163+
164+
### Upgrade example
165+
139166
The following example shows how to upgrade only specified libraries. Note that vcpgk automatically pulls in dependencies as necessary.
140167

141168
```cmd
@@ -152,27 +179,21 @@ If you are sure you want to rebuild the above packages, run this command with th
152179
```
153180

154181
## Contribute new libraries
155-
156182
You can include any libraries you like in your private ports collection. To suggest a new library for the public catalog, open an issue on the [GitHub vcpkg issue page](https://github.com/Microsoft/vcpkg/issues).
157183

158184
## Remove a library
159-
160185
Type **vcpkg remove** to remove an installed library. If any other libraries depend on it, you are asked to rerun the command with **--recurse**, which causes all downstream libraries to be removed.
161186

162187
## Customize vcpkg
163-
164188
You can modify your clone of vcpkg in any way you like. You can create multiple vcpkg clones and modify the portfiles in each one to obtain specific versions of libraries or specify command-line parameters. For example, in an enterprise, one group of developers might be working on software that has one set of dependencies, and another group might have a different set. You can set up two clones of vcpkg, and modify each one to download the versions of the libraries and the compilation switches, etc, according to your needs.
165189

166190
## Uninstall vcpkg
167-
168191
Just delete the directory.
169192

170193
## Send feedback about vcpkg
171-
172194
Use the **--survey** command to send feedback to Microsoft about vcpkg, including bug reports and suggestions for features.
173195

174196
## The vcpkg folder hierarchy
175-
176197
All vcpkg functionality and data is self-contained in a single directory hierarchy, called an "instance". There are no registry settings or environment variables. You can have any number of instances of vcpkg on a machine and they do not interfere with each other.
177198

178199
The contents of a vcpkg instance are:

0 commit comments

Comments
 (0)