Author Topic: building under macos x, first patch for shared lib...  (Read 1525 times)

GeoVah

  • Guest
building under macos x, first patch for shared lib...
« on: 11 September 2010, 04:58:44 »
Hello All!!

I'm an old but occasional player for Glest under linux...
But i've got a new computer, an apple macbook pro since 2 months...
I wanted to play Glest and up to now, I only found the glest 3.2.2r1 from this WebSite : http://ciderhouse.opal.ne.jp/wp/english/glest/

So since i've some development skills and wanted to learn xcode and the macos x platform, I started to update the source code from the previous website to the latest release of glest 3.2.2... which was ok and now I'm trying to move megaglest.

I planning to have it done in 3 steps :
* update the share_lib part
* update the glest_game part
* move from the XCode project done by cider to the one generated by CMake and provides a HOW-TO compile under macos x

I've done the first step,you can find the diff against the latest svn here : http://fforjan.free.fr/macosx.diff

Please give me your feedback and what I have to do in order to have it include in the current megaglest repository.
And of course if you have any questions or not happy to this patch, I will be very happy to answer it  ;)

Regards,
GeoVah

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: building under macos x, first patch for shared lib...
« Reply #1 on: 11 September 2010, 05:15:02 »
This patch has been applied to trunk in svn.

GeoVah

  • Guest
Re: building under macos x, first patch for shared lib...
« Reply #2 on: 12 September 2010, 02:10:00 »
Just a small status...
I've not done the step 2, lot of problem of configuration of XCode stuff thus I switch to directly use the cmake wih generating the Xcode.
So i'm currently only generating the binary not the bundle, but here is :
* My successful result is :
MacBook-Pro:MegaGlest GeoVah$ ~/Dev/megaglest/data/glest_game/Debug/glest.bin --sdl-info
SDL compile-time version 1.2.11
SDL runtime version 1.2.11

* The bad result :
MacBook-Pro:MegaGlest GeoVah$ ~/Dev/megaglest/data/glest_game/Debug/glest.bin --opengl-info
[....]
******************************************************
    #2 An error ocurred and Glest will close.
Error msg = [Couldn't create font: display is 0]

Please report this bug to contact_game@glest.org
******************************************************
(remark: didn't have time to investigate this problem)

So in the good direction, I will try to clean the CMake stuff and submit a first patch  for this area before going further.

GeoVah

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: building under macos x, first patch for shared lib...
« Reply #3 on: 12 September 2010, 05:07:34 »
In general you can turn on debugging and see how far in the code things go. Edit glestuser.ini with these values:

Code: [Select]
DebugMode=true
DebugNetwork=true

Then each time it crashes check out debug.log, in some cases you have line #'s showing how far it got

GeoVah

  • Guest
Re: building under macos x, first patch for shared lib...
« Reply #4 on: 13 September 2010, 12:01:32 »
Thanks, it helps a bit...

So new status :


Some problem on the font side, the cmake has still some problem and no bundle is generated, but seems i'm going in the right direction :)
GeoVah

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: building under macos x, first patch for shared lib...
« Reply #5 on: 13 September 2010, 17:32:18 »
Excellent work!

m0ellemeister

  • Guest
Re: building under macos x, first patch for shared lib...
« Reply #6 on: 15 September 2010, 08:45:44 »
GeoVah, i appreciate your work really, because without your work i wouldn't be able to patch and build the megaglest source on PC-BSD/FreeBSD 8.1.
On FreeBSD GLOB_ONLYDIR isn't available too. I'm not a coder, so therefore you helped me out with your work.

BTW. i've got a macbook too. So if you need someone for testing, let me know.

GeoVah

  • Guest
Re: building under macos x, first patch for shared lib...
« Reply #7 on: 15 September 2010, 10:57:43 »
You're welcome !!!!
So if you want to have a test of MegaGlest under MacOSX,
you will found the bundle and the data here : http://fforjan.free.fr/MegaGlest/
Just copy the MegaGlest directory from MegaGlest.data.tgz to your Library forlder (i.e. /Users/{user}/Library)
And use the App from the dmg as usual :)

(the Upload of the data is still in progress when i'm writing this message).

ultifd

  • Airship
  • ********
  • Posts: 4,443
  • The Glest Video Guy :) The one and only. :P
    • View Profile
    • My Youtube Channel
Re: building under macos x, first patch for shared lib...
« Reply #8 on: 15 September 2010, 22:48:24 »
So if you want to have a test of MegaGlest under MacOSX,
you will found the bundle and the data here : http://fforjan.free.fr/MegaGlest/
What SVN revision is that? Or did you just make one from MegaGlest 3.3.6?
Anyways, cool. Too bad I don't have a mac...

GeoVah

  • Guest
Re: building under macos x, first patch for shared lib...
« Reply #9 on: 16 September 2010, 07:42:01 »
i used the latest SVN  version since I have to patch the source to make it working under macosx.

The goal is to have all patch under the current svn to be able to rebuild it on a different macos.

GeoVah