mirror-chatterino2/BUILDING_ON_WINDOWS_WITH_VCPKG.md
nerix 189be8c68f
chore: remove old Qt 5.12 code, update docs and FreeBSD runner (#5396)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2024-06-23 12:26:59 +00:00

2.2 KiB

Building on Windows with vcpkg

This will require more than 30 GB 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
    cmake -B build -DCMAKE_TOOLCHAIN_FILE="$Env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake"
    cd build
    cmake --build . --parallel <threads> --config Release
    
    When using CMD, use -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake to specify the toolchain. To build with plugins add -DCHATTERINO_PLUGINS=ON to cmake -B build command.
  4. Run .\bin\chatterino2.exe