Mac Binary Release
Moderator: Moderators
-
- Posts: 32
- Joined: 16 Aug 2006, 19:25
Re: Mac Binary Release
This is awesome. Keep up the good work, I've been waiting for a mac release for a while now.
-
- Posts: 34
- Joined: 29 May 2008, 21:06
Re: Mac Binary Release
When I launch Spring, I am able to move through the menus and select the mod/map/script i want to use, but it crashes immediately afterward saying invalid map file. The exception was being thrown on line 28 of SmfMapFile.cpp so I added a printf to tell me what the values of header that were being checked are. At first I was getting a bunch of wierd numbers, but I realized that the byte swapping was probably not working for Mac. I have since tried a few solutions for that, but all of them have only given me 0 for the map header values.
Streflop is one of the easily fixable patches. Since streflop_cond.h conditionally includes either streflop.h or cmath (math.h needs to be #included also), there is no need to use streflop:: when using math functions. Also, needs to be replaced with in the lua files (ltable.cpp, lvm.cpp, lmathlib.cpp, luaconf.h, and lapi.cpp) in order to be consistent with the rest of the project.
Is someone willing to apply those changes? My code is currently too dirty to try and make a streflop patch.
Edit: Pwnedbyryan: Thanks. What kind of Mac do you own/use?
Streflop is one of the easily fixable patches. Since streflop_cond.h conditionally includes either streflop.h or cmath (math.h needs to be #included also), there is no need to use streflop:: when using math functions. Also,
Code: Select all
#include "streflop_cond.h"
Code: Select all
#include "lib/streflop/streflop_cond.h"
Is someone willing to apply those changes? My code is currently too dirty to try and make a streflop patch.
Edit: Pwnedbyryan: Thanks. What kind of Mac do you own/use?
Re: Mac Binary Release
make a clean git branch and push it to your fork on github, that's the easiest way to get patches into the engine.
-
- Posts: 34
- Joined: 29 May 2008, 21:06
Re: Mac Binary Release
imbaczek: I am very new to git and github, can you give me a better description of what do do?
Re: Mac Binary Release
http://www.jaisenmathai.com/blog/2008/0 ... b-and-osx/ - half of this
http://b.lesseverything.com/2008/3/25/g ... and-github - and a half of this
http://b.lesseverything.com/2008/3/25/g ... and-github - and a half of this
-
- Posts: 34
- Joined: 29 May 2008, 21:06
Re: Mac Binary Release
Thank you. I have already pushed a few changes, and I will continue pushing them. My fork is here: http://github.com/revcompgeek/spring/tree/master
Re: Mac Binary Release
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)
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)
- Attachments
-
- patch.txt
- a patch file for the latest stable source code
- (41.98 KiB) Downloaded 152 times
Re: Mac Binary Release
thanks for that.
revcompgeek, could you take a look at this patch and see how it applies to master?
yokosou, if you can, could you upload your changes to github for easier integration? some hints how to use git.
revcompgeek, could you take a look at this patch and see how it applies to master?
yokosou, if you can, could you upload your changes to github for easier integration? some hints how to use git.
Re: Mac Binary Release
hi imbaczek, thanks for the reply.
I will read those pages and try to use git if possible.
I will read those pages and try to use git if possible.
- jackoverfull
- Posts: 62
- Joined: 10 Feb 2008, 16:32
Re: Mac Binary Release
Wow, thank you! Will try it in a few hours.
The sound attenuation problem is a problem that was already present in older mac builds.
The sound attenuation problem is a problem that was already present in older mac builds.
-
- Posts: 933
- Joined: 27 Feb 2006, 02:04
Re: Mac Binary Release
A working OSX Intel .79 or .80 or whatever the next Spring version will be could be a BIG DEAL since we could promote it. I personally know 3 or 4 people who quit Spring when they switched to Macs since they hated to bootcamp into Windows / Linux to play, and Spring doesn't work in VMWare Fusion or Parallels since Spring uses OpenGL.
- jackoverfull
- Posts: 62
- Joined: 10 Feb 2008, 16:32
Re: Mac Binary Release
works fine for me.
I only have a problem: in older releases i could create unit groups using ctrl-number, now that doesn't seem to work anymore.
Does fork for anyone? I'm asking because I had problems with that in the past (something about my keyboard configuration, i guess), but i could not solve the problem this time yet.
I only have a problem: in older releases i could create unit groups using ctrl-number, now that doesn't seem to work anymore.
Does fork for anyone? I'm asking because I had problems with that in the past (something about my keyboard configuration, i guess), but i could not solve the problem this time yet.
-
- Posts: 933
- Joined: 27 Feb 2006, 02:04
Re: Mac Binary Release
Do you sync in multiplayer games?
Re: Mac Binary Release
I'm sorry I could not reply for a long. I'm still learning how to use git.
jackoverfull, thank you for testing. On my iMac with Leopard, ctrl-numbers were used by spaces and japanese input method by default. After removing these settings, ctrl-numbers worked fine.
el_matarife, multiplayer with spring 0.78.2.0 on Ubuntu worked fine. But, this may meaningless as 0.79 is already out...
jackoverfull, thank you for testing. On my iMac with Leopard, ctrl-numbers were used by spaces and japanese input method by default. After removing these settings, ctrl-numbers worked fine.
el_matarife, multiplayer with spring 0.78.2.0 on Ubuntu worked fine. But, this may meaningless as 0.79 is already out...
-
- Posts: 933
- Joined: 27 Feb 2006, 02:04
Re: Mac Binary Release
Have you tried porting .79.0.2 or the current SVN trunk? Sefidel and I have been discussing the possibility of making OSX 10.4 and 10.5 on the Intel platform a "first class" Spring release soon. He's going to start writing a Cocoa / Obj-C lobby client soon that will be basic but functional. If you've got a syncing SVN trunk, once 79.1 is release if you build a binary and a DMG we could be good to go.
Re: Mac Binary Release
Why do you want to reinvent the wheel? I already got springlobby to compile and run with OS X on zeuchs Intel Imac some months ago, so the lobby shouldn't be a big problem..
Re: Mac Binary Release
A crossplatform and not an OS X only lobby would be far better
- clericvash
- Posts: 1394
- Joined: 05 Oct 2004, 01:05
Re: Mac Binary Release
Agreed you should help the spring lobby guys make it work fully on mac! Don't re-invent the wheel!AF wrote:A crossplatform and not an OS X only lobby would be far better
-
- Posts: 933
- Joined: 27 Feb 2006, 02:04
Re: Mac Binary Release
Mac users tend to be bigots about crossplatform applications and really prefer native Cocoa interfaces. Also, I don't believe anyone on the SpringLobby team has a Mac, but I guess if Sefidel joined them that wouldn't be as much of a roadblock. I think Sefidel is going to use the Mac lobby as a "learning" project to pick up some Obj-C and Cocoa skills, but he'd have to confirm that.