Custom vcpkg toolchains.
Requirements
Install Git.
Select Components
☐ Windows Explorer integration
☐ Associate .git* configuration files with the default text editor
☐ Associate .sh files to be run with Bash
Choosing the default editor used by Git
Use Visual Studio Code as Git's default editor
Adjusting the name of the initial branch in new repositories
◉ Override the default branch name for new repositories
Specify the name "git init" should use for the initial branch: master
Configuring the line ending conversions
◉ Checkout as-is, commit as-is
Configuring the terminal emulator to use Git Bash
◉ Use Windows' default console window
Choose the default behavior of `git pull`
◉ Rebase
Choose a credential helper
◉ None
Install LLVM.
Install Options
◉ Add LLVM to the system PATN for all users
Install NASM
☐ RDOFF
☐ Manual
☐ VS8 integration
Install Visual Studio Preview.
Workloads
☑ Desktop development with C++
☑ Linux development with C++
☑ Node.js development
Installation Details
+ Desktop development with C++
☐ Test Adapter for Boost.Test
☐ Test Adapter for Google Test
☐ Live Share
+ Node.js development
☐ Web Deploy
Install Visual Studio extensions.
Add the following directories to the Path system environment variable.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin
C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\Msbuild\Microsoft\VisualStudio\NodeJs
C:\Program Files\NASM
Set system environment variables.
set VCPKG_ROOT=C:\Workspace\vcpkg
set VCPKG_FEATURE_FLAGS=-binarycaching
set VCPKG_DEFAULT_TRIPLET=x64-windows-xnet
set VCPKG_DOWNLOADS=C:\Workspace\downloads
set VCPKG_OVERLAY_PORTS=C:\Workspace\boost\ports;C:\Workspace\ports
set VCPKG_KEEP_ENV_VARS=VSCMD_SKIP_SENDTELEMETRY
set VSCMD_SKIP_SENDTELEMETRY=1Delete binary cache.
rd /q /s "%LocalAppData%\vcpkg\archives"Create directories.
md C:\Workspace
md C:\Workspace\boost
md C:\Workspace\ports
md C:\Workspace\vcpkg
md C:\Workspace\downloadsRequirements
Install basic development packages.
sudo apt install -y binutils-dev gcc g++ gdb make nasm ninja-build manpages-dev pkg-configInstall CMake.
sudo rm -rf /opt/cmake; sudo mkdir -p /opt/cmake
wget https://github.com/Kitware/CMake/releases/download/v3.18.4/cmake-3.18.4-Linux-x86_64.tar.gz
sudo tar xf cmake-3.18.4-Linux-x86_64.tar.gz -C /opt/cmake --strip-components=1
rm -f cmake-3.18.4-Linux-x86_64.tar.gz
sudo tee /etc/profile.d/cmake.sh >/dev/null <<'EOF'
export PATH="/opt/cmake/bin:${PATH}"
EOF
sudo chmod 0755 /etc/profile.d/cmake.sh
. /etc/profile.d/cmake.shInstall Node.
sudo rm -rf /opt/node; sudo mkdir -p /opt/node
wget https://nodejs.org/dist/v12.16.3/node-v12.16.3-linux-x64.tar.xz
sudo tar xf node-v12.16.3-linux-x64.tar.xz -C /opt/node --strip-components=1
rm -f node-v12.16.3-linux-x64.tar.xz
sudo tee /etc/profile.d/node.sh >/dev/null <<'EOF'
export PATH="/opt/node/bin:${PATH}"
EOF
sudo chmod 0755 /etc/profile.d/node.sh
. /etc/profile.d/node.shInstall LLVM.
sudo rm -rf /opt/llvm; sudo mkdir -p /opt/llvm
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04.tar.xz
sudo tar xf clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04.tar.xz -C /opt/llvm --strip-components=1
rm -f clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04.tar.xz
sudo tee /etc/profile.d/llvm.sh >/dev/null <<'EOF'
export PATH="/opt/llvm/bin:${PATH}"
EOF
sudo chmod 0755 /etc/profile.d/llvm.sh
. /etc/profile.d/llvm.sh
sudo tee /etc/ld.so.conf.d/llvm.conf >/dev/null <<'EOF'
/opt/llvm/lib
EOF
sudo ldconfigSet system LLVM C and C++ compiler.
for i in clang clang++; do sudo update-alternatives --remove-all $i; done
sudo update-alternatives --install /usr/bin/clang clang /opt/llvm/bin/clang 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /opt/llvm/bin/clang++ 100Set system C and C++ compiler.
for i in c++ cc; do sudo update-alternatives --remove-all $i; done
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 100Set system clang-format tool.
sudo update-alternatives --install /usr/bin/clang-format clang-format /opt/llvm/bin/clang-format 100Set system environment variables.
sudo tee /etc/profile.d/vcpkg.sh >/dev/null <<'EOF'
export PATH="/opt/vcpkg:${PATH}"
export VCPKG_ROOT="/opt/vcpkg"
export VCPKG_FEATURE_FLAGS="-binarycaching"
export VCPKG_DEFAULT_TRIPLET="x64-linux-xnet"
export VCPKG_DOWNLOADS="/opt/downloads"
export VCPKG_OVERLAY_PORTS="/opt/boost/ports:/opt/ports"
EOF
sudo chmod 0755 /etc/profile.d/vcpkg.sh
. /etc/profile.d/vcpkg.shDelete binary cache.
rm -rf ~/.cache/vcpkg ~/.vcpkg/archivesCreate symlinks (WSL).
for i in boost ports vcpkg downloads; do
sudo ln -s /mnt/c/Workspace/$i /opt/$i
doneCreate directories (VM).
for i in boost ports vcpkg downloads; do
sudo mkdir /opt/$i; sudo chown $(id -un):$(id -gn) /opt/$i
doneDownload vcpkg and toolchains.
cd C:/Workspace || cd /opt
git clone [email protected]:microsoft/vcpkg vcpkg
git clone [email protected]:qis/toolchains vcpkg/triplets/toolchains
cmake -P vcpkg/triplets/toolchains/triplets/install.cmakeBuild vcpkg.
C:\Workspace\vcpkg\bootstrap-vcpkg.bat -disableMetrics -win64Build vcpkg.
/opt/vcpkg/bootstrap-vcpkg.sh -disableMetrics -useSystemBinaries && rm -rf /opt/vcpkg/toolsrc/build.relCreate a ports overlays.
cd C:/Workspace || cd /opt
git clone git@github.com:xnetsystems/boost boost
git clone git@github.com:xnetsystems/bcrypt ports/bcrypt
git clone git@github.com:xnetsystems/compat ports/compat
git clone git@github.com:xnetsystems/dtz ports/dtz
git clone git@github.com:xnetsystems/ice ports/ice
git clone git@github.com:xnetsystems/sql ports/sql
git clone git@github.com:xnetsystems/tbb ports/tbb
git clone git@github.com:xnetsystems/http ports/http
git clone git@github.com:xnetsystems/pdf ports/pdf
cmake -P boost/create.cmakeInstall ports in cmd.exe.
vcpkg install --editable benchmark doctest gtest openssl ^
brotli bzip2 liblzma libzip zlib zstd libjpeg-turbo libpng ^
boost date fmt libssh2 nlohmann-json pugixml tbb utf8proc ^
bcrypt compat dtz http ice pdf sqlInstall ports in wsl.exe.
vcpkg install --editable benchmark doctest gtest openssl \
brotli bzip2 liblzma libzip zlib zstd libjpeg-turbo libpng \
boost date fmt libssh2 nlohmann-json pugixml tbb utf8proc \
bcrypt compat dtz http ice pdf sqlClean buildtrees directory and remove packages directories.
cd C:/Workspace || cd /opt
cmake -P vcpkg/triplets/toolchains/clean.cmake