summaryrefslogtreecommitdiff
path: root/MACOS.md
blob: de11cdeeafb1c68a68bcf3c4f93e2b549586c8a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# ReiLua-Enhanced - macOS Setup

## Quick Start

### 1. Install Dependencies
```bash
brew install glfw raylib lua pkg-config
```

### 2. Build Static Libraries (One Time)
```bash
./scripts/macos/build_static_libs.sh
```

This creates `lib/macos/libraylib.a` and `lib/macos/liblua.a` for distribution builds.

### 3. Build Your Project
```bash
./scripts/build_dev.sh        # Development
./scripts/build_release.sh    # Release with embedded assets
```

### 4. Create App Bundle (macOS Distribution)
```bash
./scripts/macos/create_app_bundle.sh
```

## Build Modes

### Static Libraries (Recommended)
- Creates single executable with no external dependencies
- Required for distribution
- Run `build_static_libs.sh` once to set up

### Homebrew Libraries (Development)
- Faster builds during development
- Automatically used if static libs not found
- Requires users to have Homebrew packages installed

## Icon Support

Windows: Icon embedded via `resources.rc`
macOS: Icon requires .app bundle via `create_app_bundle.sh`

## Directory Structure

```
/your/dev/folder/
├── ReiLua-Enhanced/
├── lua/          (Lua 5.4 source)
└── raylib/       (Raylib 5.5 source)
```

Build scripts automatically find lua and raylib as sibling directories.

## Troubleshooting

**Missing static libraries:**
Run `./scripts/macos/build_static_libs.sh`

**Missing Homebrew packages:**
```bash
brew install glfw raylib lua pkg-config
```

**GLFW duplicate warnings:**
Harmless. Raylib includes its own GLFW.