mirror-chatterino2/BUILDING_ON_WINDOWS_WITH_VCPKG.md

1.3 KiB

Building on Windows with vcpkg

Prerequisites

  1. Install Visual Studio with "Desktop development with C++" (~9.66 GB)
  2. Install CMake (~109 MB)
  3. Install git (~264 MB)
  4. Install vcpkg (~80 MB)
    • git clone https://github.com/Microsoft/vcpkg.git
    • cd .\vcpkg\
    • .\bootstrap-vcpkg.bat
    • .\vcpkg integrate install
    • .\vcpkg integrate powershell
    • cd ..
  5. Configure the environment for vcpkg
    • set VCPKG_DEFAULT_TRIPLET=x64-windows
    • set VCPKG_ROOT=C:\path\to\vcpkg\
    • set PATH=%PATH%;%VCPKG_ROOT%

Building

  1. Clone
    • git clone --recurse-submodules https://github.com/Chatterino/chatterino2.git
  2. Install dependencies (~21 GB)
    • cd .\chatterino2\
    • vcpkg install
  3. Build
    • mkdir .\build\
    • cd .\build\
    • (cmd) cmake .. -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake
    • (ps1) cmake .. -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake"
    • cmake --build . --parallel <threads> --config Release
  4. Run
    • .\bin\chatterino2.exe