The International Simutrans Forum

 

Author Topic: New Macintosh release  (Read 384 times)

0 Members and 1 Guest are viewing this topic.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9730
  • Languages: De,EN,JP
New Macintosh release
« on: January 05, 2020, 07:15:03 PM »
I have tried github actions to build an MAC OS release. Lacking MAC OS, I could not test the result. Could someone with a MAC please download and test it, please?

It probably requires SDL2, frettype, and miniunpnpc. Again, no way to test.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2809
  • Languages: EN
Re: New Macintosh release
« Reply #1 on: January 05, 2020, 10:37:29 PM »
So what needs testing? Building on MacOS? Or running a pre-built on MacOS?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9730
  • Languages: De,EN,JP
Re: New Macintosh release
« Reply #2 on: January 06, 2020, 07:13:23 AM »
It is a nightly build on Mac OS using github actions. I have no idea if it actually runs on a vanilla Mac OS. Maybe it needs more static linking ...

Offline TurfIt

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 1335
Re: New Macintosh release
« Reply #3 on: January 09, 2020, 09:28:42 PM »
Doesn't work on my ancient Mavericks box - requires QTKit not AVF. i.e. Don't set AV_FOUNDATION=1 in config.default. I have nothing that can run a newer OS to try.
Code: [Select]
dyld: Symbol not found: _OBJC_CLASS_$_AVMIDIPlayer
  Referenced from: /Users/..././simutrans
  Expected in: /System/Library/Frameworks/AVFoundation.framework/Versions/A/AVFoundation
 in /Users/..././simutrans
Trace/BPT trap: 5

It looks like you've used 'homebrew' for libraries rather than native mac ones as previous releases have used (I couldn't find native libraries for freetype or miniupnpc which is why the last release for mac had those disabled. [and sidenote - I see release files for a 121.0 version on sourceforge but the forum still shows 120.4 as latest and even has an announce thread for 120.4.1 in the forum too...)

This rather increases Simutrans dependencies from a simple SDL2 framework install to an entire homebrew suite and special brew packages for sdl2, freetype, upnp...  It took >45 minutes to get all that installed - I doubt a typical mac user would bother past the first crash.

Also, the binary should be put in the bundle for friendliness of not having an extra console window open (and then get stuck open until manually closed). I'd provided both the app bundle for normal use (shows only the simutrans window), and the regular executable (also shows the console) in past releases. Actually it's the same executable, just seems macos suppresses the console when run from an app bundle. buildOSXbundle.sh is the script in trunk to do as it says, although outdated so I just did it manually.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9730
  • Languages: De,EN,JP
Re: New Macintosh release
« Reply #4 on: January 11, 2020, 03:34:14 PM »
Well, turns out the distribute.sh is not downloading SDL2 and packing for MacOS, since it uses the obsolete darwin os type ... (And the build environment at github only supports AVfoundatiohs anyway). So now I bundle with SDL2. Linking with freetype should create no issue, as freetype is with MacOS. (However, the header I need to download with brew, I hope this creates no further issues.)

The build would be at https://github.com/prissi/simutrans/releases/download/Nightly/simumac-nightly.zip

EDIT: Bundling with DMG seems more complex on macos commandline. So no recent build on the above link!
« Last Edit: January 11, 2020, 03:58:38 PM by prissi »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9730
  • Languages: De,EN,JP
Re: New Macintosh release
« Reply #5 on: January 14, 2020, 02:47:52 AM »
Could someone try again this version again https://github.com/prissi/simutrans/releases/download/Nightly/simumac-nightly.zip. It is just assuming one had installed SDL2 via DMG download.

Offline TurfIt

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 1335
Re: New Macintosh release
« Reply #6 on: January 14, 2020, 09:58:14 PM »
It's still looking for the homebrew freetype:
Code: [Select]
dyld: Library not loaded: /usr/local/opt/freetype/lib/libfreetype.6.dylib
  Referenced from: /Users/.../simutrans.app/Contents/MacOS/simutrans
  Reason: image not found
Trace/BPT trap: 5