2023-04-25 22:02:02 +02:00
|
|
|
# Compiling on MacOS
|
|
|
|
|
|
|
|
## Requirements
|
|
|
|
|
|
|
|
- [Homebrew](https://brew.sh/)
|
|
|
|
- [Git](https://git-scm.com/downloads)
|
|
|
|
|
|
|
|
Install dependencies with homebrew:
|
|
|
|
|
|
|
|
```
|
2023-06-24 20:38:11 +02:00
|
|
|
brew install cmake freetype gettext gmp hiredis jpeg jsoncpp leveldb libogg libpng libvorbis luajit zstd gettext
|
2023-04-25 22:02:02 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
## Download
|
|
|
|
|
|
|
|
Download source (this is the URL to the latest of source repository, which might not work at all times) using Git:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
git clone --depth 1 https://github.com/minetest/minetest.git
|
|
|
|
cd minetest
|
|
|
|
```
|
|
|
|
|
|
|
|
Download Minetest's fork of Irrlicht:
|
|
|
|
|
2023-12-08 21:11:54 +01:00
|
|
|
```bash
|
|
|
|
git clone --depth 1 --branch "$(cat misc/irrlichtmt_tag.txt)" https://github.com/minetest/irrlicht.git lib/irrlichtmt
|
2023-04-25 22:02:02 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
## Build
|
|
|
|
|
|
|
|
```bash
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
|
|
|
|
cmake .. \
|
|
|
|
-DCMAKE_FIND_FRAMEWORK=LAST \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=../build/macos/ \
|
|
|
|
-DRUN_IN_PLACE=FALSE -DENABLE_GETTEXT=TRUE
|
|
|
|
|
|
|
|
make -j$(sysctl -n hw.logicalcpu)
|
|
|
|
make install
|
2023-12-27 11:44:54 +01:00
|
|
|
|
|
|
|
# M1 Macs w/ MacOS >= BigSur
|
|
|
|
codesign --force --deep -s - macos/minetest.app
|
2023-04-25 22:02:02 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
## Run
|
|
|
|
|
|
|
|
```
|
|
|
|
open ./build/macos/minetest.app
|
|
|
|
```
|