Any chance to get b43 released for OS X?

Everything about ToME 4.x.x. No spoilers, please

Moderator: Moderator

Message
Author
Fhtagn
Halfling
Posts: 114
Joined: Sun Dec 02, 2012 9:20 pm

Any chance to get b43 released for OS X?

#1 Post by Fhtagn »

I'm sorry if this is bothersome or anything, but I'd really like to know if there's any chance of seeing b43 released for OS X in the near future.
It's a bit frustrating to check for it every day while still being stuck with b41 (due to b42 not working properly on OS X). I'm really getting into the game, and I love it, but at the same time it sort of sucks to have everybody talking about golden chests and solipsists and this and that and not being able to profit from all those nice and interesting changes.
Again, sorry to be bothering you.

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Any chance to get b43 released for OS X?

#2 Post by darkgod »

You're not bothering :)
Quicksilver who does the OSX port is very very very busy with IRL right now :/
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Fhtagn
Halfling
Posts: 114
Joined: Sun Dec 02, 2012 9:20 pm

Re: Any chance to get b43 released for OS X?

#3 Post by Fhtagn »

Thank you :) Then I'll just be a little bit more patient and keep waiting for it.

lenocinor
Cornac
Posts: 33
Joined: Thu Jan 26, 2012 5:23 am

Re: Any chance to get b43 released for OS X?

#4 Post by lenocinor »

I've been impatient for this myself, so I've spent most of the past two days trying to get the Mac port working for b43 under Lion. As recommended by tiger_eye over here (the tips there were invaluable, thanks!) I've been trying to compile it using Clang via the command line.

After a lot of ugly hacks I've just managed to get the entire game to compile and link but the application just brings up a blank screen when it starts. :( At this point I'm out of ideas. Any devs wanna help me try and debug this?

For the record, there are a few things that need to be changed to compile under Lion:

1. Luajit got an update to fix a Lion problem shortly after the version that is currently in source. Details here and here. There are two ways to fix this: the quick and dirty way (applying the changes in that changelog directly, which is what I did), or update to a newer version of luajit that incorporates the fix.

2. Clang, the standard C compiler on OS X now, doesn't like functions that return without a value, and throws errors if you try. Accordingly I had to add -Wno-return-type to the buildoptions in the macosx section of premake4.lua. (As a bonus, Clang ignores the other two build options, pagezero_size and image_base, that were already present in that section. I believe those two flags were in there because of the recommendation on the luajit install page, so I hope that's not what's screwing up my build.)

3. For whatever reason, I had to add "#include <sys/types.h>" to bspatch.c . It would throw a fit about u_char if I didn't. Works fine if compiled on my box with standard gcc, though, so I'm chalking this up to more Clang weirdness.

4. I'm less sure about this change, but I had to link in Ogg, Vorbis, and libpng libs in the macosx section of te4core.lua . Not sure why the mac port didn't need this before, though, so maybe I'm doing something stupid here.

So close to getting this working! Any help would be appreciated.

EDIT: Oh, and I followed all the steps for the new b43 compilation instructions on the wiki, by the way. Also very useful info there. :)
Last edited by lenocinor on Mon Dec 31, 2012 7:56 am, edited 2 times in total.

kazak
Thalore
Posts: 174
Joined: Fri Mar 04, 2005 8:04 pm
Location: colorado

Re: Any chance to get b43 released for OS X?

#5 Post by kazak »

One request though (for Quicksilver or whoever ends up making the mac port)...

When the official osx version comes out, please please please make it backwards compatible to at least Snow Leopard. I spent hours getting the beta releases to run on Leopard because the official releases would only work on Snow Leopard. At some beta version, I just couldn't figure it out anymore. So, solely so I could play Tome, my girlfriend ordered the Snow Leopard upgrade from Amazon. Unfortunately, the upgrade installation crashed and erased my hard drive, leaving me without a home computer for weeks until I was able to take the computer in to an Apple store (I was living in Puerto Rico then, which doesn't have any apple repair places, so I had to wait until I was in the States visiting family).

I eventually got Snow Leopard running, and Tome running also, and now every time a new release comes out I get all panicky that it's only going to run on Lion (or mountain lion, whatever the latest release is called) now.

lenocinor
Cornac
Posts: 33
Joined: Thu Jan 26, 2012 5:23 am

Re: Any chance to get b43 released for OS X?

#6 Post by lenocinor »

For the record, I got b43 working on my machine using Clang, but it doesn't seem to run on older versions of OS X (as kazak feared, heh). I think to make it truly backwards-compatible I'm going to need to compile to an old SDK using XCode. So now I get to try and get that working instead. :) Will report back if/when I get that working; I'm pretty new to Mac compiling so this is all a big learning process for me.
Last edited by lenocinor on Mon Dec 31, 2012 7:56 am, edited 1 time in total.

kazak
Thalore
Posts: 174
Joined: Fri Mar 04, 2005 8:04 pm
Location: colorado

Re: Any chance to get b43 released for OS X?

#7 Post by kazak »

Well if you want to give it a shot... I think you make it backwards compatible by just changing the Deployment Target. I posted about that here (http://forums.te4.org/viewtopic.php?f=3 ... de#p117706) because I thought I'd try and do the same thing, I just couldn't keep figuring out how to get a working compile in later betas. Awesome if you manage it, though!

lenocinor
Cornac
Posts: 33
Joined: Thu Jan 26, 2012 5:23 am

Re: Any chance to get b43 released for OS X?

#8 Post by lenocinor »

Thanks for the info, kazak. Won't have much time to figure this out till after Christmas, though, so you probably won't see it till at least then if it happens.

Patchumz
Posts: 1
Joined: Thu Dec 20, 2012 8:27 am
Location: Wonderland

Re: Any chance to get b43 released for OS X?

#9 Post by Patchumz »

Think we'll at least get v1.0 when it comes out? Or do you think he'll be too busy for that as well? (obviously we'll get it eventually, but I mean when it launches)

apexio
Posts: 2
Joined: Fri Dec 21, 2012 11:58 pm

Re: Any chance to get b43 released for OS X?

#10 Post by apexio »

lenocinor wrote: 4. I'm less sure about this change, but I had to link in Ogg, Vorbis, and libpng libs in the macosx section of te4core.lua . Not sure why the mac port didn't need this before, though, so maybe I'm doing something stupid here.
I'm at the same place... Can you post the changes you made to this file?

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Any chance to get b43 released for OS X?

#11 Post by yufra »

lenocinor wrote:For the record, I got b43 working on my machine using Clang gcc, but it doesn't seem to run on older versions of OS X (as kazak feared, heh). I think to make it truly backwards-compatible I'm going to need to compile to an old SDK using XCode. So now I get to try and get that working instead. :) Will report back if/when I get that working; I'm pretty new to Mac compiling so this is all a big learning process for me.
Mind sharing what you have done thus far? I also was able to get the application to compile, but was greeted with the blank white screen. I have done a bit of GDB and print statement debugging and the results are just head-scratching. Cheers!
<DarkGod> lets say it's intended

apexio
Posts: 2
Joined: Fri Dec 21, 2012 11:58 pm

Re: Any chance to get b43 released for OS X?

#12 Post by apexio »

I've fixed about 30 errors but am stuck when linking the program:

Code: Select all

Linking TEngine
Undefined symbols for architecture x86_64:
  "_ov_clear", referenced from:
      _soundCollectLua in music.o
      _staticLoader in music.o
  "_ov_info", referenced from:
      _streamingLoader in music.o
      _staticLoader in music.o
  "_ov_open_callbacks", referenced from:
      _loadsoundLua in music.o
  "_ov_pcm_total", referenced from:
      _staticLoader in music.o
  "_ov_raw_seek", referenced from:
      _soundPlayLua in music.o
  "_ov_raw_seek_lap", referenced from:
      _readSoundData in music.o
  "_ov_read", referenced from:
      _readSoundData in music.o
  "_ov_streams", referenced from:
      _loadsoundLua in music.o
  "_png_create_info_struct", referenced from:
      _sdl_get_png_screenshot in core_lua.o
  "_png_create_write_struct", referenced from:
      _sdl_get_png_screenshot in core_lua.o
  "_png_destroy_write_struct", referenced from:
      _sdl_get_png_screenshot in core_lua.o
  "_png_get_io_ptr", referenced from:
      _png_write_data_fn in core_lua.o
  "_png_set_IHDR", referenced from:
      _sdl_get_png_screenshot in core_lua.o
  "_png_set_longjmp_fn", referenced from:
      _sdl_get_png_screenshot in core_lua.o
  "_png_set_rows", referenced from:
      _sdl_get_png_screenshot in core_lua.o
  "_png_set_write_fn", referenced from:
      _sdl_get_png_screenshot in core_lua.o
  "_png_write_png", referenced from:
      _sdl_get_png_screenshot in core_lua.o
  "_tengine_main", referenced from:
      -[SDLMain applicationDidFinishLaunching:] in SDLMain.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [t-engine.app/Contents/MacOS/t-engine] Error 1
make: *** [TEngine] Error 2
It seems like either libogg or libvorbis and libpng aren't getting the 64 bit code in place... I've tried about 20 different thing but it never changes this error.

lenocinor
Cornac
Posts: 33
Joined: Thu Jan 26, 2012 5:23 am

Re: Any chance to get b43 released for OS X?

#13 Post by lenocinor »

yufra wrote: Mind sharing what you have done thus far? I also was able to get the application to compile, but was greeted with the blank white screen. I have done a bit of GDB and print statement debugging and the results are just head-scratching. Cheers!
You're doing well if you've made it to this point. Just take the old T-Engine.app from a b42 release and replace everything in it with stuff from your compile. Make sure everything's in the same places as it was in the old app, of course.

EDIT: If you have any issues getting your library dependencies to work inside the app, otool and MacDylibBundler ( http://macdylibbundler.sourceforge.net/ ) may be useful to you.
apexio wrote:I've fixed about 30 errors but am stuck when linking the program:

<snip>

It seems like either libogg or libvorbis and libpng aren't getting the 64 bit code in place... I've tried about 20 different thing but it never changes this error.
Ah yes, this nasty bit. If I remember correctly, you can fix it by linking "vorbisfile" instead, like the other two ports, in te4core.lua:

Code: Select all

links { "SDL2", "SDL2_image", "SDL2_ttf", "vorbisfile", "png15" }
Make sure you link the PNG library here too, as I did.

Starting tomorrow I'll start looking into getting the XCode project working again so hopefully no one else has to deal with this nonsense, heh.

lenocinor
Cornac
Posts: 33
Joined: Thu Jan 26, 2012 5:23 am

Re: Any chance to get b43 released for OS X?

#14 Post by lenocinor »

Ok, after encountering some issues and fixing them, I've gotten the XCode project to compile and link with RC4. But an odd thing happens when I try to run it:

Code: Select all

[CPU] Detected 4 CPUs
OpenAL device available: AirPlay (default AirPlay)
Available video driver: cocoa
Available video driver: x11
Available video driver: dummy
Booting T-Engine from: /Users/USERNAME/Library/Developer/Xcode/DerivedData/T-Engine-culakqvjunpzjbauxqfygqkyncff/Build/Products/Release/T-Engine.app/Contents/Resources
SelfExe gave us app directory of:	/Users/USERNAME/Library/Developer/Xcode/DerivedData/T-Engine-culakqvjunpzjbauxqfygqkyncff/Build/Products/Release/T-Engine.app/Contents//Resources/
LuaVM:	Lua 5.1
Creating particles thread 0
Creating particles thread 1
LuaVM:	Lua 5.1
Creating particles thread 2
[DO RESIZE] Requested: 800x600 (0)
LuaVM:	Lua 5.1
LuaVM:	Lua 5.1
[DO RESIZE] Got: 800x600 (0)
OpenGL max texture size: 8192
OpenGL max texture size: 8192
Running lua loader code...
Reboot using	te4	LATEST	boot	player	false
[ENGINE LOADER] found engines	__byname={} 
[ENGINE LOADER] looked in:
	/Users/USERNAME///Library/Application Support/T-Engine//4.0
	/Users/USERNAME/Library/Developer/Xcode/DerivedData/T-Engine-culakqvjunpzjbauxqfygqkyncff/Build/Products/Release/T-Engine.app/Contents/Resources
	/Users/USERNAME/Library/Developer/Xcode/DerivedData/T-Engine-culakqvjunpzjbauxqfygqkyncff/Build/Products/Release/T-Engine.app/Contents//Resources//game/thirdparty
	/Users/USERNAME/Library/Developer/Xcode/DerivedData/T-Engine-culakqvjunpzjbauxqfygqkyncff/Build/Products/Release/T-Engine.app/Contents//Resources//game
[ENGINE LOADER] no engines with id	te4
logout

[Process completed]
Presumably this is because "game/engines/cores" is empty, and "game/engines" only has a "default" folder, and not "te4-0.9.42.teae" like in the .app I built from the command line that works on my machine currently. (Oddly, the command-line-built version has no "default" folder, either.)

Any ideas why the engine might not be there, guys? Kinda stumped on this at the moment.

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Any chance to get b43 released for OS X?

#15 Post by darkgod »

Please can you come on IRC as soon as possible? the end is near I htink but some realtime debug would be faster )
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply