Skip to content

Commit fe51ddc

Browse files
author
matesmoutinho
committed
att
1 parent af7dd96 commit fe51ddc

1 file changed

Lines changed: 65 additions & 18 deletions

File tree

template/docs/build.md

Lines changed: 65 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,81 @@
1-
### Building from Scratch
2-
if you want to build the project from the repo, just install [Darwin](https://github.com/OUIsolutions/Darwin) on version 0.020 with:
3-
### Linux Build
1+
# Building from Source
2+
3+
This guide explains how to build **PROJECT_NAME.lua** from the source code.
4+
If you just want to use the library, grab the pre-built release from the [Releases](#) page instead.
5+
6+
---
7+
8+
## Prerequisites
9+
10+
This project uses [Darwin](https://github.com/OUIsolutions/Darwin) as its build tool.
11+
Darwin is a lightweight build runner — you need to install it before you can build anything.
12+
13+
> **Required Darwin version:** `0.020`
14+
15+
---
16+
17+
## Step 1 — Install Darwin
18+
19+
Choose the command that matches your operating system and paste it into your terminal.
20+
21+
### Linux
22+
423
```bash
5-
curl -L https://github.com/OUIsolutions/Darwin/releases/download/REQUIRED_DARWIN_VERSION/darwin.c -o darwin.c && gcc darwin.c -o darwin.out && sudo mv darwin.out /usr/bin/darwin && rm darwin.c
24+
curl -L https://github.com/OUIsolutions/Darwin/releases/download/REQUIRED_DARWIN_VERSION/darwin.c -o darwin.c \
25+
&& gcc darwin.c -o darwin.out \
26+
&& sudo mv darwin.out /usr/bin/darwin \
27+
&& rm darwin.c
628
```
7-
### Mac Build
29+
30+
### macOS
31+
832
```bash
9-
curl -L https://github.com/OUIsolutions/Darwin/releases/download/REQUIRED_DARWIN_VERSION/darwin.c -o darwin.c && gcc darwin.c -o darwin.out && sudo mv darwin.out /usr/local/bin/darwin && rm darwin.c
33+
curl -L https://github.com/OUIsolutions/Darwin/releases/download/REQUIRED_DARWIN_VERSION/darwin.c -o darwin.c \
34+
&& gcc darwin.c -o darwin.out \
35+
&& sudo mv darwin.out /usr/local/bin/darwin \
36+
&& rm darwin.c
1037
```
1138

12-
### OTher FOormats
13-
check the [release](https://github.com/OUIsolutions/Darwin/releases/tag/0.20.0) page for other formats.
39+
### Other platforms
40+
41+
Check the [Darwin releases page](https://github.com/OUIsolutions/Darwin/releases/tag/0.20.0) for Windows binaries and other formats.
42+
43+
---
44+
45+
## Step 2 — Build the project
1446

47+
Once Darwin is installed, run the following command from the **root of the repository**:
1548

16-
and then you can build the **PROJECT_NAME.lua** with:
1749
```bash
1850
darwin run_blueprint --target all
1951
```
20-
it will generte the **PROJECT_NAME.lua** in the `release/` folder.
2152

22-
### Build
23-
List available recipes (located in `builds`):
53+
This will generate **PROJECT_NAME.lua** inside the `release/` folder.
54+
55+
---
56+
57+
## Advanced: Choosing a specific build target
58+
59+
Darwin organises builds into *recipes* (located in the `builds/` folder).
60+
61+
**List all available recipes:**
62+
2463
```bash
2564
darwin list
2665
```
27-
Build all:
28-
```bash
29-
darwin run_blueprint --target all
30-
```
31-
Build a specific recipe:
66+
67+
**Build a specific recipe** (replace `<recipe_name>` with one from the list above):
68+
3269
```bash
3370
darwin run_blueprint --target <recipe_name>
34-
```
71+
```
72+
73+
---
74+
75+
## Quick reference
76+
77+
| Command | What it does |
78+
|---|---|
79+
| `darwin list` | Show all available build recipes |
80+
| `darwin run_blueprint --target all` | Build everything (outputs to `release/`) |
81+
| `darwin run_blueprint --target <recipe>` | Build a single specific recipe |

0 commit comments

Comments
 (0)