|
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 | + |
4 | 23 | ```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 |
6 | 28 | ``` |
7 | | -### Mac Build |
| 29 | + |
| 30 | +### macOS |
| 31 | + |
8 | 32 | ```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 |
10 | 37 | ``` |
11 | 38 |
|
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 |
14 | 46 |
|
| 47 | +Once Darwin is installed, run the following command from the **root of the repository**: |
15 | 48 |
|
16 | | -and then you can build the **PROJECT_NAME.lua** with: |
17 | 49 | ```bash |
18 | 50 | darwin run_blueprint --target all |
19 | 51 | ``` |
20 | | -it will generte the **PROJECT_NAME.lua** in the `release/` folder. |
21 | 52 |
|
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 | + |
24 | 63 | ```bash |
25 | 64 | darwin list |
26 | 65 | ``` |
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 | + |
32 | 69 | ```bash |
33 | 70 | 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