Minetest on a Mac

toabi
New member
 
Posts: 7
Joined: Tue Jun 14, 2011 08:02

Minetest on a Mac

by toabi » Sat Jun 18, 2011 13:31

Hi,

I recently invested some time to get minetest running on OS X.

My build setup is located there: https://github.com/toabi/minetest-mac

There's also a binary download if you don't like to build yourself.

::edit::
Removed bitbucket links because now everything I do is on github.
Last edited by toabi on Tue Jun 21, 2011 22:38, edited 1 time in total.
 

celeron55
Member
 
Posts: 430
Joined: Tue Apr 19, 2011 10:10

by celeron55 » Sat Jun 18, 2011 15:55

Thanks for finding those out - I hand-picked (sorry :P) the relevant changes for OSX from your fork: https://bitbucket.org/celeron55/minetest/changeset/69b548db0804

Could you verify that my version builds for you? I have no Macs so I can't test anything. 8-)
 

toabi
New member
 
Posts: 7
Joined: Tue Jun 14, 2011 08:02

by toabi » Sat Jun 18, 2011 16:05

Jey.

But: You put the
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
#ifdef __APPLE__
    #include "CoreFoundation/CoreFoundation.h"
#endif

from the top back into the namespace… and because those are C headers… they are totally confused in a namespace. (Syntax Errors…)

Other than that, it works well.
 

celeron55
Member
 
Posts: 430
Joined: Tue Apr 19, 2011 10:10

by celeron55 » Mon Jun 20, 2011 05:00

What kind of a build system are you using, exactly? Did you manage to use the (recently updated) CMake build scripts? I copied some fixes to them for OS X from minetest-delta a while ago, but i don't really know what they exactly fix.
 

toabi
New member
 
Posts: 7
Joined: Tue Jun 14, 2011 08:02

by toabi » Mon Jun 20, 2011 21:28

Well.

CMake can build stuff. But there are some issues:

1) The compiler doesn't like debug:98 and debug:71 with "error: cast from ‘_opaque_pthread_t*’ to ‘unsigned int’ loses precision"
Fun fact: Building with Xcode works without commenting those two out.
2) Irrlicht on OS X is weird. If you launch it from terminal, it does not receive keyboard input. Keyboard input goes straight to the terminal. I searched a bit around and the thing they say you is: You have to use a Cocoa App Template in Xcode! Well.
3) Also there are/were some 32/64 bit issues. It tried to build 64, but there's only 32bit Irrlicht on OS X…

So because Irrlicht didn't work well I tried to put everything into a Xcode Cocoa Application template. And this is now my build system. It consists of:
- the xcodeproj file
- Interface Builder definitions for the OS X menubar (minimal Cocoa Application)
- Launch script to place in the final application bundle
- A folder with Irrlicht.framework and and libjthread.a

Those files all live in a folder named "minetest-mac". One just has to drop this folder into the cloned minetest folder, open the Xcode project and press "build". It then builds you a fully functional redistributable OS X application bundle. Which is awesome.

The build process could also be started from CLI by running "xcodebuild" in the "minetest/minetest-mac" folder.

The only disadvantage of this is that everytime new files are added to the repository, I have to reference them in the Xcode project.
 

User avatar
benajamin
Member
 
Posts: 48
Joined: Sat May 14, 2011 16:14

by benajamin » Tue Jun 21, 2011 05:20

toabi wrote:2) Irrlicht on OS X is weird. If you launch it from terminal, it does not receive keyboard input. Keyboard input goes straight to the terminal.


When I run Minetest from a terminal on Gentoo Linux, I can see the cursor blinking in the Minetest GUI, but keyboard input goes to the terminal. I have to click the MInetest GUI to give it focus and then I can type into the fields. Is this similar to your problem on Mac?
 

toabi
New member
 
Posts: 7
Joined: Tue Jun 14, 2011 08:02

by toabi » Tue Jun 21, 2011 08:38

Regarding the Irrlicht focus: I did try to click into the window ;) — it's just that the window spawned by Irrlicht is not recognized as a real 'window' by OS X:
- There is no icon for it in the application switcher
- If focues, the menubar is not updated… etc.

It behaves like it's just a 2D region of some pixels with no proper interaction with the OS. As I said. Wrapping it in a default template for OS X applications makes it work :)
 

celeron55
Member
 
Posts: 430
Joined: Tue Apr 19, 2011 10:10

by celeron55 » Wed Jun 22, 2011 15:28

toabi wrote:Regarding the Irrlicht focus: I did try to click into the window ;) — it's just that the window spawned by Irrlicht is not recognized as a real 'window' by OS X:
- There is no icon for it in the application switcher
- If focues, the menubar is not updated… etc.

It behaves like it's just a 2D region of some pixels with no proper interaction with the OS. As I said. Wrapping it in a default template for OS X applications makes it work :)


Is there really no fix to this? I am sure XCode doesn't do any magic, just passes the right parameters and stuff to the compiler and linker.

I would like to have the CMake build script to work on OS X - but that is totally up to you Mac users.
 

toabi
New member
 
Posts: 7
Joined: Tue Jun 14, 2011 08:02

by toabi » Mon Jun 27, 2011 10:02

celeron55 wrote:Is there really no fix to this? I am sure XCode doesn't do any magic, just passes the right parameters and stuff to the compiler and linker.

I would like to have the CMake build script to work on OS X - but that is totally up to you Mac users.


Well. The magic is the small Cocoa GUI Menu/Window… I don't know yet if it's possible without them.

And it's certainly possible to build it on OS X but I really don't enough about CMake to do this.
 

milkshakez7z
New member
 
Posts: 8
Joined: Thu Jun 30, 2011 07:56

by milkshakez7z » Thu Jun 30, 2011 08:09

i just downloaded the windows version then ran it with wine bottler works fine for me:)
edit:wineskin


heres how i did it http://www.youtube.com/watch?v=_82z4oz1_J8

I dont know any coding but...
Last edited by milkshakez7z on Thu Jun 30, 2011 11:45, edited 1 time in total.
 


Return to Minetest Engine

Who is online

Users browsing this forum: No registered users and 24 guests

cron