The International Simutrans Forum

 

Author Topic: R2391 OSX build - Universal  (Read 7962 times)

0 Members and 1 Guest are viewing this topic.

Offline leopard

  • Devotees (Inactive)
  • *
  • Posts: 97
  • Life in the Urban Jungle
    • A Leopard's Tail
R2391 OSX build - Universal
« on: March 30, 2009, 05:30:34 PM »
Finally got round to recompiling and packaging a universal binary for OS X

based on R2391, and includes pak64.

also has the most recent version of my navigation/view sidebar



updated my site with a few notes, http://www.aleopardstail.com/simutrans/Simutrans%20(Developer).html

Direct Download http://www.aleopardstail.com/simutrans/sim-r2391-pak64.zip

Still a few bits to do, but this is workable, needs some nice icons for the various buttons etc.

should work fine on both intel and PPC machines, compiled with OS X 10.4 and should work fine on that and 10.5

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18502
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: R2391 OSX build - Universal
« Reply #1 on: March 30, 2009, 06:29:29 PM »
Hmm, very interesting - good to have a Mac binary of a recent version: should help to spread Simutrans to a wider community still. Tell me - would there be any chance of producing an OS X version of Simutrans-Experimental, when it is a little more mature?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9438
  • Languages: De,EN,JP
Re: R2391 OSX build - Universal
« Reply #2 on: March 30, 2009, 06:54:14 PM »
Well, I was asking for an universal binary of the stable 102 version as it fails to compile on my emulator now.

Offline leopard

  • Devotees (Inactive)
  • *
  • Posts: 97
  • Life in the Urban Jungle
    • A Leopard's Tail
Re: R2391 OSX build - Universal
« Reply #3 on: March 31, 2009, 10:29:22 AM »
there is theoretically no reason why not to a version of the experimental build. there are two ways to do it, one is the way i currently manage this, which is essentially manually patching a few files and adding a couple of new ones, then running a build script. since the build process has to be run twice (once for intel, once for PPC) then combined. this uses a slightly adjusted makefile, but could in theory be applied to the distro one. with a seperate build script to call it twice (and set a few variables)

the second would be to adapt this build process to the 'standard' simutrans build, which should work very well, but wouldn't have the extra bits I've added. its probably worth me sorting that out, since then in theory anyone with a mac can build it.

note OSX does not generally cross compile on other platforms very well, apple don't support mac development on anything other than a mac (understandable, but still daft)

I my be going off the net for a few months middle of the year so don't want to get too deep into the development process just yet (since i'd have to drop out) but I can post what i've managed so far, along with some of the logic behind it to try and make the OS X version a very simple compile for anyone else

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18502
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: R2391 OSX build - Universal
« Reply #4 on: March 31, 2009, 02:39:20 PM »
Lopard,

thank you for your feedback :-) I'm sure that we'd all be keen to have a Mac OS X version of both Simutrans-Standard and Simutrans-Experimental. Simutrans-Experimental uses Github, and there's also a Github mirror of Simutrans-Standard, so all that you'd have to do with your patches is what I do with Simutrans-Experimental: maintain the code as a fork of Simutrans-Standard using Git, and regularly merge the new features both in Standard and in Experimental into your Mac OS version with your extra features.

It's a pity about the cross-compiling: that does mean that less software is available for the Mac. It would be good if you could help with the production of builds until you do go offline; perhaps it might inspire others to get involved with Mac builds.

jtoomim

  • Guest
Re: R2391 OSX build - Universal
« Reply #5 on: June 12, 2009, 11:38:46 PM »
I compiled simutrans-experimental-4.0, and dropped the binary into leopard's app file.  You can find it here:

http://jtoomim.org/code/simexp-4.0-pak64.zip

It should be compiled to use the SDL.Framework found in the app bundle itself, but I could be wrong about that.  Try at your own risk.

The zip file has an app with a copy of the simutrans-standard binary compiled by leopard still in it.  If you want to switch it to standard, just replace sim.app/Contents/MacOS/sim with a copy of or a symlink to sim.app/Contents/MacOS/simutrans-standard.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18502
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: R2391 OSX build - Universal
« Reply #6 on: June 13, 2009, 10:44:24 AM »
Jtoomim,

that is very kind - thank you very much! I greatly appreciate that. Is there any chance of a MacOSX version of Makeobj-Experimental, too...?

Offline Matthi205

  • *
  • Posts: 107
  • Elvish Marshal of the human Wesnothian Army
Re: R2391 OSX build - Universal
« Reply #7 on: July 09, 2009, 02:03:56 PM »
Could you compile a Linux ppc binary? pleeeeeeeeeeaaaaaaaaaaaseeeeee.... :( I'll test it,since I don't like playingjust 100.0 all the time

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18502
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: R2391 OSX build - Universal
« Reply #8 on: July 09, 2009, 02:29:00 PM »
Have you checked the nightly build site? I think that there are ppc binaries there.

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: R2391 OSX build - Universal
« Reply #9 on: July 09, 2009, 03:55:38 PM »
There are MAX OSX ppc (on the nightly side)

@leopard
Do you know how to combine Intel an PPC to on Universal-Binary??

Offline leopard

  • Devotees (Inactive)
  • *
  • Posts: 97
  • Life in the Urban Jungle
    • A Leopard's Tail
Re: R2391 OSX build - Universal
« Reply #10 on: July 14, 2009, 08:08:47 AM »
very simple to combine the two into a universal build.

lipo -create sim-i386 sim-ppc -output sim

will merge the two (or more) specified binaries into a single universal one.

I wrote a 'deploy' script and modified the configuration files to support a few extra variables so a single script could build both binaries in a two pass compile process, then merge them.

the above lipo command works on the mac, no idea if its present on anything else

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: R2391 OSX build - Universal
« Reply #11 on: July 14, 2009, 12:11:30 PM »
I could Test, if it the same on my CrossCompiler ...

Code: [Select]
/usr/i686-apple-darwin9/bin/i686-apple-darwin9-lipo
Thanks ffor your Info. I would test it after my holidays (in 2-3 Month)