Compiling Cockatrice (Windows)
SlightlyCircuitous edited this page 2026-08-10 16:25:05 -04:00

  ← Back to Compiling Overview

Compiling On Windows

Looking to get setup on Windows? This guide should help you start with CLion! Windows is finicky and this guide should hopefully help you recreate whatever mess I ended up with that is fully functional.

Software

Development Environment Configurations

  • Add Qt6 to your PATH Environment Variable
    • Windows Start > Edit System Environment Variables > Environment variables... > PATH > Edit...
      • Add the absolute path of your Qt6 binary directory
        • Ex: C:\Users\Zach\Documents\Development\Qt\6.6.3\msvc2019_64\bin
  • Establish VCPKG repository
    • Windows Start > Git Bash
      • git clone https://github.com/Cockatrice/Cockatrice.git ~/Desktop/Cockatrice
        cd ~/Desktop/Cockatrice
        git submodule update --init   
        
  • Setup CLion with the proper Toolchain and CMake profile
    • Open Cockatrice project in CLion
    • Set up the VS2022 Toolchain Configuration
      • File > Settings > Build, Execution, Deployment > Toolchains > +
      • Name: Visual Studio 17 2022
      • Toolset: C:\Program Files\Microsoft Visual Studio\2022\Community
    • Set up a CMake profile
      • File > Settings > Build, Execution, Deployment > CMake > +
        • Build type: Release
        • Toolchain: Visual Studio 17 2022
        • Generator: Visual Studio 17 2022
        • CMake options: -DCMAKE_GENERATOR_PLATFORM="x64" -DWITH_SERVER=1
        • Build options: --parallel 8 -- -p:CL_MPcount=8 -p:UseMultiToolTask=true
    • Modify CMake Application to build All Targets
      • Run > Edit Configurations... > CMake Application > cockatrice > Target > All targets

Building and Testing

  • Just run it in CLion now, it should (hopefully) work!