Skip to main content

Windows Installation

For Windows, Cortex.cpp can be installed in two ways, by downloading the windows installer or via the Windows Subsystem for Linux (WSL).

Windows

Install Cortex.cpp

info

Before installation, make sure that you have met the minimum requirements to run Cortex. The instructions below are for stable releases only. For beta and nightly releases, please replace cortex with cortex-beta and cortex-nightly, respectively.

Download the windows installer:

Data Folder

By default, Cortex.cpp is installed in the following directory:


# Binary Location
C:\Users\<username>\AppData\Local\cortexcpp\
# Application Data (Engines, Models and Logs folders)
C:\Users\<username>\cortexcpp
# Configuration File
C:\Users\<username>\.cortexrc

Uninstall Cortex.cpp

To uninstall Cortex.cpp:

  1. Open the Control Panel.
  2. Navigate to Add or Remove program.
  3. Search for cortexcpp and click Uninstall.

Windows Subsystem Linux

info

Windows Subsystem Linux allows running Linux tools and workflows seamlessly alongside Windows applications. For more information, please see this article.

Follow the linux installation steps to install Cortex.cpp on the WSL.

Build from Source

Prerequisites

  • CMake >= 3.10
  • msvc (Visual Studio 2019/2022)
  • ninja-build
  • make-gnu

Build Cortex.cpp

  1. Clone the Cortex Repository


    git clone https://github.com/janhq/cortex.cpp.git
    cd cortex.cpp
    git submodule update --init

  2. Build Cortex.cpp from source:


    cd engine
    make configure-vcpkg
    make build CMAKE_EXTRA_FLAGS="-DCORTEX_CPP_VERSION=latest -DCMAKE_BUILD_TEST=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_TOOLCHAIN_FILE=vcpkg\\scripts\\buildsystems\\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_BUILD_TYPE=RELEASE -GNinja"

  3. Verify that Cortex.cpp is builded correctly by getting help information.


    # Get the help information
    .\build\cortex.exe -h

Update cortex to latest version


cortex.exe update