Working on Mac port.
First kind of working version of Mac port.