pperehozhih / crunch

Automatically exported from code.google.com/p/crunch
Other
0 stars 0 forks source link

Mac OSX support #9

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
To preface this, I rarely write C++ so please review this patch carefully :) I 
tested on OSX Lion and checked the build on my CentOS 5.5 box, unfortunately I 
don't have a Windows box to test with.

To get this building on OSX a few changes needed to be made due to gcc 4.7's 
strictness and OSX's lack of support for some of the pthread functionality. 
Also to note, I was using the previously posted Makefile for building.

The highlights of this patch are:

 - Converted from unnamed semaphores to named semaphores (OSX doesn't support unnamed).
 - Converted sem_timedwait to an alert + sem_wait (sem_timedwait isn't supported on OSX).
 - Added a shim for pthread_spinlock (doesn't exist on OSX) that calls into native functions.
 - Defined uint64 as unsigned long and int64 as long to get rid of ambiguity errors on OSX.
 - Updated function calls in crn_sparse_array to work with gcc 4.7.2's new two-phase lookup rules.

Original issue reported on code.google.com by ino...@gmail.com on 3 Nov 2012 at 8:48

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks inolen! I'm currently working on the next SVN release. I've got a Mac 
Mini here with xcode, I'll give this patch a try.

Original comment by richge...@gmail.com on 25 Nov 2012 at 7:15

GoogleCodeExporter commented 8 years ago
Excellent! Is there any ETA on that release?

Original comment by ino...@gmail.com on 27 Nov 2012 at 9:13

GoogleCodeExporter commented 8 years ago
Here's my plan: I'll be porting several games to OSX at work very soon (because 
our Linux porting effort involves modifying a bunch of Posix and OpenGL related 
code that's also needed on OSX). So I'll be getting a crash course on OSX 
development. All of the changes you listed sound reasonable to me, so merging 
them shouldn't be a big deal.

Also, I want to compile crunch using LLVM, so I can kill two birds with one 
stone.

So no firm ETA, but I'll keep you posted.

Original comment by richge...@gmail.com on 28 Nov 2012 at 12:15

GoogleCodeExporter commented 8 years ago
Hey Rich,

Did you ever get a chance to work on this? 

I'm putting some finishing touches on my project that uses this 
(http://www.quakejs.com) and I'd really love to get some form of Mac support in 
so I can set up a homebrew formula for crunch. It'd be nice to offer an easy 
build on what's been the primary development platform :)

Let me know if there is anything I can do to help.

 - Anthony

Original comment by ino...@gmail.com on 7 Feb 2013 at 7:02

GoogleCodeExporter commented 8 years ago
Hi Anthony - Not yet, but I'll have a few weeks of vacation time coming up soon 
which should give me the block of time I'll need to bang this out. I'm pretty 
slammed with Linux/OSX and OpenGL related work right now. :-(

Original comment by richge...@gmail.com on 10 Feb 2013 at 10:13

GoogleCodeExporter commented 8 years ago
Hi Rich, any update on this?

Original comment by elfrank...@gmail.com on 10 Mar 2013 at 6:18

GoogleCodeExporter commented 8 years ago
+1 on this issue. About to embark on an OS X port of my toolchain that uses 
Crunch.

Original comment by w...@playcanvas.com on 9 May 2013 at 1:04

GoogleCodeExporter commented 8 years ago
Any update on this, and the brew formula?

Original comment by gunt...@gmail.com on 28 Feb 2014 at 2:52

GoogleCodeExporter commented 8 years ago
Also, malloc.h include in crnlib/crn_jpge.cpp usage is deprecated in OS X.

Original comment by gunt...@gmail.com on 28 Feb 2014 at 3:28

GoogleCodeExporter commented 8 years ago
+1, would be great to have this in!

Original comment by juj...@gmail.com on 29 Jul 2014 at 1:51

GoogleCodeExporter commented 8 years ago
Hi, any update on this?

Original comment by thibaut....@gmail.com on 25 Mar 2015 at 3:25