Page 2 of 6
Re: Mac OS X General Release for 0.80
Posted: 24 Aug 2009, 04:02
by adso
Tobi wrote:In float3.h:36, change
to
Code: Select all
#if defined(_MSC_VER) || defined(__APPLE__)
In float3.cpp:24, change
to
Code: Select all
#if defined(_MSC_VER) || defined(__APPLE__)
I think that will get rid of all the 'float3::' undefined references.
If it does, let me know, then I'll commit this change.
MacMessageBox is currently not implemented; could comment the call out temporarily in errorhandler.cpp:50.
I've no clue about CSound::CSound(), maybe doublecheck that Sound.cpp is being linked in?
Those float changes worked, thank you.
Okay this has allowed me to nearly compile all the source code on Mac.
CSound isn't being found because I commented out the sound, because I cannot work out the error it is throwing at me (only know a handful of object based coding)
I will post the sound error I am getting, and maybe someone here can help out.
Re: Mac OS X General Release for 0.80
Posted: 24 Aug 2009, 04:10
by adso
Code: Select all
/Users/adso/Coding/Spring/spring_0.80.2/rts/System/Sound/Sound.cpp: In constructor ÔÇÿCSound::CSound()ÔÇÖ:
/Users/adso/Coding/Spring/spring_0.80.2/rts/System/Sound/Sound.cpp:53: error: expected initializer before ÔÇÿ*ÔÇÖ token
/Users/adso/Coding/Spring/spring_0.80.2/rts/System/Sound/Sound.cpp:54: error: ÔÇÿdeviceNameÔÇÖ was not declared in this scope
/Users/adso/Coding/Spring/spring_0.80.2/rts/System/Sound/Sound.cpp:83: error: invalid conversion from ÔÇÿconst char*ÔÇÖ to ÔÇÿALCubyte*ÔÇÖ
/Users/adso/Coding/Spring/spring_0.80.2/rts/System/Sound/Sound.cpp:83: error: initializing argument 2 of ÔÇÿALCboolean alcIsExtensionPresent(ALCdevice*, ALCubyte*)ÔÇÖ
/Users/adso/Coding/Spring/spring_0.80.2/rts/System/Sound/Sound.cpp:86: error: invalid conversion from ÔÇÿALCubyte*ÔÇÖ to ÔÇÿconst char*ÔÇÖ
make[2]: *** [rts/CMakeFiles/spring.dir/System/Sound/Sound.cpp.o] Error 1
make[1]: *** [rts/CMakeFiles/spring.dir/all] Error 2
make: *** [all] Error 2
Keeping in mind I have the latest OpenAL headers installed.
Edit - Seems like the OpenAL headers that ship with OSX are not compatible with Spring!
What I did was remove an OpenAL framework folders and downloaded and compiled this :
http://kcat.strangesoft.net/openal-rele ... 66.tar.bz2
Sound.CPP now compiles fine :)
Re: Mac OS X General Release for 0.80
Posted: 24 Aug 2009, 05:29
by adso
Good news!
I have compiled Spring 0.80.2 on OSX!
However i'm getting this when I go to run the application :
Code: Select all
spring
dyld: Library not loaded: libboost_regex-xgcc40-mt-1_39.dylib
Referenced from: /usr/local/bin/spring
Reason: image not found
Trace/BPT trap
:)
Re: Mac OS X General Release for 0.80
Posted: 24 Aug 2009, 06:04
by adso
springlobby compiled also
when you run the app, it doesn't allow you to focus on the program, so it's unusable...
attached is just a screenshot of it running :)
alright, I'm out for the next couple of days!
hopefully there is more to see when I return!
Re: Mac OS X General Release for 0.80
Posted: 24 Aug 2009, 10:01
by koshi
Apple decided that programs need to be made an app bundle or they won't get focus.
Re: Mac OS X General Release for 0.80
Posted: 24 Aug 2009, 15:00
by lurker
...why let it have a gui at all if you won't be able to focus it?
Re: Mac OS X General Release for 0.80
Posted: 24 Aug 2009, 19:57
by adso
hey guys, couldn't stay away at my mates place :p
remembered an easy way for commandline apps to get focus, just fakes an app bundle with a script launcher :)
i'll sort it out and test out spring lobby when I get home :D
still would like to solve the mystery of spring not working once compiled? can i assume it's not finding all the libraries it requires after being built?
cheers
adam
Re: Mac OS X General Release for 0.80
Posted: 24 Aug 2009, 23:36
by Auswaschbar
adso wrote:still would like to solve the mystery of spring not working once compiled? can i assume it's not finding all the libraries it requires after being built?
Obviously. It is even written which one...
Re: Mac OS X General Release for 0.80
Posted: 25 Aug 2009, 20:12
by yokosou
Rebasing was exactly what I wanted to do. I'm working on it. Thanks.
adso wrote:still would like to solve the mystery of spring not working once compiled? can i assume it's not finding all the libraries it requires after being built?
Yes, at least libboost_regex-xgcc40-mt-1_39.dylib was not found.
Well, dynamic libraries on Mac have a "install name", the absolute path where they are supposed to reside. When a executable is linked against dynamic libraries, the install names of the libraries are recorded in the executable and will be used to load the library. You can use "otool -L" to see install names recorded in a executable
I suppose the install name of your boost dylib was not set properly when you built boost. If so, adding the directory where boost libs are installed to the DYLD_FALLBACK_LIBRARY_PATH environmental parameter may be a workaround.
Re: Mac OS X General Release for 0.80
Posted: 26 Aug 2009, 04:50
by adso
thanks for that!
Spring is now running for me on OSX!
once I recompile springlobby so that the GUI is accessible, I should be in business!
thanks to all who have helped
[edit]
compiling springlobby from the git-source has compiled it into a neat .app file for OSx!
problem solved!
now to get spring into a .app file :) and see if I can get springlobby and spring to play nicely!
Re: Mac OS X General Release for 0.80
Posted: 26 Aug 2009, 07:48
by Belmakor
adso wrote:thanks for that!
Spring is now running for me on OSX!
once I recompile springlobby so that the GUI is accessible, I should be in business!
thanks to all who have helped
[edit]
compiling springlobby from the git-source has compiled it into a neat .app file for OSx!
problem solved!
now to get spring into a .app file :) and see if I can get springlobby and spring to play nicely!
You, sir, are awesome! Looking forward to seeing the fruits of your labour. And would be good to make sure your changes get pushed into the main tree so that future releases get Mac versions up front with no more of this silly run-around.
Re: Mac OS X General Release for 0.80
Posted: 26 Aug 2009, 11:28
by adso
funniest part is, I had less compile errors with 0.80 than I did with the previous build :)
[edit]
I just need to sort out Springlobby actually loading my libunitsync.dylib and I'm all set to try this out online!
Actually, could someone help me here? I've got libunitsync.dylib and if I try pointing springlobby to this file... it still says it can't read / load this... is there anything special it's looking for? Because in the dialog box to search where the file is... it's looking for a *.bundle extension (spring compiles the unit sync as a single .dylib file)
any help would be appreciated, because I cannot join games without unitsync...
Until then, spring by itself is hardly useable
I will start documenting all the changes I made (I can't remember there being too many to be honest) tonight and I will try and get my app bundles online asap for people to try out.
P.S - Here's a teaser screen :p
Re: Mac OS X General Release for 0.80
Posted: 26 Aug 2009, 13:46
by Auswaschbar
adso wrote:funniest part is, I had less compile errors with 0.80 than I did with the previous build :)
I added some patches from some people who tried building on OS X. Good to know it helped.
Re: Mac OS X General Release for 0.80
Posted: 26 Aug 2009, 15:35
by Belmakor
adso wrote:
Actually, could someone help me here? I've got libunitsync.dylib and if I try pointing springlobby to this file... it still says it can't read / load this... is there anything special it's looking for? Because in the dialog box to search where the file is... it's looking for a *.bundle extension (spring compiles the unit sync as a single .dylib file)
any help would be appreciated, because I cannot join games without unitsync...
Until then, spring by itself is hardly useable
I will start documenting all the changes I made (I can't remember there being too many to be honest) tonight and I will try and get my app bundles online asap for people to try out.
Looking good. Do you have a spring settings program compiled, or, how do we change the settings for Spring?
I am willing to help out if you like. I'm up for a few more hours and on my Mac Pro. I have XCode installed. If you could point me at some archives of code to build/play with let's see if we can't get this sorted asap.
Belmakor
Re: Mac OS X General Release for 0.80
Posted: 26 Aug 2009, 15:38
by koshi
springsettings will work as soon as springlobby loads unitsync, both standalone and integrated
maybe get onto #springlobby on main server / irc #springlobby @ Freenode to get this a bit more interactive?
Re: Mac OS X General Release for 0.80
Posted: 26 Aug 2009, 15:48
by Belmakor
koshi wrote:springsettings will work as soon as springlobby loads unitsync, both standalone and integrated
maybe get onto #springlobby on main server / irc #springlobby @ Freenode to get this a bit more interactive?
Right. I'm there. Wonder if adso is still awake?
Re: Mac OS X General Release for 0.80
Posted: 26 Aug 2009, 19:31
by imbaczek
much QQ for
[19:31:12] ** baczek joined the bitwa.
[19:31:12] ** adso left the bitwa( ).
anyway, a way to make gdb useful in your problem:
Re: Mac OS X General Release for 0.80
Posted: 26 Aug 2009, 19:42
by adso
I've gotten springlobby to find and utilise unit-sync...
But cannot start a game..
I'm pretty tired. So I will post more when my brain is working!
So close guys!
Re: Mac OS X General Release for 0.80
Posted: 26 Aug 2009, 20:56
by yokosou
I have a similar problem.
I tried to make a bundle and that worked when it was launched directly. But, when launched from a springlobby, only an error dialog appeared and said.
Code: Select all
Fatal Error
boost::bad_any_cast: failed conversion using boost::any_cast
After some examine, it turned out that it crashes if it is launched with "--name" or "--config" command line option. So, I think BaseCmd::GetString or BaseCmd::GetInputFile causes the crash. Maybe I did something wrong when I installed boost.
I pushed macfix baranch in git. This branch can make a bundle on Mac if float3 is fixed as Tobi said, but it has the problem above. I hope this will help adso a little
Re: Mac OS X General Release for 0.80
Posted: 27 Aug 2009, 04:06
by adso
yokosou wrote:I have a similar problem.
I tried to make a bundle and that worked when it was launched directly. But, when launched from a springlobby, only an error dialog appeared and said.
Code: Select all
Fatal Error
boost::bad_any_cast: failed conversion using boost::any_cast
After some examine, it turned out that it crashes if it is launched with "--name" or "--config" command line option. So, I think BaseCmd::GetString or BaseCmd::GetInputFile causes the crash. Maybe I did something wrong when I installed boost.
I pushed macfix baranch in git. This branch can make a bundle on Mac if float3 is fixed as Tobi said, but it has the problem above. I hope this will help adso a little
This is the exact problem I am having... I was going to look into how boost is laid out on my system and see if that's the cause of the problem...
Slowly getting there..