mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
189be8c68f
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2.2 KiB
2.2 KiB
Building on Windows with vcpkg
This will require more than 30 GB of free space on your hard drive.
Prerequisites
-
Install Visual Studio with "Desktop development with C++"
-
Install CMake
-
Install git
-
Install vcpkg
git clone https://github.com/Microsoft/vcpkg.git cd vcpkg .\bootstrap-vcpkg.bat .\vcpkg integrate install .\vcpkg integrate powershell cd ..
-
Configure the environment variables for vcpkg.
Check this document for more information for how to set environment variables on Windows.- Ensure your dependencies are built as 64-bit
e.g.setx VCPKG_DEFAULT_TRIPLET x64-windows
See documentation about Triplets
default isx86-windows
- Set VCPKG_ROOT to the vcpkg path
e.g.setx VCPKG_ROOT <path to vcpkg>
See VCPKG_ROOT documentation - Append the vcpkg path to your path
e.g.setx PATH "%PATH%;<path to vcpkg>"
- For more configurations, see https://learn.microsoft.com/en-gb/vcpkg/users/config-environment
- Ensure your dependencies are built as 64-bit
-
You may need to restart your computer to ensure all your environment variables and what-not are loaded everywhere.
Building
- Clone
git clone --recurse-submodules https://github.com/Chatterino/chatterino2.git
- Install dependencies
cd .\chatterino2\ vcpkg install
- Build
When using CMD, usecmake -B build -DCMAKE_TOOLCHAIN_FILE="$Env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" cd build cmake --build . --parallel <threads> --config Release
-DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake
to specify the toolchain. To build with plugins add-DCHATTERINO_PLUGINS=ON
tocmake -B build
command. - Run
.\bin\chatterino2.exe