The International Simutrans Forum

 

Author Topic: Mac - Universal Binary  (Read 15116 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
Mac - Universal Binary
« on: August 11, 2008, 05:58:57 PM »
Experimental

universal application bundle, includes pak 64, in fact includes the whole game, compiled for both intel and ppc apple macs.

would seriously appreciate some fellow apple types testing this for me.

can be installed as any other application, given this is the internet, and this is a download doing this from a limited account makes sense, it should work fine.

this has a very basic cocoa interface added, the menus are from the SDL-cocoa sample program, the only one thats been added is the 'command' menu which has an option to toggle the map grid.

http://www.aleopardstail.com/simutrans/sim.zip

feed back appreciated and desired

:-)

Offline leopard

  • Devotees (Inactive)
  • *
  • Posts: 97
  • Life in the Urban Jungle
    • A Leopard's Tail
Re: Mac - Universal Binary
« Reply #1 on: August 12, 2008, 07:26:37 PM »
Slightly less experimental.

based on nightly build, #1942, build with my cocoa sound system enabled for midi, but not wave audio (still having a few issues with that).

cracked an automated build process so reasonably fast to turn these around now (more or less).

also managed to get a degree of integration with the cocoa system, hence the navigation window from simutrans launch is now here. note this is a complete universal binary, should work fine on both Intel and PowerPC based machines. this application includes a version of pak64 so there is no need to download anything extra.



the zip file can be downloaded thus
http://www.aleopardstail.com/simutrans/sim.zip a 6.16MB zip file archive containing the binary.

any and all mac users, give it a whirl, it won't (or shouldn't) touch your current install I need feedback from a PowerPC user or two since I can only test under Rosetta on an intel machine.

there is currently no way to specify any command line options, but the music can be turned off once your in the game. the default window size is 640x480 so there should be no problems running this.

some changes and improvements are planned, and I hope to release a version of this every few weeks as the interface develops, using a more recent nightly build. Also plan to do this with a 100.00 stable build.

no plans as yet for a pak128 version, and in any case the download would be huge.

if you wish to edit the included pak highlight the application in finder, right click and select "show package contents", go into the "Contents" then "MacOS" directories, in here you will find your pak directory among other resources.

this version has replaced the version uploaded yesterday.

open to requests for priorities as to what needs including.

feedback either here or via email.

Offline micslu

  • *
  • Posts: 66
Re: Mac - Universal Binary
« Reply #2 on: August 13, 2008, 06:44:39 PM »
Just a word of thanks to leopard, wernieman, topchrisher, prissi and all others for Mac development.
As long time Mac devotee, I've followed the development process with interest.
Unfortunately due to circumstances I've had to give up my Macs and only have regular access to
Windows at work, where I'm running Simutrans behind the Excel files (please no ratting!).
About the only benefit of being forced Windows for me was the availability of good train stuffs like Simutrans!

I'm disappointed not being able to help with your Mac developments.
Anyway I should get back to Macs soon and will be looking forward to all your good efforts - THANKS!
micslu

Offline leopard

  • Devotees (Inactive)
  • *
  • Posts: 97
  • Life in the Urban Jungle
    • A Leopard's Tail
Re: Mac - Universal Binary
« Reply #3 on: August 13, 2008, 07:29:21 PM »
hmmm. now there is a challenge, convert simutrans to vba and run it as a macro in excel...

Offline leopard

  • Devotees (Inactive)
  • *
  • Posts: 97
  • Life in the Urban Jungle
    • A Leopard's Tail
Re: Mac - Universal Binary
« Reply #4 on: August 18, 2008, 06:42:11 PM »
http://www.aleopardstail.com/simutrans/Simutrans%20(Developer).html Update Monday 18th August 2008.

Fixed the bus error thats been bugging me* so this version, which is still based on build 1942, now has support for sound effects via Apple core audio, so you can now be driven nuts by sound effects as well as music.

there are still a range of debug messages if you start from the command line, but if you start as a conventional application from finder you won't see them.

of on my hols next week so a development freeze for a while, when I get back I'll grab the latest nightly and update my code to that.

Source for all this will be available at some point, but I need feedback from people on both intel and ppc machines to see if it works first.

have fun


* naff pun bu tdo I look bovered?


Offline villeme

  • *
  • Posts: 14
Re: Mac - Universal Binary
« Reply #5 on: August 28, 2008, 12:37:13 PM »
Hello Mac (Intel) users !

I tried to execute the version of simutrans you put on your website. But I had this error :

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread:  0

Dyld Error Message:
  Symbol not found: _objc_msgSend
  Referenced from: /Users/villeme/Downloads/sim.app/Contents/MacOS/sim
  Expected in: /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo


Is there a new library to add before playing simutrans ?


Thank you very much for your future help !!

Julien
« Last Edit: August 28, 2008, 12:45:06 PM by villeme »

Offline leopard

  • Devotees (Inactive)
  • *
  • Posts: 97
  • Life in the Urban Jungle
    • A Leopard's Tail
Re: Mac - Universal Binary
« Reply #6 on: August 31, 2008, 02:26:11 PM »
Hmmmm novel, I thought the core video framework was included in all versions of OS X, this may be related to the SDL frameworks, which are still required to be installed.

It woulds be possible to include these within the package, but it makes the package bigger. I may have a look at this though.

seriously wish running OS X within a virtual machine was easy to do on a mac so I can test for these things.

but try adding the sdl.framework stuff, downloadable via the normal links, I don't think I'm referencing anything else on my system.

what version of OS X are you using? I'm running 10.4.11, and lack the ability to test on anything newer

Offline villeme

  • *
  • Posts: 14
Re: Mac - Universal Binary
« Reply #7 on: August 31, 2008, 02:34:09 PM »
I'm under Mac OS X 10.5.3.

I installed all the sdl files required to run simutrans. But the same error occured...

I'll continue to play simutrans with VirtualBox on an emulated WIndows XP !

Offline leopard

  • Devotees (Inactive)
  • *
  • Posts: 97
  • Life in the Urban Jungle
    • A Leopard's Tail
Re: Mac - Universal Binary
« Reply #8 on: August 31, 2008, 02:37:03 PM »
hmmm..

does the normal download for the mac from the downloads page run?

in theory this should work fine on 10.5.x (its earlier versions than I have that could cause trouble)

but seriously thank you for this, I'll have to have a check around on my system and make sure I don't have this linked to odd versions of stuff

Offline villeme

  • *
  • Posts: 14
Re: Mac - Universal Binary
« Reply #9 on: August 31, 2008, 02:40:09 PM »
Which download do you talk about ?

Offline leopard

  • Devotees (Inactive)
  • *
  • Posts: 97
  • Life in the Urban Jungle
    • A Leopard's Tail
Re: Mac - Universal Binary
« Reply #10 on: August 31, 2008, 02:46:42 PM »
if you look at http://forum.simutrans.com/index.php?topic=15.0 you will see a powermac version, this will run on an intel mac, though a bit slower than usual. this is the 'official' mac version and should work, this page also has a link to the mac version of the SDL library used.

this version works fine, but needs to be started from a command line, or via a little 'launch' program I wrote a while back which can be found at http://www.aleopardstail.com/res/simutrans-launch-0.9.zip, which provides a simple way of setting command line options etc. but the command line way works just fine.

or just running within a virtual machine works (I did that for a while too)

Offline villeme

  • *
  • Posts: 14
Re: Mac - Universal Binary
« Reply #11 on: August 31, 2008, 02:58:00 PM »
Thank you !
This version works. But the version on your website (aleopardstail.com) doesn't work on Mac OS X 10.5.3


Offline leopard

  • Devotees (Inactive)
  • *
  • Posts: 97
  • Life in the Urban Jungle
    • A Leopard's Tail
Re: Mac - Universal Binary
« Reply #12 on: August 31, 2008, 03:00:38 PM »
ok thanks, I'll have to look into that this week and see exactly what versions of files are being connected to, especially the core video library

:-)

Offline leopard

  • Devotees (Inactive)
  • *
  • Posts: 97
  • Life in the Urban Jungle
    • A Leopard's Tail
Re: Mac - Universal Binary
« Reply #13 on: September 27, 2008, 12:57:30 PM »
sorry for the slow progress recently, BT (not my ISP they just provide the wire) are playing silly buggers so having trouble keeping my internet link active for more than a few seconds at a time.. has put a cramp in trying to keep up.

apparently BT are sorry for the inconvenience, they must be, the robot while I'm hold (again) said so...

MorphiusFaydal

  • Guest
Re: Mac - Universal Binary
« Reply #14 on: October 30, 2008, 01:36:08 PM »
I get the same error as villeme -
Code: [Select]
MacOS morphius$ ./sim
dyld: lazy symbol binding failed: Symbol not found: _objc_msgSend
  Referenced from: /Users/morphius/Downloads/simutrans/sim.app/Contents/MacOS/./sim
  Expected in: /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo

dyld: Symbol not found: _objc_msgSend
  Referenced from: /Users/morphius/Downloads/simutrans/sim.app/Contents/MacOS/./sim
  Expected in: /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo

Trace/BPT trap

I'm running 10.5.5 on Intel.

And I can't run the ones off the SF download page either.  I have SDL 1.2.11 and SDL Mixer 1.2.8 installed in /Library/Frameworks but I get this error:
Code: [Select]
simutrans morphius$ ./simutrans
dyld: Library not loaded: /usr/local/lib/libSDL-1.2.0.dylib
  Referenced from: /Users/morphius/Downloads/simutrans/simutrans/./simutrans
  Reason: image not found
Trace/BPT trap

Offline leopard

  • Devotees (Inactive)
  • *
  • Posts: 97
  • Life in the Urban Jungle
    • A Leopard's Tail
Re: Mac - Universal Binary
« Reply #15 on: October 30, 2008, 07:18:24 PM »
hmmmm.. I remember having all manor of problems with the SDL library not loading right at first. I ended up compiling my own copy of the SDL library, the included install script seemed to work. I'm guessing this is a compile time issue with something hard coding where that library needs to be.

I've been having fun with work recently and my internet has only just started working properly again. I've not abandoned this though.

the "core video" link I'm not sure about, this has been compiled on 10.4.11 (since thats what I have) I'm thinking a library path has changed between the two versions (10.4.x --> 10.5.x) there is obviously a way round this (probably involving finding a way not to link to core video)

the version compiled includes some audio code written by me. I'll see about removing this and removing the core audio reference and see if it will build without it.

I seriously wish apple made it easy to run more than one copy of OSX on a single mac (to allow for easy virtual machine based testing) would allow me to try this on a 'clean' install without all the gubbins I've got on mine

Offline leopard

  • Devotees (Inactive)
  • *
  • Posts: 97
  • Life in the Urban Jungle
    • A Leopard's Tail
Re: Mac - Universal Binary
« Reply #16 on: October 30, 2008, 07:45:50 PM »
recompiled and uploaded to www.aleopardstail.com/simutrans/sim.zip still build 1942 but "core video" is no longer linked, and it still compiles and works here. I would seriously appreciate test results for this one
« Last Edit: October 30, 2008, 08:08:47 PM by leopard »

Offline VS

  • Senior Plumber (Devotee)
  • Devotees (Inactive)
  • *
  • Posts: 4856
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Mac - Universal Binary
« Reply #17 on: October 30, 2008, 08:07:32 PM »
Offtopic... link is wrong, internet does not start from root ;)

Offline leopard

  • Devotees (Inactive)
  • *
  • Posts: 97
  • Life in the Urban Jungle
    • A Leopard's Tail
Re: Mac - Universal Binary
« Reply #18 on: October 30, 2008, 08:09:55 PM »
well obviously it should start from root, afterall isn't my computer the centre of the universe...???

ahem fixed.

I couldn't be bothered to retype the link so did a copy & paste from my ftp program. should work now

Offline VS

  • Senior Plumber (Devotee)
  • Devotees (Inactive)
  • *
  • Posts: 4856
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Mac - Universal Binary
« Reply #19 on: October 30, 2008, 08:31:58 PM »
Yes, the link works now! Thanks!

Offline leopard

  • Devotees (Inactive)
  • *
  • Posts: 97
  • Life in the Urban Jungle
    • A Leopard's Tail
Re: Mac - Universal Binary
« Reply #20 on: October 30, 2008, 08:34:25 PM »
this still has my attempt at the sound routines compiled in, which are still awaiting full error checking (mostly to ensure a file is actually present before it tries to load and play it)  and checking for a few NIL pointers within the objective-c. but generally it should work.

the error trapping will be added ;-)

MorphiusFaydal

  • Guest
Re: Mac - Universal Binary
« Reply #21 on: October 30, 2008, 11:26:24 PM »
I'll give it a try after I finish this Zul'Aman run. ty for recompiling.

WoW ftw. :)

Offline leopard

  • Devotees (Inactive)
  • *
  • Posts: 97
  • Life in the Urban Jungle
    • A Leopard's Tail
Re: Mac - Universal Binary
« Reply #22 on: October 30, 2008, 11:28:54 PM »
i've got a script that builds it, both intel & ppc versions then does the magic for the universal and makes the application bundle.. one step though it takes a few mins to run

MorphiusFaydal

  • Guest
Re: Mac - Universal Binary
« Reply #23 on: October 31, 2008, 09:16:15 AM »
Well, the new version works for me.  Slower than all turd when I try and do anything when It's not paused, but I dunno if that's the app or me doing something wrong on this end, or my computer.

Offline leopard

  • Devotees (Inactive)
  • *
  • Posts: 97
  • Life in the Urban Jungle
    • A Leopard's Tail
Re: Mac - Universal Binary
« Reply #24 on: October 31, 2008, 11:38:35 AM »
At least it works. Slow how? Specifically is the game screen updating very slow like two or three frames per second? Or is the game fine but slowing the rest of the machine to a crawl?

Also what spec machine? I've only got a core due MacBook pro to test on so hard to test on older machines.

There may be some more optimization I can do though. Btw does the music play and can you hear the sound effects?

MorphiusFaydal

  • Guest
Re: Mac - Universal Binary
« Reply #25 on: October 31, 2008, 06:40:46 PM »
In reverse order: Yes, I can hear sound.

And I mean the rest of the machine slows to a crawl.  Quad core. 2GB RAM. High end ATi card.

Offline leopard

  • Devotees (Inactive)
  • *
  • Posts: 97
  • Life in the Urban Jungle
    • A Leopard's Tail
Re: Mac - Universal Binary
« Reply #26 on: October 31, 2008, 07:45:14 PM »
any chance of running the process monitor? Thinking I wasn't aware simutrans would use more than one core.

I will have a look at what compile options I have setup though there is probably an optimisation flag set that needs clearing. Or one that needs setting. I'll try a version without video acceleration as well. Easy enough to host a few versions for different machines :-)

MorphiusFaydal

  • Guest
Re: Mac - Universal Binary
« Reply #27 on: October 31, 2008, 08:13:52 PM »
Yeah, I'll check out what `top` has to say.

Offline leopard

  • Devotees (Inactive)
  • *
  • Posts: 97
  • Life in the Urban Jungle
    • A Leopard's Tail
Re: Mac - Universal Binary
« Reply #28 on: October 31, 2008, 10:41:40 PM »
have a go with http://www.aleopardstail.com/simutrans/sim-no-hw.zip

re compiled with hardware acceleration removed, slow as a dog on mine but you never know.