Giter Site home page Giter Site logo

snowyu / mtmake-osx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from belugion/mtmake-osx

0.0 2.0 0.0 20.02 MB

Build Minetest application bundle on OS X; binaries at available at:

Home Page: https://github.com/mdoege/minetest/releases

Shell 1.90% HTML 2.48% Makefile 0.17% C++ 11.13% Lua 74.58% GLSL 9.73%

mtmake-osx's Introduction

Script for automatically building Minetest for OS X from GitHub repo

Binaries made with this are available here

Quick start

Get Xcode (app store; older versions from download area at Apple Developer), XQuartz, Xcode Command Line Tools, and Homebrew (see below for details).

Start Terminal.app (or any other terminal emulator for OS X) and install the Minetest dependecies with Homebrew:

brew install cmake freetype gettext hiredis irrlicht jpeg leveldb libogg libvorbis luajit git

Then clone the mtmake-osx build scripts from GitHub and start the build process:

git clone https://github.com/mdoege/mtmake-osx
cd mtmake-osx
./make_mac.sh stable

This will compile the latest stable version of Minetest, updating the app in releases/ and creating a ZIP file with the app bundle. Finally, copy the app to /Applications/. To compile the latest development version leave "stable" away.

Get mtmake-osx from GitHub as a ZIP file

(This section only applies if you cannot clone mtmake-osx with git for some reason.)

You cannot just go to the GitHub page and right click the script and do "save as...". This just saves the html page with the script. The entire folder provided on the GitHub page is required. Download the zip file, extract it, navigate inside it with a terminal and type ./make_mac.sh. The zip file with the application can be found in the "releases" folder.

Dependencies

Install these pacakges with Homebrew ("brew install"): cmake, freetype, gettext, hiredis, irrlicht, jpeg, leveldb, libogg, libvorbis, luajit

(snappy and libpng will get installed by brew automatically too.)

You need Xcode and the Xcode Command Line Tools. You should get prompted for installation of the latter if you run the build script for the first time. Alternatively, start Xcode, go to Xcode->Preferences->Downloads and install a component named "Command Line Tools".

You will also have to install XQuartz for X11 support.

If git is not installed, you can get it via Homebrew too: "brew install git"

Note that for compatibility with older CPUs (like Core 2) it is necessary to install dependencies from bottles, because those are automatically compiled by Homebrew to work on all CPUs supported by OS X Mavericks.

Hints for playing the game

  • Use two finger tap for right click

  • Use "e" for sneak/climb down (activate in 'Settings -> Change keys')

  • If you would like to start the Minetest server from a terminal, run "/Applications/minetest.app/Contents/Resources/bin/minetest --server".

How to update dynamic libraries (rarely needed; done automatically by make_mac.sh now)

The build_libs.sh script (in releases/) will rebuild the libs folder. This means that dynamic libraries which the MT executable depends on will get copied into the bundle directory.

Normally this should only be necessary if the libraries your executable got linked to have a different version number than the ones already in the bundle. Build_libs.sh will copy the libraries from e.g. the Homebrew folder (/usr/local/Cellar/) into the bundle and change their install names, so that every library in the bundle will match the globally installed libraries on your system.

Note that build_libs.sh needs an existing MT binary in minetest-git/bin/ to scan for its dynamic library dependencies! So first you need to build MT itself successfully before you can then rebuild the libs folder.

Also, don't forget to create an updated ZIP file with update_zip.sh after running build_libs.sh if you intend to distribute the ZIP file!

Below are some explanations for manually updating libraries without the use of build_libs.sh. Normally this should not be needed but it explains what build_libs.sh does.

This command will create the libs directory and change library path names:

dylibbundler -x minetest.app/Contents/Resources/bin/minetest -b -d ./minetest.app/Contents/libs/ \
-p @executable_path/../../libs/ -cd

(Note that this only works with an unmodified minetet binary that has not had its own link s changed by e.g. the dylibbundler invocation in make_mac.sh itself.)

Check if all no libraries point to Homebrew Cellar direcory any more:

$ for x in *.dylib ; do otool -L $x|grep Cell; done

Update a library reference that was not updated by dylibbundler with:

$ install_name_tool -change /usr/local/Cellar/libvorbis/1.3.4/lib/libvorbis.0.dylib \
@executable_path/../../libs/libvorbis.0.dylib libvorbisfile.3.dylib

mtmake-osx's People

Contributors

mdoege avatar davidak avatar

Watchers

Riceball LEE avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.