The International Simutrans Forum

Development => Patches & Projects => Topic started by: leopard on March 30, 2009, 05:30:34 PM

Title: R2391 OSX build - Universal
Post by: leopard 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

(http://www.aleopardstail.com/simutrans/simutrans-preview.png)

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

Direct Download  http://www.aleopardstail.com/simutrans/sim-r2391-pak64.zip (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
Title: Re: R2391 OSX build - Universal
Post by: jamespetts 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?
Title: Re: R2391 OSX build - Universal
Post by: prissi 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.
Title: Re: R2391 OSX build - Universal
Post by: leopard 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
Title: Re: R2391 OSX build - Universal
Post by: jamespetts 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.
Title: Re: R2391 OSX build - Universal
Post by: jtoomim 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.
Title: Re: R2391 OSX build - Universal
Post by: jamespetts 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...?
Title: Re: R2391 OSX build - Universal
Post by: Matthi205 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
Title: Re: R2391 OSX build - Universal
Post by: jamespetts on July 09, 2009, 02:29:00 PM
Have you checked the nightly build site? I think that there are ppc binaries there.
Title: Re: R2391 OSX build - Universal
Post by: wernieman 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??
Title: Re: R2391 OSX build - Universal
Post by: leopard 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
Title: Re: R2391 OSX build - Universal
Post by: wernieman on July 14, 2009, 12:11:30 PM
I could Test, if it the same on my CrossCompiler ...

/usr/i686-apple-darwin9/bin/i686-apple-darwin9-lipo

Thanks ffor your Info. I would test it after my holidays (in 2-3 Month)