vcpkg.cmd 0.0.2 ā 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +164 -1
- package/install.cmd +29 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1 +1,164 @@
|
|
|
1
|
-
|
|
1
|
+
<!--
|
|
2
|
+
This document is a copy of the README file on the Microsoft/vcpkg-docs repository.
|
|
3
|
+
|
|
4
|
+
To make changes modify this file instead:
|
|
5
|
+
https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/readme/vcpkg-README.md
|
|
6
|
+
-->
|
|
7
|
+
|
|
8
|
+
[š Read in a different language](https://learn.microsoft.com/locale/?target=https%3A%2F%2Flearn.microsoft.com%2Fvcpkg%2F)
|
|
9
|
+
|
|
10
|
+
# vcpkg overview
|
|
11
|
+
|
|
12
|
+
vcpkg is a free and open-source C/C++ package manager maintained by Microsoft
|
|
13
|
+
and the C++ community.
|
|
14
|
+
|
|
15
|
+
Initially launched in 2016 as a tool for assisting developers in migrating their
|
|
16
|
+
projects to newer versions of Visual Studio, vcpkg has evolved into a
|
|
17
|
+
cross-platform tool used by developers on Windows, macOS, and Linux. vcpkg has a
|
|
18
|
+
large collection of open-source libraries and enterprise-ready features designed to
|
|
19
|
+
facilitate your development process with support for any build and project
|
|
20
|
+
systems. vcpkg is a C++ tool at heart and is written in C++ with scripts in
|
|
21
|
+
CMake. It is designed from the ground up to address the unique pain points C/C++
|
|
22
|
+
developers experience.
|
|
23
|
+
|
|
24
|
+
This tool and ecosystem are constantly evolving, and we always appreciate
|
|
25
|
+
contributions! Learn how to start contributing with our [packaging
|
|
26
|
+
tutorial](https://learn.microsoft.com/vcpkg/get_started/get-started-adding-to-registry) and [maintainer
|
|
27
|
+
guide](https://learn.microsoft.com/vcpkg/contributing/maintainer-guide).
|
|
28
|
+
|
|
29
|
+
# Get started
|
|
30
|
+
|
|
31
|
+
First, follow one of our quick start guides.
|
|
32
|
+
|
|
33
|
+
Whether you're using CMake, MSBuild, or any other build system, vcpkg has you covered:
|
|
34
|
+
|
|
35
|
+
* [vcpkg with CMake](https://learn.microsoft.com/vcpkg/get_started/get-started)
|
|
36
|
+
* [vcpkg with MSBuild](https://learn.microsoft.com/vcpkg/get_started/get-started-msbuild)
|
|
37
|
+
* [vcpkg with other build systems](https://learn.microsoft.com/vcpkg/users/buildsystems/manual-integration)
|
|
38
|
+
|
|
39
|
+
You can also use any editor:
|
|
40
|
+
|
|
41
|
+
* [vcpkg with Visual Studio](https://learn.microsoft.com/vcpkg/get_started/get-started-vs)
|
|
42
|
+
* [vcpkg with Visual Studio Code](https://learn.microsoft.com/vcpkg/get_started/get-started-vscode)
|
|
43
|
+
* [vcpkg with
|
|
44
|
+
CLion](<https://www.jetbrains.com/help/clion/package-management.html>)
|
|
45
|
+
* [vcpkg with Qt Creator](<https://doc.qt.io/qtcreator/creator-vcpkg.html>)
|
|
46
|
+
|
|
47
|
+
If a library you need is not present in the vcpkg registry, [open an issue on
|
|
48
|
+
the GitHub repository][contributing:submit-issue] or [contribute the package
|
|
49
|
+
yourself](https://learn.microsoft.com/vcpkg/get_started/get-started-adding-to-registry).
|
|
50
|
+
|
|
51
|
+
After you've gotten vcpkg installed and working, you may wish to [add
|
|
52
|
+
tab completion to your terminal](https://learn.microsoft.com/vcpkg/commands/integrate#vcpkg-autocompletion).
|
|
53
|
+
|
|
54
|
+
# Installation
|
|
55
|
+
|
|
56
|
+
To install vcpkg on Windows, run:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
npm i -g vcpkg.cmd
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
This installs the vcpkg command globally using npm, with telemetry disabled by default.
|
|
63
|
+
|
|
64
|
+
# Use vcpkg
|
|
65
|
+
|
|
66
|
+
Create a [manifest for your project's dependencies](https://learn.microsoft.com/vcpkg/consume/manifest-mode):
|
|
67
|
+
|
|
68
|
+
```Console
|
|
69
|
+
vcpkg new --application
|
|
70
|
+
vcpkg add port fmt
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Or [install packages through the command line](https://learn.microsoft.com/vcpkg/consume/classic-mode):
|
|
74
|
+
|
|
75
|
+
```Console
|
|
76
|
+
vcpkg install fmt
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Then use one of our available integrations for
|
|
80
|
+
[CMake](https://learn.microsoft.com/vcpkg/concepts/build-system-integration#cmake-integration),
|
|
81
|
+
[MSBuild](https://learn.microsoft.com/vcpkg/concepts/build-system-integration#msbuild-integration) or
|
|
82
|
+
[other build
|
|
83
|
+
systems](https://learn.microsoft.com/vcpkg/concepts/build-system-integration#manual-integration).
|
|
84
|
+
|
|
85
|
+
For a short description of all available commands, run `vcpkg help`.
|
|
86
|
+
Run `vcpkg help [topic]` for details on a specific topic.
|
|
87
|
+
|
|
88
|
+
# Key features
|
|
89
|
+
|
|
90
|
+
vcpkg offers powerful features for your package management needs:
|
|
91
|
+
|
|
92
|
+
* [easily integrate with your build system](https://learn.microsoft.com/vcpkg/concepts/build-system-integration)
|
|
93
|
+
* [control the versions of your dependencies](https://learn.microsoft.com/vcpkg/users/versioning)
|
|
94
|
+
* [package and publish your own packages](https://learn.microsoft.com/vcpkg/concepts/registries)
|
|
95
|
+
* [reuse your binary artifacts](https://learn.microsoft.com/vcpkg/users/binarycaching)
|
|
96
|
+
* [enable offline scenarios with asset caching](https://learn.microsoft.com/vcpkg/concepts/asset-caching)
|
|
97
|
+
|
|
98
|
+
# Contribute
|
|
99
|
+
|
|
100
|
+
vcpkg is an open source project, and is thus built with your contributions. Here
|
|
101
|
+
are some ways you can contribute:
|
|
102
|
+
|
|
103
|
+
* [Submit issues][contributing:submit-issue] in vcpkg or existing packages
|
|
104
|
+
* [Submit fixes and new packages][contributing:submit-pr]
|
|
105
|
+
|
|
106
|
+
Please refer to our [mantainer guide](https://learn.microsoft.com/vcpkg/contributing/maintainer-guide) and
|
|
107
|
+
[packaging tutorial](https://learn.microsoft.com/vcpkg/get_started/get-started-packaging) for more details.
|
|
108
|
+
|
|
109
|
+
This project has adopted the [Microsoft Open Source Code of
|
|
110
|
+
Conduct][contributing:coc]. For more information see the [Code of Conduct
|
|
111
|
+
FAQ][contributing:coc-faq] or email
|
|
112
|
+
[opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional
|
|
113
|
+
questions or comments.
|
|
114
|
+
|
|
115
|
+
[contributing:submit-issue]: https://github.com/microsoft/vcpkg/issues/new/choose
|
|
116
|
+
[contributing:submit-pr]: https://github.com/microsoft/vcpkg/pulls
|
|
117
|
+
[contributing:coc]: https://opensource.microsoft.com/codeofconduct/
|
|
118
|
+
[contributing:coc-faq]: https://opensource.microsoft.com/codeofconduct/
|
|
119
|
+
|
|
120
|
+
# Resources
|
|
121
|
+
|
|
122
|
+
* Ports: [Microsoft/vcpkg](<https://github.com/microsoft/vcpkg>)
|
|
123
|
+
* Source code: [Microsoft/vcpkg-tool](<https://github.com/microsoft/vcpkg-tool>)
|
|
124
|
+
* Docs: [Microsoft Learn | vcpkg](https://learn.microsoft.com/vcpkg)
|
|
125
|
+
* Website: [vcpkg.io](<https://vcpkg.io>)
|
|
126
|
+
* Email: [vcpkg@microsoft.com](<mailto:vcpkg@microsoft.com>)
|
|
127
|
+
* Discord: [\#include \<C++\>'s Discord server](<https://www.includecpp.org>), in the #švcpkg channel
|
|
128
|
+
* Slack: [C++ Alliance's Slack server](<https://cppalliance.org/slack/>), in the #vcpkg channel
|
|
129
|
+
|
|
130
|
+
# License
|
|
131
|
+
|
|
132
|
+
The code in this repository is licensed under the MIT License. The libraries
|
|
133
|
+
provided by ports are licensed under the terms of their original authors. Where
|
|
134
|
+
available, vcpkg places the associated license(s) in the location
|
|
135
|
+
[`installed/<triplet>/share/<port>/copyright`](https://learn.microsoft.com/vcpkg/contributing/maintainer-guide#install-copyright-file).
|
|
136
|
+
|
|
137
|
+
# Security
|
|
138
|
+
|
|
139
|
+
Most ports in vcpkg build the libraries in question using the original build
|
|
140
|
+
system preferred by the original developers of those libraries, and download
|
|
141
|
+
source code and build tools from their official distribution locations. For use
|
|
142
|
+
behind a firewall, the specific access needed will depend on which ports are
|
|
143
|
+
being installed. If you must install it in an "air gapped" environment, consider
|
|
144
|
+
instaling once in a non-"air gapped" environment, populating an [asset
|
|
145
|
+
cache](https://learn.microsoft.com/vcpkg/users/assetcaching) shared with the otherwise "air gapped"
|
|
146
|
+
environment.
|
|
147
|
+
|
|
148
|
+
# Telemetry
|
|
149
|
+
|
|
150
|
+
vcpkg collects usage data in order to help us improve your experience. The data
|
|
151
|
+
collected by Microsoft is anonymous. You can opt-out of telemetry by:
|
|
152
|
+
|
|
153
|
+
- running the bootstrap-vcpkg script with `-disableMetrics`
|
|
154
|
+
- passing `--disable-metrics` to vcpkg on the command line
|
|
155
|
+
- setting the `VCPKG_DISABLE_METRICS` environment variable
|
|
156
|
+
|
|
157
|
+
Read more about vcpkg telemetry at [https://learn.microsoft.com/vcpkg/about/privacy](https://learn.microsoft.com/vcpkg/about/privacy).
|
|
158
|
+
|
|
159
|
+
<br>
|
|
160
|
+
<br>
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
[](https://nodef.github.io)
|
|
164
|
+

|
package/install.cmd
CHANGED
|
@@ -1,9 +1,35 @@
|
|
|
1
1
|
@echo off
|
|
2
2
|
@setlocal enabledelayedexpansion
|
|
3
|
+
set "REPO=https://github.com/Microsoft/vcpkg"
|
|
4
|
+
set "TEMP_DIR=temp"
|
|
5
|
+
|
|
6
|
+
|
|
3
7
|
:: We want to download vcpkg in the current directory
|
|
4
|
-
|
|
5
|
-
git
|
|
6
|
-
|
|
8
|
+
:: 1. Download the repo to a temp folder
|
|
9
|
+
git --version >nul 2>&1
|
|
10
|
+
if "%errorlevel%" neq "0" (
|
|
11
|
+
echo Git is not installed. Please install Git and ensure it is in your PATH.
|
|
12
|
+
exit /b 1
|
|
13
|
+
)
|
|
14
|
+
git clone %REPO% "%TEMP_DIR%" --depth 1
|
|
15
|
+
:: 2. Move the contents of the temp folder to the current directory
|
|
16
|
+
robocopy /? >nul 2>&1
|
|
17
|
+
if "%errorlevel%"=="0" (
|
|
18
|
+
robocopy "%TEMP_DIR%" . /e /move /nfl /ndl /njh /njs /np /nc /ns /xd "%TEMP_DIR%\.git"
|
|
19
|
+
)
|
|
20
|
+
else (
|
|
21
|
+
for /d %%D in ("%TEMP_DIR%\*") do (
|
|
22
|
+
if /i not "%%~nxD"==".git" move "%%D" .
|
|
23
|
+
)
|
|
24
|
+
for %%F in ("%TEMP_DIR%\*") do (
|
|
25
|
+
if /i not "%%~nxF"==".git" move "%%F" .
|
|
26
|
+
)
|
|
27
|
+
)
|
|
28
|
+
if exist "%TEMP_DIR%\" (
|
|
29
|
+
rmdir /i /q "%TEMP_DIR%"
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
|
|
7
33
|
:: Now, lets install vcpkg
|
|
8
34
|
bootstrap-vcpkg -disableMetrics
|
|
9
35
|
vcpkg integrate install
|