Minetest on a Mac
Minetest on a Mac
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.
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.
Thanks for finding those out - I hand-picked (sorry :P) the relevant changes for OSX from your fork: https://bitbucket.org/celeron55/minetes ... b548db0804
Could you verify that my version builds for you? I have no Macs so I can't test anything. 8-)
Could you verify that my version builds for you? I have no Macs so I can't test anything. 8-)
Jey.
But: You put the
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.
But: You put the
Code: Select all
#ifdef __APPLE__
#include "CoreFoundation/CoreFoundation.h"
#endif
Other than that, it works well.
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.
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.
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 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.
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
- 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.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
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.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.
And it's certainly possible to build it on OS X but I really don't enough about CMake to do this.
-
- New member
- Posts: 8
- Joined: Thu Jun 30, 2011 07:56
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...
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.
Who is online
Users browsing this forum: Ahrefs [Bot] and 8 guests