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
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:
- From release: https://github.com/janhq/cortex.cpp/releases
- From quick download links:
- Local installer
.deb
: - Network installer
.deb
: - Binary:
- Local installer
Data Folder
By default, Cortex.cpp is installed in the following directory:
# Binary LocationC:\Users\<username>\AppData\Local\cortexcpp\# Application Data (Engines, Models and Logs folders)C:\Users\<username>\cortexcpp# Configuration FileC:\Users\<username>\.cortexrc
Uninstall Cortex.cpp
To uninstall Cortex.cpp:
- Open the Control Panel.
- Navigate to Add or Remove program.
- Search for
cortexcpp
and click Uninstall.
Windows Subsystem Linux
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
-
Clone the Cortex Repository
git clone https://github.com/janhq/cortex.cpp.gitcd cortex.cppgit submodule update --init -
Build Cortex.cpp from source:
cd enginemake configure-vcpkgmake 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" -
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