From 0fbc961bb8e7b9864c0982bb86b0de2e25d6f4aa Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Sun, 9 Nov 2025 06:37:45 +0530 Subject: Add macOS support and project creation tool - Add macOS static and dynamic library linking support - Add cross-platform build scripts for Windows, macOS, and Linux - Add project creation script with metadata embedding - Add macOS app bundle creation with icon support - Update CMakeLists.txt for platform detection - Fix STB rect pack duplicate symbols - Remove test images and unused files - Consolidate documentation into MACOS.md --- MACOS.md | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 MACOS.md (limited to 'MACOS.md') diff --git a/MACOS.md b/MACOS.md new file mode 100644 index 0000000..de11cde --- /dev/null +++ b/MACOS.md @@ -0,0 +1,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. -- cgit v1.2.3