mirror-chatterino2/BUILDING_ON_WINDOWS_WITH_VCPKG.md
pajlada 35ac9d5f22
Update Windows build documentation (#4413)
This moves CMake to be our top supported build method, with Qt creator
being lower priority now.
2023-03-04 12:09:20 +01:00

2.1 KiB

Building on Windows with vcpkg

This will require more than 30GB of free space on your hard drive.

Prerequisites

  1. Install Visual Studio with "Desktop development with C++"
  2. Install CMake
  3. Install git
  4. Install vcpkg
    • git clone https://github.com/Microsoft/vcpkg.git
    • cd .\vcpkg\
    • .\bootstrap-vcpkg.bat
    • .\vcpkg integrate install
    • .\vcpkg integrate powershell
    • cd ..
  5. Configure the environment variables for vcpkg.
    Check this document for more information for how to set environment variables on Windows.
  6. You may need to restart your computer to ensure all your environment variables and what-not are loaded everywhere.

Building

  1. Clone
    • git clone --recurse-submodules https://github.com/Chatterino/chatterino2.git
  2. Install dependencies
    • 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