|
| 1 | +# Contributing to Grida Desktop on macOS |
| 2 | + |
| 3 | +Thank you for your interest in contributing to Grida Desktop! We appreciate your contributions and welcome improvements, bug fixes, and new ideas. This guide is tailored specifically for macOS users. |
| 4 | + |
| 5 | +## Table of Contents |
| 6 | +- [Prerequisites](#prerequisites) |
| 7 | +- [Setting Up Your Environment](#setting-up-your-environment) |
| 8 | +- [Development Workflow](#development-workflow) |
| 9 | + |
| 10 | +## Prerequisites |
| 11 | + |
| 12 | +Before you start, ensure you have the following installed on your Mac: |
| 13 | + |
| 14 | +- **Homebrew** |
| 15 | + [Installation instructions](https://brew.sh/) |
| 16 | + |
| 17 | +- **Node.js** |
| 18 | + We recommend using Node.js 18 or later. Install via Homebrew or [nvm](https://github.com/nvm-sh/nvm). |
| 19 | + |
| 20 | +- **pnpm** |
| 21 | + This project uses pnpm for package management. |
| 22 | + |
| 23 | +- **Mono and Wine** (only if you plan to build Windows binaries) |
| 24 | + Install these via Homebrew: |
| 25 | + ```sh |
| 26 | + brew install mono |
| 27 | + brew install --cask wine-stable |
| 28 | + |
| 29 | + |
| 30 | +## Setting Up Your Environment |
| 31 | + |
| 32 | + |
| 33 | +1. Clone the Repository |
| 34 | + |
| 35 | +```bash |
| 36 | +git clone https://github.com/gridaco/grida.git |
| 37 | +cd grida/desktop |
| 38 | +``` |
| 39 | + |
| 40 | +2. Install Dependencies |
| 41 | + |
| 42 | +```bash |
| 43 | +pnpm install |
| 44 | +``` |
| 45 | + |
| 46 | +3. Configure Environment Variables |
| 47 | + |
| 48 | +Create a .env file in the project root (if required) using the provided .env.example as a guide. |
| 49 | + |
| 50 | + |
| 51 | +## Development Workflow |
| 52 | + |
| 53 | +```bash |
| 54 | +pnpm run dev |
| 55 | +``` |
| 56 | + |
| 57 | + |
| 58 | +## Troubleshooting Mono and Wine Installation |
| 59 | + |
| 60 | +If you still see: |
| 61 | +``` |
| 62 | +Error: You must install both Mono and Wine on non-Windows |
| 63 | +``` |
| 64 | +
|
| 65 | +after installing both, try the following steps: |
| 66 | +
|
| 67 | +1. **Verify Installation** |
| 68 | + ```sh |
| 69 | + mono --version |
| 70 | + wine --version |
| 71 | + ``` |
| 72 | + |
| 73 | +You might see `“Wine Stable.app” Not Opened`. Go to System Preferences > Security & Privacy and allow the app to open. |
| 74 | + |
| 75 | +Check if you have Rosetta installed. If not, you can install it by running: |
| 76 | +```sh |
| 77 | +softwareupdate --install-rosetta |
| 78 | +``` |
| 79 | + |
| 80 | + |
| 81 | +## Linux Build on macOS using Docker |
| 82 | + |
| 83 | +If you're on macOS and want to build Linux packages for Grida Desktop, you can use Docker to simulate a Linux environment. |
| 84 | + |
| 85 | +### Prerequisites |
| 86 | + |
| 87 | +- **Docker Desktop for Mac:** |
| 88 | + Install Docker from [Docker's website](https://www.docker.com/products/docker-desktop). |
| 89 | + |
| 90 | +- **Project Dependencies:** |
| 91 | + Ensure your project uses Node.js and pnpm (or npm) as specified in the repository. |
| 92 | + |
| 93 | +### Steps to Build Linux Packages |
| 94 | + |
| 95 | +1. **Pull a Linux Docker Image:** |
| 96 | + Use an image that matches your build environment, for example, Node 18 on Debian Bullseye. |
| 97 | + ```sh |
| 98 | + docker pull node:22-bullseye |
0 commit comments