Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 9f5a796

Browse files
committed
doc: improve "Build from Source" in README
1 parent f090e0b commit 9f5a796

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

README.md

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -313,19 +313,26 @@ Cortex.cpp is available with a Network Installer, which is a smaller installer b
313313

314314
### Build from Source
315315

316+
Firstly, clone the Cortex.cpp repository [here](https://github.com/janhq/cortex.cpp) and initialize the submodules:
317+
318+
```bash
319+
git clone https://github.com/janhq/cortex.cpp
320+
cd cortex.cpp
321+
git submodule update --init --recursive
322+
```
323+
316324
#### Windows
317325

318-
1. Clone the Cortex.cpp repository [here](https://github.com/janhq/cortex.cpp).
319-
2. Navigate to the `engine` folder.
320-
3. Configure the vpkg:
326+
1. Navigate to the `engine` folder.
327+
2. Configure the vpkg:
321328

322329
```bash
323330
cd vcpkg
324331
./bootstrap-vcpkg.bat
325332
vcpkg install
326333
```
327334

328-
4. Build the Cortex.cpp inside the `engine/build` folder:
335+
3. Build the Cortex.cpp inside the `engine/build` folder:
329336

330337
```bash
331338
mkdir build
@@ -334,25 +341,24 @@ cmake .. -DBUILD_SHARED_LIBS=OFF -DCMAKE_TOOLCHAIN_FILE=path_to_vcpkg_folder_in_
334341
cmake --build . --config Release
335342
```
336343

337-
5. Verify that Cortex.cpp is installed correctly by getting help information.
344+
4. Verify that Cortex.cpp is installed correctly by getting help information.
338345

339346
```sh
340347
cortex -h
341348
```
342349

343350
#### MacOS
344351

345-
1. Clone the Cortex.cpp repository [here](https://github.com/janhq/cortex.cpp).
346-
2. Navigate to the `engine` folder.
347-
3. Configure the vpkg:
352+
1. Navigate to the `engine` folder.
353+
2. Configure the vpkg:
348354

349355
```bash
350356
cd vcpkg
351357
./bootstrap-vcpkg.sh
352358
vcpkg install
353359
```
354360

355-
4. Build the Cortex.cpp inside the `engine/build` folder:
361+
3. Build the Cortex.cpp inside the `engine/build` folder:
356362

357363
```bash
358364
mkdir build
@@ -361,25 +367,24 @@ cmake .. -DCMAKE_TOOLCHAIN_FILE=path_to_vcpkg_folder_in_cortex_repo/vcpkg/script
361367
make -j4
362368
```
363369

364-
5. Verify that Cortex.cpp is installed correctly by getting help information.
370+
4. Verify that Cortex.cpp is installed correctly by getting help information.
365371

366372
```sh
367-
cortex -h
373+
./cortex -h
368374
```
369375

370376
#### Linux
371377

372-
1. Clone the Cortex.cpp repository [here](https://github.com/janhq/cortex.cpp).
373-
2. Navigate to the `engine` folder.
374-
3. Configure the vpkg:
378+
1. Navigate to the `engine` folder.
379+
2. Configure the vpkg:
375380

376381
```bash
377382
cd vcpkg
378383
./bootstrap-vcpkg.sh
379384
vcpkg install
380385
```
381386

382-
4. Build the Cortex.cpp inside the `engine/build` folder:
387+
3. Build the Cortex.cpp inside the `engine/build` folder:
383388

384389
```bash
385390
mkdir build
@@ -388,10 +393,10 @@ cmake .. -DCMAKE_TOOLCHAIN_FILE=path_to_vcpkg_folder_in_cortex_repo/vcpkg/script
388393
make -j4
389394
```
390395

391-
5. Verify that Cortex.cpp is installed correctly by getting help information.
396+
4. Verify that Cortex.cpp is installed correctly by getting help information.
392397

393398
```sh
394-
cortex -h
399+
./cortex -h
395400
```
396401

397402
#### Devcontainer / Codespaces

0 commit comments

Comments
 (0)