Редагувати

Поділитися через


vcpkg export

Synopsis

vcpkg export [options] {<package>... | --x-all-installed}

Description

Exports built packages from the installed directory into a standalone developer SDK.

export produces a standalone, distributable SDK (Software Development Kit) that can be used on another machine without separately acquiring vcpkg. It contains:

  1. The prebuilt binaries for the selected packages
  2. Their transitive dependencies
  3. Integration files, such as a CMake toolchain or MSBuild props/targets

Note

This command's behavior is different in Classic Mode and Manifest Mode

The export command does not install any packages or transitive dependencies. It only exports packages that are already installed.

Refer to Manifest Mode or Classic Mode for more details.

Classic Mode

In classic mode, vcpkg export accepts triplet-qualified package specification arguments (for example: zlib:x64-windows)

You specify packages to export by adding <port name>:<triplet> arguments to the command line.

For example, to export the sqlite package for x64-windows and x64-linux, use:

vcpkg export sqlite:x64-windows sqlite:x64-linux --zip

This command exports the specified packages in zip format. Both sqlite:x64-windows and sqlite:x64-linux must be installed prior to running vcpkg export.

Manifest Mode

In manifest mode, the command exports all currently installed packages. The installation directory includes all the packages declared in the manifest (vcpkg.json) as well as their transitive dependencies. Run vcpkg install before using this command to ensure that all required packages are installed.

In this mode you can't specify individual packages to export. The command operates on the entire installed state as a single entity, respecting the dependencies and versions specified in the manifest file.

Another difference is the requirement of the --output-dir option. This option specifies the directory where the exported packages will be stored.

For example, from the manifest directory

vcpkg export --zip --output-dir=.\exports

Exports all currently installed packages to the .\exports directory in a zip file. The --zip option specifies that the exported packages should be compressed into a zip file.

Standard Integration

Most export formats contain a standard set of integration files:

Some export formats differ from this standard set; see the individual format help below for more details.

Formats

Officially supported SDK formats:

Experimental SDK formats (may change or be removed at any time):

Raw Directory

vcpkg export --raw [options] <package>...

Create an uncompressed directory layout at <output-dir>/<output>/.

Contains the Standard Integration Files.

Zip

vcpkg export --zip [options] <package>...

Create a zip compressed directory layout at <output-dir>/<output>.zip.

Contains the Standard Integration Files.

7Zip

vcpkg export --7zip [options] <package>...

Create a 7zip directory layout at <output-dir>/<output>.7z.

Contains the Standard Integration Files.

NuGet

vcpkg export --nuget [options] <package>...

Create an NuGet package at <output-dir>/<nuget-id>.<nuget-version>.nupkg.

Contains the Standard Integration Files as well as additional MSBuild integration to support inclusion in an MSBuild C++ project (.vcxproj) via the NuGet Package Manager. Note that you cannot mix multiple NuGet packages produced with export together -- only one of the packages will be used. To add additional libraries, you must create a new export with the full set of dependencies.

Format specific options:

IFW

Note

This section covers an experimental feature of vcpkg which may change or be removed at any time.

vcpkg export --ifw [options] <package>...

Export to an IFW-based installer.

Format specific options:

Chocolatey

Note

This section covers an experimental feature of vcpkg which may change or be removed at any time.

vcpkg export --x-chocolatey [options] <package>...

Export a Chocolatey package.

Format specific options:

Prefab

Note

This section covers an experimental feature of vcpkg which may change or be removed at any time.

vcpkg export --prefab [options] <package>...

Export to Prefab format.

Format specific options:

Options

All vcpkg commands support a set of common options.

<package>

This is the list of top-level built packages which will be included in the SDK. Any dependencies of these packages will also be included to ensure the resulting SDK is self-contained.

Package Syntax

<port name>:<triplet>

Package references without a triplet are automatically qualified by the default target triplet. Note: <port name>:<triplet> arguments are not allowed when using vcpkg export in manifest mode.

--x-all-installed

Note

This section covers an experimental feature of vcpkg which may change or be removed at any time.

Export all installed packages. This option is implied when using vcpkg export in manifest mode.

--dry-run

Do not perform the export, only print the export plan.

--ifw-configuration-file-path=

Specify the temporary file path for the installer configuration.

--ifw-installer-file-path=

Specify the file path for the exported installer.

--ifw-packages-directory-path=

Specify the temporary directory path for the repacked packages.

--ifw-repository-directory-path=

Specify the directory path for the exported repository.

--ifw-repository-url=

Specify the remote repository URL for the online installer.

--x-maintainer=

Specify the maintainer for the exported Chocolatey package.

--nuget-description=

Specifies the output description for NuGet .nupkg files.

Defaults to "Vcpkg NuGet export".

--nuget-id=

Specifies the output id for NuGet .nupkg files.

This option overrides the --output option specifically for the NuGet exporter. See --output for default values.

--nuget-version=

Specifies the output version for NuGet .nupkg files.

Defaults to 1.0.0.

--output=

Specifies the output base name.

Each SDK type uses this base name to determine its specific output files. See the SDK-specific documentation above for details.

Defaults to vcpkg-export-<date>-<time>. Scripted use of export should always pass this flag to ensure deterministic output.

--output-dir=

Specifies the output directory.

All top-level SDK files will be produced into this directory. This option is required in manifest mode. In classic mode, this is optional and defaults to the vcpkg root directory.

--prefab-artifact-id=

Artifact Id is the name of the project according to Maven specifications.

--prefab-group-id=

GroupId uniquely identifies your project according to Maven specifications.

--prefab-maven

Enable Maven.

--prefab-min-sdk=

Android minimum supported sdk version.

--prefab-target-sdk=

Android target supported sdk version.

--prefab-version=

Version is the version of the project according to Maven specifications.

--x-version-suffix=

Specify the version suffix to add for the exported Chocolatey package.