Skip to content

Commit e35cfa5

Browse files
authored
Add macOS build docs (#11757)
1 parent c9070e5 commit e35cfa5

File tree

1 file changed

+56
-1
lines changed

1 file changed

+56
-1
lines changed

README.md

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ For Debian/Ubuntu users:
148148
For Fedora users:
149149

150150
sudo dnf install make automake gcc gcc-c++ kernel-devel cmake libcurl-devel openal-soft-devel libvorbis-devel libXxf86vm-devel libogg-devel freetype-devel mesa-libGL-devel zlib-devel jsoncpp-devel gmp-devel sqlite-devel luajit-devel leveldb-devel ncurses-devel spatialindex-devel libzstd-devel
151-
151+
152152
For Arch users:
153153

154154
sudo pacman -S base-devel libcurl-gnutls cmake libxxf86vm libpng sqlite libogg libvorbis openal freetype2 jsoncpp gmp luajit leveldb ncurses zstd
@@ -386,6 +386,61 @@ Build the binaries as described above, but make sure you unselect `RUN_IN_PLACE`
386386
Open the generated project file with Visual Studio. Right-click **Package** and choose **Generate**.
387387
It may take some minutes to generate the installer.
388388

389+
### Compiling on MacOS
390+
391+
#### Requirements
392+
- [Homebrew](https://brew.sh/)
393+
- [Git](https://git-scm.com/downloads)
394+
395+
Install dependencies with homebrew:
396+
397+
```
398+
brew install cmake freetype gettext gmp hiredis jpeg jsoncpp leveldb libogg libpng libvorbis luajit zstd
399+
```
400+
401+
#### Download
402+
403+
Download source (this is the URL to the latest of source repository, which might not work at all times) using Git:
404+
405+
```bash
406+
git clone --depth 1 https://github.com/minetest/minetest.git
407+
cd minetest
408+
```
409+
410+
Download minetest_game (otherwise only the "Development Test" game is available) using Git:
411+
412+
```
413+
git clone --depth 1 https://github.com/minetest/minetest_game.git games/minetest_game
414+
```
415+
416+
Download Minetest's fork of Irrlicht:
417+
418+
```
419+
git clone --depth 1 https://github.com/minetest/irrlicht.git lib/irrlichtmt
420+
```
421+
422+
#### Build
423+
424+
```bash
425+
mkdir cmakebuild
426+
cd cmakebuild
427+
428+
cmake .. \
429+
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 \
430+
-DCMAKE_FIND_FRAMEWORK=LAST \
431+
-DCMAKE_INSTALL_PREFIX=../build/macos/ \
432+
-DRUN_IN_PLACE=FALSE \
433+
-DENABLE_FREETYPE=TRUE -DENABLE_GETTEXT=TRUE
434+
435+
make -j$(nproc)
436+
make install
437+
```
438+
439+
#### Run
440+
441+
```
442+
open ./build/macos/minetest.app
443+
```
389444

390445
Docker
391446
------

0 commit comments

Comments
 (0)