How to make ZK work on your Linux setup

How to make ZK work on your Linux setup

A dynamic game undergoing constant development and refinement, that attempts to balance playability with fresh and innovative features.

Moderator: Content Developer

Post Reply
varikonniemi
Posts: 451
Joined: 03 Jul 2011, 11:54

How to make ZK work on your Linux setup

Post by varikonniemi »

Since ZK has decided to use some arbitary dev version of Spring, you moust compile it yourself from GIT.

I spent two hours figuring it out, but here is how you set it step by step on vanilla ubuntu 11.10:

Code: Select all

sudo apt-get install git

Code: Select all

sudo apt-get install g++

Code: Select all

sudo apt-get build-dep spring
this gets all the packages needed to compile spring. For me it was a download of some 1 gigs worth of data on vanilla ubuntu 11.10.

Code: Select all

git clone git://github.com/spring/spring.git && cd spring && git checkout 6cefe1d4e60432a67bcc29bd3bd252278b8ddeb6 && cmake . && make -j 2 && sudo make install
This took almost an hour on the highest-end c2d processor utilizing its two cores. Substitute -j 2 with the amount of cores you have, eg -j 4 (thanks sirmaverick)

After this you open the hidden folder in ~/.springlobby and change the line containing

Code: Select all

set DisableVersionCheck=0
to

Code: Select all

set DisableVersionCheck=1
SL must be closed while doing this, otherwise it will overwrite the change at close.

Then you must change SL to use your compiled spring, instead of the packaged one. Open the SL settings, and replace the spring and unitsync wth these

Code: Select all

/usr/local/bin/spring
/usr/local/lib/libunitsync.so
Then you can play ZK again under linux.

As an PS. i have to say this method of fixing things is really dirty, and does not consider the gamers convenience in any way. Release a fixed spring that gets updated to the repositories, and that would be all. This was really messy, and took a long time to figure out even with the excellent help of Burp and some parts by Licho.
Last edited by varikonniemi on 18 Mar 2012, 00:35, edited 7 times in total.
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Re: How to make ZK work on your Linux setup

Post by Saktoth »

We wish the engine developers would release a fixed version of Spring, but its been too long with the critical bugs in this release that it is better to have the game functioning.

Until then, you can still play on the 'Teams old version' springie if you cant or do not want to figure out how to compile the new engine version.
SirMaverick
Posts: 834
Joined: 19 May 2009, 21:10

Re: How to make ZK work on your Linux setup

Post by SirMaverick »

You don't need to point to a different libunitsync.so in SL. Just the spring binary.

Faster compiling: make -j 2 will compile on 2 core.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: How to make ZK work on your Linux setup

Post by hoijui »

minor adjustment:
the genreal rule for the -j parameter is to use #cores+1, so for a dual core, you would use -j 3.
this +1 will not bring too much of a performance boost though.
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Re: How to make ZK work on your Linux setup

Post by koshi »

To be less invasive it would also be a good idea to install into a prefix outside of $PATH like /opt/zerok
Otherwise the manual install in /usr/local will globally and "forever" override spring's debian package install.
varikonniemi
Posts: 451
Joined: 03 Jul 2011, 11:54

Re: How to make ZK work on your Linux setup

Post by varikonniemi »

I can say the -j 2 made it use my two cores, while without it it only used one. You might be technically correct, but this worked for me.

koshi: i have no clue about that one. I was told to change the bin target from /usr/bin/spring to usr/local/bin/spring and /usr/lib/libunitsync.so to /usr/local/lib/libunitsync.so so i assumed they did not go to the same directory. Of course the ones helping me could have been wrong, i just hope the next release will work once i do an apt-get upgrade.

In the future, if you decide to use dev builds, please take the time to post how to get things working under a system that does not use ZKL. (i have no idea about what it means to install outside a prefix $PATH)

edit: ubuntu packaged bin seems to be in in /usr/games/spring
Last edited by varikonniemi on 21 Mar 2012, 17:43, edited 1 time in total.
burp
Posts: 18
Joined: 21 Feb 2012, 16:19

Re: How to make ZK work on your Linux setup

Post by burp »

hoijui wrote:minor adjustment:
the genreal rule for the -j parameter is to use #cores+1, so for a dual core, you would use -j 3.
this +1 will not bring too much of a performance boost though.
Only if you use a bad scheduler. Use BFS -.-
Of course the ones helping me could have been wrong
Nope :)
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Re: How to make ZK work on your Linux setup

Post by koshi »

varikonniemi wrote:i have no idea about what it means to install outside a prefix $PATH
set CMAKE_INSTALL_PREFIX to /opt/zerok for example
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: How to make ZK work on your Linux setup

Post by dansan »

If you happen to already have run cmake and wish to change the install-path later, you can edit the variable CMAKE_INSTALL_PREFIX in CMakeCache.txt
wolas
Posts: 112
Joined: 30 Jul 2010, 20:40

Re: How to make ZK work on your Linux setup

Post by wolas »

Just curious how much players dropped when you started using this experimental spring version? I m kinda busy now with studies and lazy to compile it and its good I guess more time spent on studies...

And by the way new official spring version will be released any time soon?
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: How to make ZK work on your Linux setup

Post by Licho »

We made record number of players since then wolas..
varikonniemi
Posts: 451
Joined: 03 Jul 2011, 11:54

Re: How to make ZK work on your Linux setup

Post by varikonniemi »

Once again 88 was pushed to zk before it was pushed to server (and repos), so here is what you need to do (taking into consideration the first post in this thread)

Code: Select all

git clone git://github.com/spring/spring.git && cd spring && git checkout 88.0 && cmake . && make -j 3 && sudo make install
Last edited by varikonniemi on 23 Mar 2012, 20:54, edited 1 time in total.
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Re: How to make ZK work on your Linux setup

Post by koshi »

That's wrong. You need to check out the matching tag, not a branch that's been obsolete for months.
varikonniemi
Posts: 451
Joined: 03 Jul 2011, 11:54

Re: How to make ZK work on your Linux setup

Post by varikonniemi »

Well could you tell me then the correct one, and how to get the tag, since that is what i used after reading some git --help and it works and compiled a working 88.0 for me.

edit: changed it to git checkout 88.0 which i assume is the correct way to do it?

Code: Select all

git tag
shows tagged releases available, i still have no idea how to find a dev release like the last one used

Code: Select all

git checkout 6cefe1d4e60432a67bcc29bd3bd252278b8ddeb6
Post Reply

Return to “Zero-K”