Spring on MacOSX: Difference between revisions

From Spring
Jump to navigationJump to search
Elio (talk | contribs)
Abma (talk | contribs)
 
(79 intermediate revisions by 21 users not shown)
Line 1: Line 1:
== Status ==
{{deprecated|This howto is deprecated, please use the [[Download|official package]], else you can [[Building_Spring_on_MacOSX|compile]] it yourself.}}


At the present, there is a working, compiled universal binary for Macintosh OSX 10.4. However, this is still pre-release and is not yet ready for the public.
'''Important notice: as of the next engine release, this tutorial will be discontinued, as Spring will be available as a standalone Mac OS X .app bundle (so will SpringLobby).'''


Network sync presently restricts play to between computers of the same architecture type. Cross architecture network support is being worked on but will have to wait till there's hardware to work with.  
Last page update: 2011/08/01 by daftalx (updated SpringLobby to 0.135)


A port of the Unity lobby is being attempted (ease of installation is a major concern regardles though), as well as there being progress on AFLobby, but neither as yet are working easily. Therefore, play between two computers must be initiated manually via start scripts and/or command line.
Current milestones available:
* Spring: 0.82.7.1
* SpringLobby: 0.135


See the [[Lobby_on_MacOSX]] page for details
=Preamble=


'''Latest Release:''' 0.7gU with 0.75jU patch --[[User:Elio|Elio]] 1:50, 9 Feb 2007 (W. Europe Standard Time)
This tutorial is intended for Mac OS X Snow Leopard (10.6.*) users running in 32bit kernel mode. Although Spring compiles and runs in 64 bits, '''it does not work in 64bit kernel mode''' (thanks to ''frequencyandsulphur'' for digging this one out).




'''Note:''' Due to moving interstate soon, my development box shall be packed from tomorrow for potentially up to three weeks. I'll still be contactable for bug reports, info etc, though with potential delay. Spring for the Mac development shall continue its progress asap; this is not the end of my efforts. --[[User:Elio|Elio]] 03:52, 10 Feb 2007 (W. Europe Standard Time)
This tutorial has not been tested on older releases of Mac OS X (10.5-). Yet, there are big chances that you can get through and still be able to run Spring. Keep in mind though that due to architecture incompatibilities, Intel-powered macs will be able to discuss online together, as well as with PCs, but not with PPC-powered Macs.


Back in action Updates soon--[[User:Elio|Elio]] 14:47, 25 Feb 2007 (W. Europe Standard Time)


== Download ==
Finally, please bear in mind that this tutorial is mostly for testing purposes and proof of concept. Although no manual compilation is required, using the Terminal application is necessary (for now). Due to the little amount of time people are dedicating to the Mac version of Spring, things will move only slowly and often behind the other platforms. Once things get stabilized, an all-in-one installer will (hopefully one day) replace this tutorial.
to download and see the latest information, see
[http://spring.clan-sy.com/phpbb/viewtopic.php?p=163367#163367 the forum thread]




== Donations ==
Good luck, and have fun !
Elio is, at present, the sole active dev on this port and working towards a full Universal build with network sync. However, at the present he is "slowly" getting an intel mac mini or similar macintel to achieve this.


therefore, the option to donate to support such a cause is [https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=taspringmac%40aol%2ecom&no_shipping=1&cn=Optional%20Comments&tax=0&currency_code=AUD&lc=AU&bn=PP%2dDonationsBF&charset=UTF%2d8 available]
=Basics=


(added by [[User:DesertLynx|DesertLynx]] 14:46, 7 Feb 2007 (W. Europe Standard Time))
==Install the XCode tools==


==Running Spring OSX==
These are available on your Mac OS X install DVD, the installer is called "XCode Tools" in the "Optional installs" folder.


Download the '''latest build'''
==Install the Java developer packages==


Download '''maps''' (at least [http://spring.unknown-files.net/file/2106/SmallDivide/ one])
As of Apple's "Java for Mac OS X 10.6 Update 3", headers for JNI (among other stuff) are no longer provided by default. In order to build spring AIs but also various dependencies, you should download and install the Java Developer package available on Apple's support site [http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20719 here] (NOTE: you must have an Apple ID to access this page. Feel free to post any public hard link in the forum to be added here instead).


Download '''mods''' (at least [http://spring.unknown-files.net/file/1967/XTA_v8.1/ one])
==Install MacPorts==


''double click them to install'' them, or drag and drop them onto the SpringRTS.app bundle (they mightn't all install at once; so you may need to quit and repeat for remaining ones.
*If you never had MacPorts installed, the latest version is available as a ".dmg" installer on [http://www.macports.org/install.php this page]
*If you already have MacPorts, make sure you run the latest version with


double click on Spring to '''run'''.
    sudo port selfupdate


=== StartScripts ===
==Configure MacPorts==
You can also write start scripts to set up skirmishes, network games ([http://spring.clan-sy.com/phpbb/viewtopic.php?t=8634 example scripts]). if you give the script an extension of ".srts" you should be able to just double click the script to start, otherwise just drag and drop it onto the SpringRTS.app bundle.
--[[User:Elio|Elio]]


Spring and it's lobbies are published in a different repository than MacPorts's official one. So you must edit (as root) the MacPorts sources file (located by default in /opt/local/etc/macports/sources.conf), and add the following line '''before''' the last one:


== Editing settings ==
    rsync://daftserve.dyndns.org/macports/
a preference editor is planned, however, in the mean time it is necessary to modify the preference file directly.  


to edit preferences, edit ~/Library/Preferences/de.berlios.taspring-linux.SpringRTS.plist
==Keep MacPorts up-to-date==


''unless you know what you're doing it is reccomended that you only edit resolution and fontsize.''
To sync your MacPorts install with the latest repositories hit


    sudo port sync


----
and upgrade any outdated ports with


== Bug reporting ==
    sudo port upgrade outdated
If you find bugs, please check below at the known list, if they are not there, please report them on the Mac build forum [http://spring.clan-sy.com/phpbb/viewtopic.php?p=163367#163367 thread]


'''Please be descriptive. ''' this is not yet a public release and all the help possible is required to fix each problem.  
From now on I assume your Portfiles will always be up-to-date, therefore I will get straight to the point during the remainder of this tutorial.


''For bug reports providing infolog.txt, please have VerboseLevel at 9''
=Spring=


==Install spring==


== Known issues==
Crazy as it may seem, installing spring now comes down to this command:


''Nvidia graphics cards''
    sudo port install springrts binutils


there are reports that Nvidia graphics cards cause several visual artefacts in game. Among them, vanishing, units and blue/grey polygons appearing as units are nearing build completion. Appears to happen with AdvUnitShading on. Will look into it.
WARNING: this will take a *long* while, especially on a fresh system (ballpark figure: over an hour with an Intel C2D 2.2GHz cpu).


the binutils are required for finding the source of a crash of spring, the utility addr2line is used.


''Nanolathe issues''
==Setup game data==


occasionally the nanolathe spray may end up out of sync with conplanes, this is purely cosmetic and does not affect gameplay. (May be fixed in latest release; so yes, no if still there would be great.
create a ".spring" folder in your home directory, and create the usual "games", "maps" and "demos" folder. There you can store your favorite game data (most of the content is cross-platform compatible).
--[[User:Elio|Elio]] 22:50, 7 Feb 2007 (W. Europe Standard Time))


==Check if Spring works==


''AI issues'' (--[[User:Elio|Elio]] 22:50, 7 Feb 2007 (W. Europe Standard Time))
    spring


Some AI are currently reporting the wrong version, yet still work fine. This will be solved it the next release. (Potentially having a AllowIncompatibleAI setting, because it can lead to crashes if they are genuinely incorrect.
should launch the standalone GUI in window mode, which allows offline gaming, e.g. if you have demo scripts or single player games (my favorite these days is Chicken BA).


Some AI can cause crashes, There appears to be some dylib symbol problems that could pop up; this is being worked on.
=Lobbies=


==SpringLobby==


''Audio issues''
Although the Mac OS port of SpringLobby should be considered "barely alpha"-stage, quite a lot of features are already functional, so you should be able to play online with patience and little effort.


Some sound files fail to have correctly stored their endianess, resulting in harsh staticy/currupt playback. A solution to this problem that doesn't disable correctly encoded sound files is being worked on.
===Install SpringLobby===


As for the engine, installing SpringLobby comes down to a simple command:


''Function Keys''
    sudo port install springlobby


At least in windowed mode, some F* keys (like F9, F10, F11) are bound to system actions, and can prohibit you from using the spring key bindings of them, either alter the key bindings for spring or the system to solve. Command + F* key also works fine too it appears, so that options there.  
In the end you should get two "double-clickable" .app bundles (springlobby and [[SpringSettings]]) in MacPorts's binary folder (/opt/local/bin by default).


''Other minor things''
===Setup SpringLobby===


Please though do post in the thread with info about anything; you may be able to provide the key bit to pinpoint the problem.
Upon first run, you'll have to tell SpringLobby where to find the spring executable and unitsync library manually. The spring executable is in "/opt/local/bin/spring" and the unitsync library in "/opt/local/lib/libunitsync.so".


As mentioned earlier the lobby is in a very early port stage. One major feature that does *NOT* work yet is to join (or autojoin) an IRC channel (but you may chat inside a battleroom). So before connecting to the main server, open the "Autojoin channels" options window and remove all default channels.


That's it, connect and enjoy 
NOTE: SpringLobby will mostly crash upon startup (much less afterwards). Don't worry, just keep trying until you get through...


===Known bugs===


*Add bot in a game opens a tiny (one-pixel wide) window. Clicking it restores its size, but be precise !


''Thanks to [[User:DesertLynx|DesertLynx]] for setting up this page.''
=Troubleshooting=
 
In case you encounter compile or install errors on the way, MacPorts will let you know that a log file has been stored somewhere like /opt/local/var/macports/logs/??/main.log, where the "??" describes the port you are installing. Paste the contents of this file into a paste bin (http://www.pastebin.ca) and post the shortlink to the pastebin in [http://springrts.com/phpbb/viewtopic.php?f=65&t=23455 this topic], together will your full system info (OS, CPU, ARCH, MacPorts version).
 
That's it ! Enjoy !

Latest revision as of 11:20, 12 April 2014

This howto is deprecated, please use the official package, else you can compile it yourself.


Important notice: as of the next engine release, this tutorial will be discontinued, as Spring will be available as a standalone Mac OS X .app bundle (so will SpringLobby).

Last page update: 2011/08/01 by daftalx (updated SpringLobby to 0.135)

Current milestones available:

  • Spring: 0.82.7.1
  • SpringLobby: 0.135

Preamble

This tutorial is intended for Mac OS X Snow Leopard (10.6.*) users running in 32bit kernel mode. Although Spring compiles and runs in 64 bits, it does not work in 64bit kernel mode (thanks to frequencyandsulphur for digging this one out).


This tutorial has not been tested on older releases of Mac OS X (10.5-). Yet, there are big chances that you can get through and still be able to run Spring. Keep in mind though that due to architecture incompatibilities, Intel-powered macs will be able to discuss online together, as well as with PCs, but not with PPC-powered Macs.


Finally, please bear in mind that this tutorial is mostly for testing purposes and proof of concept. Although no manual compilation is required, using the Terminal application is necessary (for now). Due to the little amount of time people are dedicating to the Mac version of Spring, things will move only slowly and often behind the other platforms. Once things get stabilized, an all-in-one installer will (hopefully one day) replace this tutorial.


Good luck, and have fun !

Basics

Install the XCode tools

These are available on your Mac OS X install DVD, the installer is called "XCode Tools" in the "Optional installs" folder.

Install the Java developer packages

As of Apple's "Java for Mac OS X 10.6 Update 3", headers for JNI (among other stuff) are no longer provided by default. In order to build spring AIs but also various dependencies, you should download and install the Java Developer package available on Apple's support site here (NOTE: you must have an Apple ID to access this page. Feel free to post any public hard link in the forum to be added here instead).

Install MacPorts

  • If you never had MacPorts installed, the latest version is available as a ".dmg" installer on this page
  • If you already have MacPorts, make sure you run the latest version with
    sudo port selfupdate

Configure MacPorts

Spring and it's lobbies are published in a different repository than MacPorts's official one. So you must edit (as root) the MacPorts sources file (located by default in /opt/local/etc/macports/sources.conf), and add the following line before the last one:

    rsync://daftserve.dyndns.org/macports/

Keep MacPorts up-to-date

To sync your MacPorts install with the latest repositories hit

    sudo port sync

and upgrade any outdated ports with

    sudo port upgrade outdated

From now on I assume your Portfiles will always be up-to-date, therefore I will get straight to the point during the remainder of this tutorial.

Spring

Install spring

Crazy as it may seem, installing spring now comes down to this command:

    sudo port install springrts binutils

WARNING: this will take a *long* while, especially on a fresh system (ballpark figure: over an hour with an Intel C2D 2.2GHz cpu).

the binutils are required for finding the source of a crash of spring, the utility addr2line is used.

Setup game data

create a ".spring" folder in your home directory, and create the usual "games", "maps" and "demos" folder. There you can store your favorite game data (most of the content is cross-platform compatible).

Check if Spring works

    spring

should launch the standalone GUI in window mode, which allows offline gaming, e.g. if you have demo scripts or single player games (my favorite these days is Chicken BA).

Lobbies

SpringLobby

Although the Mac OS port of SpringLobby should be considered "barely alpha"-stage, quite a lot of features are already functional, so you should be able to play online with patience and little effort.

Install SpringLobby

As for the engine, installing SpringLobby comes down to a simple command:

    sudo port install springlobby

In the end you should get two "double-clickable" .app bundles (springlobby and SpringSettings) in MacPorts's binary folder (/opt/local/bin by default).

Setup SpringLobby

Upon first run, you'll have to tell SpringLobby where to find the spring executable and unitsync library manually. The spring executable is in "/opt/local/bin/spring" and the unitsync library in "/opt/local/lib/libunitsync.so".

As mentioned earlier the lobby is in a very early port stage. One major feature that does *NOT* work yet is to join (or autojoin) an IRC channel (but you may chat inside a battleroom). So before connecting to the main server, open the "Autojoin channels" options window and remove all default channels.

That's it, connect and enjoy NOTE: SpringLobby will mostly crash upon startup (much less afterwards). Don't worry, just keep trying until you get through...

Known bugs

  • Add bot in a game opens a tiny (one-pixel wide) window. Clicking it restores its size, but be precise !

Troubleshooting

In case you encounter compile or install errors on the way, MacPorts will let you know that a log file has been stored somewhere like /opt/local/var/macports/logs/??/main.log, where the "??" describes the port you are installing. Paste the contents of this file into a paste bin (http://www.pastebin.ca) and post the shortlink to the pastebin in this topic, together will your full system info (OS, CPU, ARCH, MacPorts version).

That's it ! Enjoy !