Results 1 to 20 of 32

Thread: ClanLib 2 OS X Snow Leopard (Macintosh)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Serf
    Join Date
    Apr 2010
    Posts
    1

    Default ClanLib 2 OS X Snow Leopard (Macintosh)

    Hi all,
    Anyone know what the state is of ClanLib on the Macintosh? I see that SDL 1.3 is up to date for the Mac side of things... What needs to be done with ClanLib? I take it there is no active maintainer?

  2. #2
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    As far as I know, no developers are working on the mac.

    See - http://www.rtsoft.com/forums/showthread.php?p=9783

  3. #3
    Squire Chin Billy's Avatar
    Join Date
    Jul 2010
    Location
    UK
    Posts
    10

    Default Working on Mac port

    Hi. I'm trying to do a Mac port of CL 2.2.0 I'm not a ninja Mac programmer (lots of other experience, but little Mac ), so if you have any solid Mac skills and could help getting ClanLib using Cocoa then perhaps reply to this thread and perhaps I can use your advice or you can send patches.

    So far I've got a few of the frameworks compiling and linking and am starting to get one of the tests, Display 2D, working. All source is in the Subversion repo at the moment.

    There are some starter notes here: http://chinbilly.blogspot.com/2010/0...c-osx-106.html

    The SourceForge project is here: https://sourceforge.net/projects/gameres/

    SVN repo is here: http://gameres.svn.sourceforge.net/v.../ClanLib22osx/

    I was using Allegro (4.4), which does use Cocoa, but is missing loads of features (GUI, fonts, etc) that ClanLib has. I don't have an infinite amount of spare time so be patient! One idea is to make CL use the internals of Allegro to implement the Mac version. I don't see this as so different from using SDL, which I think the previous working version of CL did (0.8?). But SDL now has an LGPL licence so that doesn't play so well with more liberal licenses in CL and Allegro.

  4. #4
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    Awesome

    You can also use the ClanLib 1.0 OS X source code as reference. It "should" contain most of the functions required. (as far as I know)

    You probably have discovered, the OS X source in the ClanLib 2.2 release has not been updated for over 4 years, and will be totally broken.

    ClanLib 0.8 (1.0) does not require SDL.
    Last edited by rombust; 08-03-2010 at 06:53 AM. Reason: spelling mistake

  5. #5
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,389

    Default

    Good to hear someone is brave enough to tackle it. Keep us posted!
    Seth A. Robinson
    Robinson Technologies

  6. #6
    Peasant
    Join Date
    May 2009
    Posts
    5

    Default A few thoughts

    Hi,

    i appreciate your work !

    I was working on porting some stuff over to OS X last year, building the required libs as frameworks (libxml2, pcre etc.). Additionally i was discussing a port with Magnus. What has to be rewritten, changed and so on, as the old broken stuff is based on AGL.
    So basically it has to be re-implemented to NSOpenGL and CGL.
    Well, it depends on how much you want to rely on Core. But i guess you just want to do a OS X Rendertarget.
    Regarding the Target, rewriting the AGL stuff would do, no?

    I was reading your blogpost. It seems you are not going for frameworks? You are just compiling the libs the UNIX way (standard locations/structures like /usr/local etc. regarding the libs and includes).
    On Mac i would definitely go for the frameworks, which is better for making user-installable software packages. The Fink or MacOSPorts way was not intended for the Mac

    I was using Allegro (4.4), which does use Cocoa, but is missing loads of features (GUI, fonts, etc) that ClanLib has. I don't have an infinite amount of spare time so be patient! One idea is to make CL use the internals of Allegro to implement the Mac version. I don't see this as so different from using SDL, which I think the previous working version of CL did (0.8?). But SDL now has an LGPL licence so that doesn't play so well with more liberal licenses in CL and Allegro.
    Do you think it's a good idea to bring in a 3rd party "game/graphics" lib (allegro) as a base of another "game/graphics" lib (clanlib)?
    If Allegro is braking some stuff, clanlib also does. You have to deal with bugs in an additional library.

    If SDL and their LGPL-License is a problem for you, you can still try SFML.
    SFML is C++, may be even faster, more convenient and uses the zlib/png License.

    Allegro is basically a 2D Library (Quartz is for 2D), but clanlib is also utilizing 3D, so you also have to rely on AllegroGL. OpenGL is only fully supported with Allegro5.

    Although this "Porting Games to Mac OS X" Guide from GDC is from 2001, it is worth a read
    http://www.omnigroup.com/ftp/pub/sof...rtingToOSX.pdf

    Nevertheless, hang on to it
    Cheers.

  7. #7
    Squire Chin Billy's Avatar
    Join Date
    Jul 2010
    Location
    UK
    Posts
    10

    Smile

    Quote Originally Posted by iQD View Post
    i appreciate your work !
    Thanks, and thanks for the GDC link, that looks very useful.

    as the old broken stuff is based on AGL. So basically it has to be re-implemented to NSOpenGL and CGL.
    As I understand it yes, I believe AGL is a Carbon API and NS and CGL are Cocoa. CGL is the underlying common API, but I think you have to be careful about mixing the two together, i.e. you either choose NS or CGL. As a reference I found Allegro and Irrlicht. Allegro seems to use NS and Irrlicht seems to use CGL. I was thinking of using NS.

    I was reading your blogpost. It seems you are not going for frameworks? You are just compiling the libs the UNIX way (standard locations/structures like /usr/local etc. regarding the libs and includes).
    This is mainly because I'm not sure how to make them. It is easy to unzip the required libraries, build and install them (to /usr/local). Is there some sort of tool for automatically creating frameworks?

    On Mac i would definitely go for the frameworks, which is better for making user-installable software packages. The Fink or MacOSPorts way was not intended for the Mac
    I agree. I don't want a competing build environment on my Mac, but /usr/local isn't Fink, or MacPorts, it is native Mac, just not frameworks. I do not have Fink or MacPorts installed. I was thinking that the frameworks would be local anyway (like I think they were in Clanlib 0.8), so I don't see much difference if I provide pre-compiled Mac static libs anyway. ?

    Do you think it's a good idea to bring in a 3rd party "game/graphics" lib (allegro) as a base of another "game/graphics" lib (clanlib)?
    Mmmm that was an idea I was toying with, but I think it will create problems, and ClanLib is a nicely engineered library, so it would be good to keep it that way, not a hacked up hybrid. I was thinking initially I could hack in an Allegro framework that CL uses and if that was successful then pull out that required functionality and put it in CL. I believe a previous version of Clanlib incorporated SDL, so it has been done before, but I think Allegro is probably too archaic to include.

    If SDL and their LGPL-License is a problem for you, you can still try SFML.
    SFML is C++, may be even faster, more convenient and uses the zlib/png License.
    Thanks for that. I did not know that library. I will take a look.

    Allegro is basically a 2D Library (Quartz is for 2D), but clanlib is also utilizing 3D, so you also have to rely on AllegroGL. OpenGL is only fully supported with Allegro5.
    AllegroGL has been part of Allegro since something like 4.3/4.4, but it is a plug-in. I liked Allegro because it was one of the few cross platform Mac libraries that used Cocoa and seemed quite simple. I put notes on my blog.

    I'll keep plodding on with the port. If you read the check-in comments you see the progress. It might be a couple of weeks before I have something working. It is useful to have all this reference code to use. Cheers!

  8. #8
    Peasant
    Join Date
    May 2009
    Posts
    5

    Default

    Quote Originally Posted by Chin Billy View Post
    As I understand it yes, I believe AGL is a Carbon API and NS and CGL are Cocoa. CGL is the underlying common API, but I think you have to be careful about mixing the two together, i.e. you either choose NS or CGL. As a reference I found Allegro and Irrlicht. Allegro seems to use NS and Irrlicht seems to use CGL. I was thinking of using NS.
    Well, CGL is the low level API.
    AGL (Carbon) and NS (Cocoa) are the high level classes.
    Irrlicht just takes advantage of the faster low level API instead of using the high level NS classes. Additionally Irrlicht is more targeted to a full-screen application, rather than a windowed one.
    Basically NS is for drawing into a view (every NS context has a CGL context) and CGL is for creating a full-screen content.

    You may want to take a look here:
    http://developer.apple.com/mac/libra..._concepts.html
    http://developer.apple.com/mac/libra...l_drawing.html

    This is mainly because I'm not sure how to make them. It is easy to unzip the required libraries, build and install them (to /usr/local). Is there some sort of tool for automatically creating frameworks?
    Well, the compiler and the dynamic linker is searching for the frameworks in specific areas. So it's more convenient if you are working with developer tools that came with a Mac (f.e. XCode), manage different versions or targets.
    It's just copying and pasting the framework into the specific location (although you can create an installer). No unzipping or building fuzz

    Unfortunately there is no tool for creating frameworks. You have to use XCode and the framework templates for carbon/cocoa instead.
    http://developer.apple.com/mac/libra...02258-BAJDHDAF

    I agree. I don't want a competing build environment on my Mac, but /usr/local isn't Fink, or MacPorts, it is native Mac, just not frameworks. I do not have Fink or MacPorts installed. I was thinking that the frameworks would be local anyway (like I think they were in Clanlib 0.8), so I don't see much difference if I provide pre-compiled Mac static libs anyway. ?
    You're right with /usr/local etc., but as Mac OS X makes extensive use of frameworks to distribute shared code and resource, it think it's cleaner to follow that system.
    The difference between pre-compiled Mac static libs and frameworks is to have the resources, libs, headers etc. in one place, the framework bundle. It wraps the library's required files and metadata.

    A framework is a hierarchical directory that encapsulates shared resources, such as a dynamic shared library, nib files, image files, localized strings, header files, and reference documentation in a single package.
    I was thinking initially I could hack in an Allegro framework that CL uses and if that was successful then pull out that required functionality and put it in CL. I believe a previous version of Clanlib incorporated SDL, so it has been done before, but I think Allegro is probably too archaic to include.
    It may be a possibility, yes. I never used Allegro, but from what i can read in the docs, it's lacking a lot of the CL functionalities. So you have to adapt many features anyway.
    There was a SDL target in CL 1.x but it was dropped with CL 2.x . CL has it's own software renderer called ClanGDI.

    AllegroGL has been part of Allegro since something like 4.3/4.4, but it is a plug-in. I liked Allegro because it was one of the few cross platform Mac libraries that used Cocoa and seemed quite simple. I put notes on my blog.
    Yeah. OS X seems to be the least relevant platform with all those libraries out there.
    The Mac port of SFML came to a hold last year. They are more concentrating on SFML 2.0 and the Windows/Linux platforms than Mac.

    I'll keep plodding on with the port. If you read the check-in comments you see the progress. It might be a couple of weeks before I have something working. It is useful to have all this reference code to use. Cheers!
    Any progress is more than i can excpect

Similar Threads

  1. OS X Leopard build problem
    By yogi183 in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 12-19-2007, 08:21 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •