Spring on MacOSX: Difference between revisions

From Spring
Jump to navigationJump to search
Elio (talk | contribs)
mNo edit summary
Abma (talk | contribs)
 
(100 intermediate revisions by 22 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).'''


Networking sync presently limits play between computers of the same processor type. PPC sync is being worked on, but macintel builds might have to wait.  
Last page update: 2011/08/01 by daftalx (updated SpringLobby to 0.135)


A port of the Unity lobby is being attempted, as well as 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


== Download ==
=Preamble=
to download and see the latest information, see
[http://spring.clan-sy.com/phpbb/viewtopic.php?p=163367#163367 the forum thread]


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).


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


therefore, the option to donate is now [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]
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.


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


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.


==Running Spring OSX==


Download the '''latest build'''
Good luck, and have fun !


Download '''maps''' (at least [http://spring.unknown-files.net/file/2106/SmallDivide/ one])
=Basics=


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


''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.
These are available on your Mac OS X install DVD, the installer is called "XCode Tools" in the "Optional installs" folder.


double click on Spring to '''run'''.
==Install the Java developer packages==


== StartScripts == --[[User:Elio|elio]] 23:00, 7 Feb 2007 (W. Europe Standard Time)
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).


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
==Install MacPorts==


== Editing settings ==
*If you never had MacPorts installed, the latest version is available as a ".dmg" installer on [http://www.macports.org/install.php this page]
a preference editor is planned, however, in the mean time it is necessary to modify the preference file directly.
*If you already have MacPorts, make sure you run the latest version with


to edit preferences, edit ~/Library/Preferences/de.berlios.taspring-linux.SpringRTS.plist
    sudo port selfupdate


''unless you know what you're doing it is reccomended that you only edit resolution and fontsize.''
==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/


== Bug reporting ==
==Keep MacPorts up-to-date==
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.
To sync your MacPorts install with the latest repositories hit


''For bug reports providing infolog.txt, please have VerboseLevel at 9''
    sudo port sync


and upgrade any outdated ports with


== Known issues==
    sudo port upgrade outdated


Nvidia graphics cards
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.
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. More information of ways that you can avoid it happening is welcome.


LUA issues (intel macs only?) (I'm not sure this is LUA related..--[[User:Elio|elio]] 22:50, 7 Feb 2007 (W. Europe Standard Time))
=Spring=
some users have had the build menus vanish or menu writing float a little.


LUA has bugs as this build uses 5.1 while most spring devs are scripting against version 5.0. This is being worked on.--[[User:Elio|elio]] 22:50, 7 Feb 2007 (W. Europe Standard Time)
==Install spring==


Nanolathe issues
Crazy as it may seem, installing spring now comes down to this command:
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 --[[User:Elio|elio]] 22:50, 7 Feb 2007 (W. Europe Standard Time))


AI issues (--[[User:Elio|elio]] 22:50, 7 Feb 2007 (W. Europe Standard Time))
    sudo port install springrts binutils
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.
Some AI can cause crashes, There appears to be some dylib symbol problems that could pop up; this is being worked on.


Other minor things
WARNING: this will take a *long* while, especially on a fresh system (ballpark figure: over an hour with an Intel C2D 2.2GHz cpu).
Please though do post in the thread with info about anything; you may be able to provide the key bit to pinpoint the problem.
 
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 [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 !