Created
June 5, 2021 19:29
-
-
Save Jammyjamjamman/589fe674c5592a194aba817b7cc8e9b1 to your computer and use it in GitHub Desktop.
Get list of installed vcpkgs. Output can be passed to "vcpkg install ..."
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Creates a space-separated list of packages installed in your vcpkg instance. | |
# Expects to be executed in the same dir as your vcpkg.exe. | |
$packages_list = "" | |
# Used to exclude packages with square brackets, because they're a subpackage of another package. | |
# Also only select x64-windows-static installed packages. | |
$packages_select_string = "[^\]]:x64-windows-static" | |
.\vcpkg.exe list | Select-String $packages_select_string | ForEach-Object -Process { | |
$packages_list += ($_ -split ' ')[0] + ' ' | |
} | |
Write-Output $packages_list.Substring(0, $packages_list.Length-1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment