Hello there. This is my first post here and I apologize for my Engrish in advance.
Well, a few days ago I managed to compile the latest stable release and to make a working bundle for intel Mac with a few modifications to the original source files. I attached a patch file for the latest stable souce code. I am not a serious programmer. So there may be inappropriate modifications. Please point them out, too. And I did not modificated GameVersion.cpp because I could not judge whether it should be or not.
I uploaded a (hopefully) working binary for you:
http://ike.intuitive-art.com/springmac/ ... .1m.tar.gz
Please note that the file may be deleted after a while as it is hosted by one of my friends and that its config file would be created in ~/Library/Preferences/springrc.
The following is exactly what I did.
1. Installed libraries: DevIL, Glew, Ogg, Vorbis, SDL, Boost, and all their dependencies. Though I did it manually so that I could use 10.4u SDK, you can do it with MacPorts easily. I used CMake to create makefiles, so I installed CMake too.
2. Fixed #include <foo.h>. For example, <AL/al.h> must be replaced with <OpenAL/al.h> on Mac.
3. Compiled SDLMain.m as a static library. Without compiler flag "-msse2", compiling files which include Cocoa framework seemed to cause an error. That's why I created the new library and compiled with the flag.
4. Created MacMessageBox function to make up for the missing link and added it to the library I created. This is to evade the error, too.
5. Modified pybind.cpp so that Python.h would not include math.h, using a dirty way.
6. Fixed DataDirLocater::LocateDataDirs() in DataDirLocater.cpp. I moved data directories out of the bundle. This is because Unitsync uses DataDirLocater.cpp and old implementation tries to find paths to data directories in the main bundle. So Unitsync will search the SpringLobby bundle for the data directories when it is loaded from SpringLobby. Thus I decided to put those apps which need unitsync and data directories in the same directory as Spring to make them recognize data directories. This should be replaced with some better method.
7. Modified ConfigHandler.cpp so that a config file would be created in ~/Library/Preferences/springrc.
8. Modified CMakeLists.txt. Excluded X11, added the library mentioned above, modified a install prefix.
With those modifications, Spring could be compiled, but I noticed some problems which may be specific to Mac.
1. Sound attenuation is too strong, sound effects are very quiet unless you bring the camera close to the source. I added "alSourcef(source, AL_ROLLOFF_FACTOR, 0.25f);" to OpenALSound.app as a stopgap measure.
2. Radeon X1600 on Tiger indicates that it can handle non-power-of-two textures, but it takes too long for them to render this kind of textures. This made Spring virtually unplayable. To solve this problem, non-power-of-two textures are never used regardless of the value of GLEW_ARB_texture_non_power_of_two in this binary.
3. One of my friends who is on Mac OS X 10.4.11 reported that this binary unexpectedly crashed while playing. Disabling LuaUI seemed to prevent this kind of crashes, but I cannot figure out the cause.
Anyway, Thanks for making such a great game!
yokosou (zip hosted by ike)