Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Spoon on May 02, 2015, 04:38:31 pm

Title: WoD OSX build
Post by: Spoon on May 02, 2015, 04:38:31 pm
http://www.hard-light.net/forums/index.php?topic=89479.msg1784030#msg1784030

Any coder with the know how on this available to make a OSX build for WoD?
Title: Re: WoD OSX build
Post by: Echelon9 on May 02, 2015, 10:09:23 pm
There were some OpenGL features that WoD uses, which needed to be supported on OS X. I recall Swifty and myself had addressed this in a feature branch of the code, but we can check.

This was blocking the availability of a WoD Mac build.
Title: Re: WoD OSX build
Post by: Spoon on May 03, 2015, 11:54:52 am
Okay yeah, I caught that before. But is it still an issue now?
Title: Re: WoD OSX build
Post by: Swifty on May 03, 2015, 12:51:30 pm
The branch at https://github.com/SamuelCho/Freespace-Open-Swifty/tree/wings_of_dawn should be Mac-compatible now. I don't own a Mac unfortunately and the only access I have to one is the one that my studio loaned to me which I rarely bring home. Spoon, if you want a binary, I can try and see if I can grab my work Mac to build one during the work week.
Title: Re: WoD OSX build
Post by: oohhboy on May 03, 2015, 11:29:09 pm
I can test it if you can get a binary to me. I was the one to ask after all. Running 10.9.5 if it matters.
Title: Re: WoD OSX build
Post by: Spoon on May 04, 2015, 09:39:18 pm
I have no means to test it myself.
I just want to be able to serve WoD to those poor souls stuck on a Mac platform  :p
Title: Re: WoD OSX build
Post by: chief1983 on May 08, 2015, 02:58:56 pm
Here's some builds from that branch.  Haven't tested them at all though.

FS2_Open_WoD.zip (http://swc.fs2downloads.com/builds/OSX/FS2_Open_WoD.zip)
Git hash: ee8eacf832bad6d3dd45208b5888b85d4e8bf8df
Title: Re: WoD OSX build
Post by: Spoon on May 08, 2015, 08:10:02 pm
Thanks, I hope they work. (will have to wait for someone to confirm I guess!)
Title: Re: WoD OSX build
Post by: oohhboy on May 08, 2015, 10:59:00 pm
Downloaded it now, I will get back to you guys here in a couple hours depending on how well it works.
Title: Re: WoD OSX build
Post by: oohhboy on May 08, 2015, 11:23:48 pm
Whelp. that was a short test. Crashes on launch via Wxlauncher. (Crash 1 WOD.txt)

Attempting to run it with the 2014 Media VPs results in Crash 2 WOD.txt.

Launching with no Mod results as the same as Crash 1.

[attachment deleted by nobody]
Title: Re: WoD OSX build
Post by: Echelon9 on May 09, 2015, 01:09:05 am
Hrmm, we might need to package a newer release of the SDL library with FS2Open for Mac.
Title: Re: WoD OSX build
Post by: Spoon on July 13, 2015, 09:46:02 am
I guess it's safe to say that OSX won't be supported at this point then?
Title: Re: WoD OSX build
Post by: jg18 on July 13, 2015, 09:48:58 pm
EDIT 2: Derp, I forgot to untar the Frameworks.tgz file. Retrying. Watch this space.
Title: Re: WoD OSX build
Post by: jg18 on July 14, 2015, 12:03:02 am
Both release and debug build successfully on Xcode 6.3.2 on OS X 10.10.3.

However it CTDs on startup.

Stack trace:
Code: [Select]
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.CoreGraphics        0x00007fff99943109 interpolate_table + 147
1   com.apple.CoreGraphics        0x00007fff99942fef CGSGetDisplayTransferByTable + 254
2   SDL                            0x00000001024c5c04 0x10249e000 + 162820
3   SDL                            0x00000001024b51d8 SDL_GetGammaRamp + 173
4   FS2_Open 3.7.1 (debug)        0x0000000100185e72 opengl_init_display_device() + 1906 (gropengl.cpp:1757)
5   FS2_Open 3.7.1 (debug)        0x0000000100186b9a gr_opengl_init() + 122 (gropengl.cpp:1965)
6   FS2_Open 3.7.1 (debug)        0x000000010015c37a gr_init_sub(int, int, int, int) + 1818 (2d.cpp:728)
7   FS2_Open 3.7.1 (debug)        0x000000010015bac0 gr_init(int, int, int, int) + 768 (2d.cpp:858)
8   FS2_Open 3.7.1 (debug)        0x000000010004b7c7 game_init() + 1031 (freespace.cpp:1877)
9   FS2_Open 3.7.1 (debug)        0x0000000100058add game_main(char*) + 141 (freespace.cpp:7106)
10  FS2_Open 3.7.1 (debug)        0x00000001000590a9 SDL_main + 569 (freespace.cpp:7298)
11  FS2_Open 3.7.1 (debug)        0x0000000100001a49 -[SDLMain applicationDidFinishLaunching:] + 73 (SDLMain.m:300)
12  com.apple.CoreFoundation      0x00007fff9948745c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
13  com.apple.CoreFoundation      0x00007fff99377634 _CFXNotificationPost + 3140
14  com.apple.Foundation          0x00007fff8f41e9d1 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
15  com.apple.AppKit              0x00007fff9a75db9b -[NSApplication _postDidFinishNotification] + 291
16  com.apple.AppKit              0x00007fff9a75d906 -[NSApplication _sendFinishLaunchingNotification] + 191
17  com.apple.AppKit              0x00007fff9a75aa56 -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:] + 574
18  com.apple.AppKit              0x00007fff9a75a495 -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 244
19  com.apple.Foundation          0x00007fff8f451748 -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 290
20  com.apple.Foundation          0x00007fff8f4515b9 _NSAppleEventManagerGenericHandler + 102
21  com.apple.AE                  0x00007fff9361234c aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*) + 531
22  com.apple.AE                  0x00007fff936120c9 dispatchEventAndSendReply(AEDesc const*, AEDesc*) + 31
23  com.apple.AE                  0x00007fff93611fd3 aeProcessAppleEvent + 295
24  com.apple.HIToolbox            0x00007fff8fe82c6e AEProcessAppleEvent + 56
25  com.apple.AppKit              0x00007fff9a753eb2 _DPSNextEvent + 2249
26  com.apple.AppKit              0x00007fff9a752f68 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 346
27  com.apple.AppKit              0x00007fff9a748bf3 -[NSApplication run] + 594
28  FS2_Open 3.7.1 (debug)        0x0000000100001e93 CustomApplicationMain + 371 (SDLMain.m:229)
29  FS2_Open 3.7.1 (debug)        0x0000000100001d0a main + 266 (SDLMain.m:377)
30  FS2_Open 3.7.1 (debug)        0x0000000100001794 start + 52

fs2_open.log:
Code: [Select]
Opened log '/Users/jglatt/Library/FS2_Open/data/fs2_open.log', Mon Jul 13 21:09:44 2015 ...
FreeSpace 2 Open version: 3.7.1
Passed cmdline options:
  <none>
Building file index...
Found root pack '/Applications/Wings of Dawn/WoD-Core.vp' with a checksum of 0x160027d9
Found root pack '/Applications/Wings of Dawn/WoD-Sound.vp' with a checksum of 0x87faa3a6
Found root pack '/Applications/Wings of Dawn/WoD-Visual1.vp' with a checksum of 0xf83db06a
Found root pack '/Applications/Wings of Dawn/WoD-Visual2.vp' with a checksum of 0x1bd60eab
Searching root '/Users/jglatt/Library/FS2_Open/' ... 69 files
Searching root '/Applications/Wings of Dawn/' ... 0 files
Searching root pack '/Applications/Wings of Dawn/WoD-Core.vp' ... 126 files
Searching root pack '/Applications/Wings of Dawn/WoD-Sound.vp' ... 488 files
Searching root pack '/Applications/Wings of Dawn/WoD-Visual1.vp' ... 1566 files
Searching root pack '/Applications/Wings of Dawn/WoD-Visual2.vp' ... 7843 files
Found 6 roots and 10092 files.
Requested file font01.vf found at: /Applications/Wings of Dawn/WoD-Core.vp
ERROR: Unknown Language Checksum: 589986744
Using default language settings...
Requested file strings.tbl found at: /Applications/Wings of Dawn/WoD-Core.vp
Setting language to English
Requested file strings.tbl found at: /Applications/Wings of Dawn/WoD-Core.vp
Wokka!  Error opening file (tstrings.tbl)!
TABLES: Unable to parse 'tstrings.tbl'!  Error code = 5.
Game Settings Table: Using Standard Loops For SEXP Arguments
Game Settings Table: Using standard event chaining behavior
Game Settings Table: External shaders are DISABLED
Requested file game_settings.tbl found at: /Applications/Wings of Dawn/WoD-Core.vp
Game Settings Table: Setting shield pain flash factor to -0.25
Game Settings Table: FRED - Disabling Hard Coded Message Ani Files
Game Settings Table: Beams will use Damage Factors
Requested file ships.tbl found at: /Applications/Wings of Dawn/WoD-Core.vp
Requested file weapons.tbl found at: /Applications/Wings of Dawn/WoD-Core.vp
Initializing OpenAL...
  OpenAL Vendor     : Apple Computer Inc.
  OpenAL Renderer   : Software
  OpenAL Version    : 1.1

  Found extension "AL_EXT_float32".

  Sample rate: 0 (44100)
  EFX enabled: NO
  Playback device: Built-in Output
  Capture device: Built-in Microphone
... OpenAL successfully initialized!
Failed to init speech
Initializing OpenGL graphics device at 1440x900 with 32-bit color...
  Initializing SDL...
  Requested SDL Video values = R: 8, G: 8, B: 8, depth: 24, stencil: 8, double-buffer: 1, FSAA: 0
  Actual SDL Video values    = R: 8, G: 8, B: 8, depth: 24, stencil: 8, double-buffer: 1, FSAA: 0
Title: Re: WoD OSX build
Post by: Echelon9 on July 14, 2015, 07:02:02 pm
Based on the back trace, and other similar reports around the web of issues with SDL1.2 and modern OS X, am inclined to think that crash pushes the move to SDL2 to urgent.

http://trac.wildfiregames.com/ticket/2272 (further reports in last post there).
Title: Re: WoD OSX build
Post by: jg18 on July 14, 2015, 11:29:29 pm
I tried dropping in SDL2.framework from the .dmg found at http://libsdl.org/download-2.0.php by renaming it to SDL.framework. Not surprisingly, it wouldn't compile. Terminal output attached.

Does SDL Everywhere use SDL 2.0?

[attachment deleted by nobody]
Title: Re: WoD OSX build
Post by: niffiwan on July 15, 2015, 12:11:30 am
Does SDL Everywhere use SDL 2.0?

Yes, 2.0.3 IIRC.
Title: Re: WoD OSX build
Post by: chief1983 on July 15, 2015, 11:34:59 am
Actually, the SDL2.framework in Frameworks.tgz is SDL 2.0.1, I will have a PR up shortly to upgrade that to 2.0.3 in the antipodes branch though.
Title: Re: WoD OSX build
Post by: chief1983 on July 15, 2015, 03:59:47 pm
Also, I just re-ran the builds I uploaded (which were made on my older machine, not my current one) and they ran the MediaVPs 2014 fine for me, all the way into a mission and back out, no crash.  Log (http://pastebin.com/vBgYAWG7).  Also, the WoD build did have an oddity I noticed, might be in other builds though too.  Image (https://www.dropbox.com/s/7mfc2olfh7o4r8d/Screenshot%202015-07-15%2015.53.19.png?dl=0)
Title: Re: WoD OSX build
Post by: Spoon on August 11, 2015, 01:58:13 pm
So whenever I bump this thread there seems to be like a second of activity before it dies off again...
So once again a bump.
Title: Re: WoD OSX build
Post by: chief1983 on August 13, 2015, 04:49:30 pm
Sorry, I'm not sure what's needed.  Sounds like the last time I tested I wasn't even able to generate a crash, so I'm not sure what I can do.
Title: Re: WoD OSX build
Post by: oohhboy on August 14, 2015, 12:08:28 am
There was a new build to test?
Title: Re: WoD OSX build
Post by: Echelon9 on August 14, 2015, 09:56:23 pm
So whenever I bump this thread there seems to be like a second of activity before it dies off again...
So once again a bump.
Spoon, I have a PR up on GitHub going through code review to fix one of the major remaining issues with our switch to SDL2 on OS X.
I am very keen to see us get that landed in master, and releases out, as continuing to rely on SDL1 is no longer viable with modern OS X.
Title: Re: WoD OSX build
Post by: chief1983 on August 15, 2015, 09:12:44 am
I still don't know what you guys are talking about, no builds have crashed repeatedly on my new MBP.
Title: Re: WoD OSX build
Post by: oohhboy on August 16, 2015, 02:27:04 am
Is there something I am missing here? I posted crash logs on the first page.
Title: Re: WoD OSX build
Post by: Echelon9 on August 16, 2015, 10:14:18 am
<snip>

Apologies, late at night. Mixed up the crashes I'm looking at.

The reported crash with SDL1-based middleware:

Code: [Select]
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.CoreGraphics        0x00007fff8fbbf9d0 interpolate_table + 152
1   com.apple.CoreGraphics        0x00007fff8fbbf8b3 CGSGetDisplayTransferByTable + 242
2   SDL                            0x0000000101c60c04 0x101c39000 + 162820
3   SDL                            0x0000000101c501d8 SDL_GetGammaRamp + 173
4   FS2_Open 3.7.1                0x00000001000e1e52 opengl_init_display_device() + 1234
5   FS2_Open 3.7.1                0x00000001000e2588 gr_opengl_init() + 72
6   FS2_Open 3.7.1                0x00000001000c88b5 gr_init(int, int, int, int) + 1493
7   FS2_Open 3.7.1                0x0000000100023c83 game_init() + 883
8   FS2_Open 3.7.1                0x000000010002b466 game_main(char*) + 182
9   FS2_Open 3.7.1                0x000000010002b84c SDL_main + 300
Title: Re: WoD OSX build
Post by: chief1983 on August 19, 2015, 10:12:22 am
And what build was this with?  I can make another build based on the WoD branch with the latest Xcode/SDK and see if that helps.